/* Importación de fuentes premium para un look profesional */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Oswald:wght@500&family=Poppins:wght@300;400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f8f9fa; /* Gris muy claro para resaltar las tarjetas blancas */
    color: #1a1a1a;
}

/* --- HEADER DE ALTO IMPACTO --- */
.site-header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.banner-main {
    /* Gradiente dinámico: de rojo oscuro a rojo vibrante */
    background: linear-gradient(135deg, #8b0000 0%, #e63946 100%);
    padding: 30px 5%;
    display: flex;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Esto empuja el logo a la izquierda y el letrero a la derecha */
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
}

/* Efecto de brillo y sombra al Logo circular */
.logo-circular img {
    height: 100px;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.4));
    transition: transform 0.4s ease;
}

.logo-circular img:hover {
    transform: rotate(8deg) scale(1.1);
}

/* Sombra realista al letrero rústico para dar profundidad */
.catalog-title-img img {
    height: 130px;
    filter: drop-shadow(0 15px 15px rgba(0,0,0,0.5));
}

.spacer { width: 100px; }

/* --- BUSCADOR ESTILO MODERNO (Glassmorphism) --- */
.search-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px); /* Efecto de cristal esmerilado */
    padding: 20px 0;
    display: flex;
    justify-content: center;
    border-bottom: 3px solid #e63946;
}

.search-wrapper {
    display: flex;
    width: 90%;
    max-width: 600px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50px;
    padding: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: 0.3s all ease;
}

.search-wrapper:focus-within {
    border-color: #e63946;
    box-shadow: 0 10px 30px rgba(230, 57, 70, 0.2);
    transform: translateY(-2px);
}

.search-wrapper input {
    flex: 1;
    border: none;
    padding: 10px 25px;
    outline: none;
    font-size: 17px;
    background: transparent;
}

.search-wrapper button {
    background: transparent;
    border: none;
    padding-right: 25px;
    cursor: pointer;
    color: #e63946;
    font-size: 1.4rem;
}

/* --- TÍTULO DE DISPONIBILIDAD --- */
/* Recuperar el estilo impactante del título */
.main-title {
    text-align: center;
    font-family: 'Oswald', sans-serif; /* Asegúrate de tener la fuente importada */
    margin: 60px 0 40px;
    font-size: 2.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(to right, #8b0000, #e63946);
    -webkit-background-clip: text;
    background-clip: text; /* Compatibilidad estándar */
    -webkit-text-fill-color: transparent; /* Texto con gradiente */
    color: #333; /* Respaldo por si el gradiente no carga */
}

/* --- GRID Y TARJETAS PREMIUM --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 80px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
    padding: 0 40px;
}

.product-card {
    background: #ffffff;
    border-radius: 25px;
    padding: 40px 30px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Animación de elevación al pasar el mouse */
.product-card:hover {
    transform: translateY(-20px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
    border-color: rgba(230, 57, 70, 0.3);
}

.product-card img {
    height: 250px; /* Altura mayor para impacto visual */
    width: auto;
    object-fit: contain;
    margin-bottom: 30px;
    transition: transform 0.5s ease;
}

.product-card:hover img {
    transform: scale(1.1) rotate(3deg); /* Zoom y rotación sutil */
}

.product-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    color: #222;
    margin-bottom: 10px;
    min-height: 60px;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .banner-main {
        padding: 15px 2%; /* Reducimos el grosor de la franja roja */
    }

    .header-content {
        flex-direction: row !important; /* ¡IMPORTANTE! Evita que se pongan uno arriba del otro */
        display: flex !important;
        justify-content: space-between !important;
        align-items: center;
    }

    .logo-circular img {
        height: 55px !important; /* Logo más pequeño para que no estorbe */
        width: auto;
    }

    .catalog-title-img img {
        height: 65px !important; /* Letrero rústico más pequeño */
        width: auto;
    }

    .spacer {
        display: none !important; /* Eliminamos espacios invisibles */
    }

    /* Ajustamos el buscador para que no tape el header */
    .search-section {
        padding: 10px 0;
    }
    
    .search-wrapper {
        width: 95%;
    }
}
/* Botón de WhatsApp con efecto de pulsación */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 2000;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.whatsapp-btn:hover {
    transform: scale(1.15) rotate(10deg); /* Se agranda y gira un poco al tocarlo */
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.6);
}

/* Animación de entrada para que no aparezca de golpe */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.whatsapp-btn {
    animation: fadeInUp 0.8s ease-out;
}
/* Ventana de la Lista Flotante */
.cart-dropdown {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 300px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.2);
    padding: 20px;
    display: none; /* Se activa con JS */
    z-index: 2100;
    border: 1px solid #eee;
    animation: slideUp 0.3s ease-out;
}

.cart-dropdown h4 {
    margin-bottom: 15px;
    border-bottom: 2px solid #e63946;
    padding-bottom: 5px;
}



#cart-items-list {
    list-style: none;
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 15px;
}

#cart-items-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f9f9f9;
    font-size: 0.9rem;
}

.remove-item {
    color: #e63946;
    cursor: pointer;
    font-weight: bold;
    margin-left: 10px;
}

.send-btn {
    width: 100%;
    background: #25d366;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Añade esto para que el botón se vea bien */
.add-btn {
    background: #e63946;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    margin-top: 15px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}
.add-btn:hover { background: #8b0000; transform: scale(1.05); }

/* Estilos del carrito que ya tenías (Verifica que no falten) */
.cart-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #ea0202;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
#cart-count {
    position: absolute;
    top: 0; right: 0;
    background: #8b0000;
    color: white;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 12px; font-weight: bold;
}
/* Botón del Carrito: Fondo Rojo, Icono Blanco */
.cart-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #e63946; /* Rojo vibrante de GAPSA */
    width: 85px;         /* Tamaño grande impactante */
    height: 85px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 38px;     /* Tamaño del icono */
    z-index: 2000;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(230, 57, 70, 0.4); /* Sombra rojiza */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid #ffffff; /* Borde blanco para resaltar */
    color: #ffffff;      /* Asegura que el icono/emoji sea blanco */
    
    /* Animación de pulso blanca */
    animation: pulse-white 2s infinite;
}

/* Efecto al pasar el mouse */
.cart-float:hover {
    transform: scale(1.1);
    background: #ff1a1a; /* Un rojo un poco más brillante */
    box-shadow: 0 15px 35px rgba(230, 57, 70, 0.6);
}

/* Animación de pulso para atraer la atención */
@keyframes pulse-white {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6); }
    70% { box-shadow: 0 0 0 20px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
/* Clase para ocultar el buscador */
.search-section {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    position: sticky; /* Opcional: para que se quede arriba antes de ocultarse */
    top: 0;
    z-index: 999;
}

.search-section.hide-search {
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden; /* Ayuda a que el navegador lo ignore por completo */
}