/* =========================================
   1. ESTILOS BASE Y RESET
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8f9fa; /* Fondo ligeramente gris para que resalten las tarjetas blancas */
    color: #333;
}

/* =========================================
   2. BARRA DE NAVEGACIÓN (HEADER)
   ========================================= */
.navbar {
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Espacio limpio para que destaque tu logo icónico */
.logo-container .logo {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.search-bar {
    display: flex;
    flex: 0 1 500px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    overflow: hidden;
    background-color: #fff;
}

.search-bar input {
    flex: 1;
    border: none;
    padding: 10px 20px;
    outline: none;
    font-size: 14px;
}

.search-bar button {
    background-color: transparent;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    font-size: 16px;
}

.cart-container button {
    background-color: #dc2626;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cart-container button:hover {
    background-color: #b91c1c;
}

/* =========================================
   3. BANNER PRINCIPAL (HERO)
   ========================================= */
.hero-banner {
    background-color: #111827;
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
}

.hero-banner h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.hero-banner p {
    font-size: 16px;
    color: #9ca3af;
}

/* =========================================
   4. CUADRÍCULA DEL CATÁLOGO
   ========================================= */
.catalogo-section {
    padding: 0 5%;
    max-width: 1400px;
    margin: 0 auto 50px auto;
}

.catalogo-section h2 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #111827;
    border-bottom: 2px solid #dc2626;
    display: inline-block;
    padding-bottom: 5px;
}

.grid-productos {
    display: grid;
    /* Esto hace que sea responsivo automáticamente. En PC caben 4 o 5, en celular 1 o 2 */
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* =========================================
   5. TARJETAS DE PRODUCTO (Efecto Plaza Vea)
   ========================================= */
.producto-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    background-color: #ffffff;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.producto-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.imagen-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.producto-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.imagen-container:hover .producto-img {
    transform: scale(1.15); /* Efecto lupa */
}

.marca {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}

.nombre-producto {
    font-size: 15px;
    color: #111827;
    margin: 0 0 12px 0;
    line-height: 1.3;
    font-weight: 600;
}

.precios {
    margin-top: auto; /* Empuja los precios y el botón hacia abajo para alinear todas las tarjetas */
}

.precio-regular {
    color: #9ca3af;
    text-decoration: line-through;
    font-size: 13px;
    margin: 0 0 4px 0;
}

.precio-destacado {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.precio-online {
    color: #dc2626;
    font-size: 22px;
    font-weight: 700;
}

.etiqueta-descuento {
    background-color: #dc2626;
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 4px;
}

.btn-agregar {
    width: 100%;
    background-color: #b91c1c;
    color: #ffffff;
    border: none;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-agregar:hover {
    background-color: #991b1b;
}

/* =========================================
   6. RESPONSIVIDAD PARA CELULARES
   ========================================= */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .search-bar {
        width: 100%;
        flex: 1 1 auto;
    }
    
    .grid-productos {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en celulares grandes */
        gap: 10px;
    }
    
    .producto-card {
        padding: 10px;
    }
    
    .imagen-container {
        height: 150px;
    }
    
    .precio-online {
        font-size: 18px;
    }
}

@media (max-width: 400px) {
    .grid-productos {
        grid-template-columns: 1fr; /* 1 columna en celulares muy pequeños */
    }
}