/*
Theme Name: Mi Tienda
Author: Administrador
Description: Tema personalizado para tienda de electrónica.
Version: 1.0
*/

/* Variables de color para un diseño tecnológico */
:root {
    --primary-color: #0033a0; /* Azul estilo corporativo */
    --secondary-color: #e60000; /* Rojo para botones de acción */
    --background-light: #f4f5f7;
    --text-dark: #333333;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-light);
    color: var(--text-dark);
}

/* Header y Barra de Búsqueda */
header {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: var(--primary-color);
    color: white;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 1px;
}

.search-bar {
    display: flex;
    width: 50%;
}

.search-bar input {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 14px;
}

.search-bar button {
    background: var(--secondary-color);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: #cc0000;
}

.cart {
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

/* Navegación de Categorías */
.main-nav {
    background-color: #ffffff;
    border-bottom: 3px solid var(--primary-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 12px 0;
    gap: 30px;
    flex-wrap: wrap;
}

.main-nav ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    transition: color 0.3s;
}

.main-nav ul li a:hover {
    color: var(--primary-color);
}

/* Banner Hero */
.hero {
    background: linear-gradient(rgba(0, 51, 160, 0.7), rgba(0, 51, 160, 0.7)), url('https://via.placeholder.com/1920x600') center/cover;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 20px;
}

.hero-content h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 18px;
}

/* Grilla de Productos */
.productos-destacados {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.productos-destacados h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

/* Estilo Individual del Producto */
.producto {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.producto:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.img-placeholder {
    background: #f0f0f0;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 50px;
    border-radius: 4px;
}

.producto h3 {
    font-size: 16px;
    color: var(--text-dark);
    margin: 10px 0;
    height: 40px;
}

.precio {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 15px 0;
}

.producto button {
    background: var(--secondary-color);
    color: white;
    padding: 12px;
    width: 100%;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s;
}

.producto button:hover {
    background: #cc0000;
}

/* Footer */
footer {
    background: var(--text-dark);
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
}

.footer-info p {
    margin: 5px 0;
    color: #cccccc;
}

/* Ajuste para que las imágenes de los productos se adapten al contenedor */
.img-placeholder {
    background: transparent; /* Quitamos el fondo gris del placeholder */
}

.img-placeholder img {
    width: 100%;
    height: 180px; /* Mantiene la misma altura que teníamos antes */
    object-fit: cover; /* Evita que la imagen se deforme o aplaste */
    border-radius: 4px;
}