* {
    margin: 0;
}

/* ==========================================
   HERO BANNER
   ========================================== */
/* ==========================================
   HERO BANNER - CONFIGURACIÓN GLOBAL (PC)
   ========================================== */
.hero {
    /* Esta es tu imagen para PC (la que ya tienes) */
    background-image: url('https://lossilva.shop/img/HER.jpg'); 
    
    background-repeat: no-repeat;
    /* Recomendación: En PC 'fixed' se ve bien, pero en móvil da problemas. 
       Déjalo aquí para PC, lo cambiaremos en la media query */
    background-attachment: scroll;
    background-position: center;
    background-size: cover;  /* O el porcentaje que definiste antes */
    min-height: 550px;
    width: 100%;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}

/* ==========================================
   MEDIA QUERY PARA MÓVILES (max-width: 991.98px)
   ========================================== */
@media (max-width: 991.98px) {
    .hero {
        /* 1. Añadimos el degradado oscuro (capa negrita) encima de la imagen móvil para resaltar las letras */
        background-image: url('../img/movil.jpg'); 
        
        /* 2. ELIMINAMOS el filter: drop-shadow ya que daña el contenedor */
        
        /* --- Ajustes extra para que se vea bien en móvil --- */
        background-attachment: scroll;
        background-size: cover; 
        background-position: center center;
        min-height: 450px; 
    }
}

/* Asegura que los botones y textos queden siempre por encima de la foto */
.z-index-2 {
    z-index: 2;
    position: relative;
}

/* --- Libro Abierto en Escritorio (min-width: 992px) --- */
@media (min-width: 992px) {
    .hero {
        min-height: 620px;
        padding-bottom: 0 !important;
    }

    .hero-img-libro-desk {
        width: 115%;             /* Hace que el libro sea grande y luzca imponente */
        max-width: none;
        height: auto;
        object-fit: contain;
        /* Lo sacamos un poco hacia la derecha para que aproveche el borde de la pantalla */
        margin-right: -8%; 
        transform: translateY(15px); /* Pequeño ajuste vertical para centrarlo visualmente con el texto */
        filter: drop-shadow(0px 20px 30px rgba(0, 0, 0, 0.4));
        z-index: 1;
    }
}

/* --- Libro Abierto en Móvil (max-width: 991.98px) --- */


/* ==========================================
   NAVBAR: Estilos Mejorados e Integrados
   ========================================== */

/* 1. Estado Inicial (Transparente sobre el Hero) */
.navbar-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
    padding: 1rem 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background-color: transparent;
}

/* Marca / Logo */
.navbar-custom .navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    color: #ffffff !important;
    transition: color 0.3s ease;
}

/* Textos, Enlaces e Íconos iniciales */
.navbar-custom .nav-link,
.navbar-custom .btn-cart-icon,
.navbar-custom .bi {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.2s ease;
}

/* Efecto hover en links sobre el Hero */
.navbar-custom .nav-link:hover,
.navbar-custom .btn-cart-icon:hover {
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* 2. Estado al hacer SCROLL (Blanco Cristal Premium) */
.navbar-custom.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 10px 30px rgba(3, 50, 115, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding-top: 0.6rem !important;
    padding-bottom: 0.6rem !important;
}

/* Textos e Íconos Oscuros en SCROLL */
.navbar-custom.navbar-scrolled .navbar-brand {
    color: #033273 !important;
}

.navbar-custom.navbar-scrolled .nav-link,
.navbar-custom.navbar-scrolled .btn-cart-icon,
.navbar-custom.navbar-scrolled .bi {
    color: #1e293b !important;
}

/* Hover de links al hacer scroll */
.navbar-custom.navbar-scrolled .nav-link:hover {
    color: #3063ab !important;
}

/* Indicador activo en el menú */
.navbar-custom.navbar-scrolled .nav-link.active {
    color: #033273 !important;
    font-weight: 700;
}

/* ==========================================
   COMPONENTES & TARJETAS
   ========================================== */

/* Color de fondo suave */
.bg-light {
    background-color: #f6f6f6 !important;
}

/* Tipografía y utilidades */
.extra-small {
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.fs-7 { 
    font-size: 0.75rem; 
}

.tracking-widest { 
    letter-spacing: 2px; 
}

/* Imágenes dentro de tarjetas generales */
.card img {
    max-height: 220px;
    object-fit: contain;
}

/* Tarjetas de productos y animaciones */
.card-producto {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-producto:hover {
    transform: translateY(-8px);
}

.img-wrapper {
    overflow: hidden;
    border-radius: 8px;
}

.img-wrapper img {
    transition: transform 0.5s ease;
}

.card-producto:hover .img-wrapper img {
    transform: scale(1.08);
}

/* Bento Grid */
.bento-card {
    transition: transform 0.4s ease;
}

.bento-card:hover {
    transform: scale(1.015);
}

/* Animación del carrito */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.animate-bounce {
    animation: bounce 0.3s ease;
}

/* Botones de acción */
.btn-agregar {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-agregar:hover {
    transform: scale(1.05);
}

.item-producto {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.filtro-btn {
    box-shadow: none !important;
    outline: none !important;
}
/* ==========================================
   CORRECCIÓN NAVBAR MÓVIL (Dispositivos Reales)
   ========================================== */
@media (max-width: 991.98px) {
    /* Forzamos que el menú colapsado tenga fondo sólido y no se desborde */
    .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 1.5rem;
        border-radius: 0 0 1rem 1rem;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
        margin-top: 0.75rem;
    }

    /* Aseguramos que los elementos internos no fuercen el ancho */
    .navbar-nav {
        text-align: center;
        width: 100%;
        gap: 1rem !important; /* Sobrescribe el gap-3 anterior para que no se amontonen */
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0;
        font-size: 1.1rem;
        color: #1e293b !important; /* Texto oscuro legible sobre el fondo blanco */
    }
}
