/* --- BARRA DE CONFIANZA PROFESIONAL --- */
.trust-bar-container {
    background: #ffffff;
    border-radius: 12px;
    
    /* Sombra elegante y sutil */
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    
    padding: 15px 25px;
    margin-bottom: 35px; /* Espacio antes de los productos */
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

/* Cada bloque individual */
.trust-item {
    display: flex;
    align-items: center;
    gap: 15px; /* Espacio entre icono y texto */
    flex: 1; /* Para que ocupen el mismo ancho */
    justify-content: center; /* Centrado en su espacio */
}

/* El círculo del icono */
.trust-icon-box {
    background: #fff8e1; /* Fondo dorado muy suave */
    color: #E60000;      /* Icono rojo marca */
    width: 45px;
    height: 45px;
    border-radius: 50%; /* Círculo perfecto */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    flex-shrink: 0; /* No permitimos que se aplaste */
}

/* Textos */
.trust-content {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.trust-content strong {
    font-size: 0.95rem;
    color: #333;
    font-weight: 800;
}

.trust-content span {
    font-size: 0.8rem;
    color: #777;
}

/* Línea separadora vertical (Solo PC) */
.trust-separator {
    width: 1px;
    height: 35px;
    background-color: #eee;
}

/* --- ADAPTACIÓN PARA CELULAR --- */
@media (max-width: 768px) {
    .trust-bar-container {
        flex-direction: column; /* Apilar uno sobre otro */
        align-items: flex-start; /* Alinear a la izquierda */
        gap: 15px;
        padding: 15px;
    }

    .trust-item {
        width: 100%;
        justify-content: flex-start; /* Icono a la izquierda, texto a la derecha */
        border-bottom: 1px solid #f9f9f9; /* Línea sutil entre items */
        padding-bottom: 10px;
    }
    
    .trust-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .trust-separator {
        display: none; /* Ocultamos las líneas verticales en celular */
    }
    
    /* Hacemos el texto un pelín más pequeño para que no se vea tosco */
    .trust-content strong { font-size: 0.9rem; }
    .trust-icon-box { width: 38px; height: 38px; font-size: 1.2rem; }
}

/* =======================================================
   📱 REDISEÑO HEADER MÓVIL (CORREGIDO - SIN CORTES)
   ======================================================= */

@media (max-width: 900px) {

    /* 1. EL FONDO ROJO APP */
    .main-header {
        background: linear-gradient(180deg, #D32F2F 0%, #B71C1C 100%) !important;
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 30px;
        box-shadow: 0 10px 25px rgba(183, 28, 28, 0.3) !important;
        padding-bottom: 20px !important;
        margin-bottom: 20px;
        border-bottom: none !important;
        position: relative;
        z-index: 100;
        
        /* ¡IMPORTANTE! Evita que el header sea más ancho que la pantalla */
        width: 100% !important;
        overflow: hidden !important; 
    }

    /* Línea decorativa curva */
    .main-header::after {
        content: '';
        position: absolute;
        bottom: 8px;
        left: 30%; right: 30%;
        height: 4px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 10px;
    }

    /* 2. TÍTULO DEL NEGOCIO */
    .store-name {
        font-size: 1.3rem !important;
        margin-top: 10px !important;
    }

    /* 3. LOGO (RESET COMPLETO DE MÁRGENES) */
    /* Aquí estaba el problema: quitamos los márgenes negativos viejos */
    .header-logo {
        height: 100px !important;
        width: auto !important;
        display: block !important;
        
        /* RESETEAMOS los márgenes para que no empujen la pantalla */
        margin: 0 auto 10px auto !important; 
        filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2));
    }

    /* 4. CONTENEDOR LOGO Y CARRITO */
    .logo-and-cart {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        
        /* --- LA SOLUCIÓN AL CORTE --- */
        box-sizing: border-box !important;
        padding: 0 20px !important; /* Espacio seguro a los lados */
        margin: 0 !important;       /* Quitamos márgenes negativos del HTML */
        left: 0 !important;         /* Aseguramos que empiece en el borde */
        /* --------------------------- */
        
        position: relative;
        z-index: 200;
    }

    /* 5. EL CARRITO (WIDGET) */
    .cart-widget {
        background: white;
        padding: 5px 10px;
        border-radius: 50px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        display: flex;
        align-items: center;
        gap: 5px;
        
        /* Aseguramos que no tenga transformaciones raras */
        transform: none !important; 
        margin-right: 0 !important;
    }

    .cart-widget span:first-child { font-size: 1.4rem; }

    #cart-count {
        background: #E60000 !important;
        color: white !important;
        padding: 2px 6px !important;
        border-radius: 10px;
        font-size: 0.8rem;
        font-weight: bold;
    }

    /* 6. BOTÓN MIS PEDIDOS (CENTRADO) */
    #btn-history-mobile {
        width: 85% !important;
        margin: 0 auto 10px auto !important; /* Centrado perfecto */
        padding: 10px 0 !important;
        background: linear-gradient(90deg, #FFC300 0%, #FFD700 100%) !important;
        color: #B71C1C !important;
        border: 2px solid #fff !important;
        border-radius: 50px !important;
        font-size: 0.9rem !important;
        font-weight: bold;
        text-transform: uppercase;
        box-shadow: 0 4px 10px rgba(0,0,0,0.15) !important;
        display: flex !important;
        justify-content: center;
        animation: none !important;
    }

    /* 7. MENSAJE HOLA VECINO */
    .header-client-msg {
        background: rgba(255, 255, 255, 0.15);
        margin: 0 15px !important;
        padding: 8px !important;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,0.1);
        text-align: center;
    }
    .header-client-msg p { color: #FFD700 !important; margin: 0 !important; }
}

/* =======================================================
   TITULO PRO PARA MÓVIL (Estilo Logotipo 3D)
   ======================================================= */
@media (max-width: 900px) {

/* 1. Contenedor del Título (AHORA CON FONDO CRISTAL) */
    .store-name {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        line-height: 1;
        
        /* --- EFECTO CRISTAL (GLASSMORPHISM) --- */
        background: rgba(255, 255, 255, 0.1) !important; /* Fondo blanco al 10% */
        backdrop-filter: blur(5px);            /* Difumina lo de atrás */
        -webkit-backdrop-filter: blur(5px);    /* Para iPhone/Safari */
        border: 1px solid rgba(255, 255, 255, 0.2) !important; /* Borde sutil */
        border-radius: 20px;                   /* Bordes redondeados */
        box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* Sombra suave */
        
        /* Espaciado para que el texto respire dentro de la caja */
        padding: 12px 25px !important;
        margin: 10px auto 15px auto !important; /* Centrado */
        
        /* Ajuste de ancho */
        width: fit-content;  /* La caja se ajusta al tamaño del texto */
        max-width: 90%;      /* Que no se salga en pantallas muy pequeñas */
    }

    /* 2. La palabra pequeña "SUPERMERCADO" */
    .brand-sub {
        font-size: 0.85rem;       /* Pequeño */
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 4px;      /* Letras muy separadas (Elegancia) */
        color: rgba(255, 255, 255, 0.9); /* Blanco casi puro */
        margin-bottom: 2px;
        text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }

    /* 3. El nombre "SURTITODO IDEAL" (Impacto Total) */
    .brand-main {
        font-family: 'Inter', sans-serif; /* O tu fuente principal */
        font-size: 1.6rem;        /* Grande */
        font-weight: 900;         /* Muy gordo (Black) */
        font-style: italic;       /* Inclinado (Dinamismo/Velocidad) */
        text-transform: uppercase;
        
        /* COLOR: Amarillo Dorado Eléctrico */
        color: #FFD700; 
        
        /* EFECTO 3D: Sombra sólida oscura hacia abajo */
        text-shadow: 
            2px 2px 0px #B71C1C,  /* Capa 1: Rojo oscuro */
            3px 3px 0px #8B0000,  /* Capa 2: Rojo más oscuro */
            4px 4px 6px rgba(0,0,0,0.3); /* Capa 3: Sombra difusa real */
        
        /* Ajuste para que no se salga en pantallas muy pequeñas */
        white-space: nowrap; 
        transform: scale(1); /* Truco para renderizado nítido */
    }
}

/* Ajuste extra para celulares muy angostos (iPhone SE, etc) */
@media (max-width: 380px) {
    .brand-main { font-size: 1.3rem; }
    .brand-sub { font-size: 0.7rem; letter-spacing: 2px; }
}

/* =======================================================
   ALINEACIÓN PERFECTA: LOGO - BOTÓN - CARRITO (MÓVIL)
   ======================================================= */
@media (max-width: 900px) {

    /* 1. EL CONTENEDOR (La fila que los agrupa) */
    .logo-and-cart {
        display: flex !important;
        align-items: center !important; /* CLAVE: Alinea todo verticalmente al centro */
        justify-content: space-between !important; /* Distribuye a lo ancho */
        gap: 10px !important; /* Espacio mínimo entre elementos */
        padding: 0 15px !important; /* Margen de seguridad a los lados */
        margin-top: 15px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 2. EL LOGO (Corrección de altura y posición) */
    .header-logo {
        height: 75px !important; /* Un poco más pequeño para que encaje en la línea */
        width: auto !important;
        margin: 0 !important; /* IMPORTANTE: Borramos los márgenes negativos que lo desalineaban */
        position: static !important; /* Quitamos posición absoluta si la tenía */
        transform: none !important;
        filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
    }

    /* 3. EL BOTÓN "MIS PEDIDOS" (El del centro) */
    #btn-history-mobile {
        margin: 0 !important; /* Sin márgenes extraños */
        flex-grow: 1; /* Truco: Ocupa el espacio sobrante para empujar a los otros */
        max-width: 180px; /* Pero no te pases de ancho */
        padding: 10px 5px !important;
        font-size: 0.85rem !important;
        
        /* Aseguramos que el texto no se rompa */
        white-space: nowrap; 
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 4. EL CARRITO (Lado derecho) */
    .cart-widget {
        margin: 0 !important;
        padding: 8px 12px !important; /* Un poco más compacto */
        flex-shrink: 0; /* No permitimos que se aplaste */
    }
}

/* =======================================================
   TITULO OFERTAS DESTACADAS MÓVIL (BANNER AMARILLO)
   ======================================================= */
@media (max-width: 900px) {

    #featured-section-container h2 {
        /* 1. RESETEAR EFECTOS ANTERIORES */
        /* Quitamos el efecto de texto transparente/fuego que tenía antes */
        position: static !important;
        transform: none !important;
        background-clip: border-box !important;
        -webkit-background-clip: border-box !important;
        -webkit-text-fill-color: initial !important; 
        
        /* 2. CREAR EL BANNER AMARILLO */
        background: linear-gradient(135deg, #FFC300 0%, #FFB300 100%) !important;
        
        /* 3. ESTILO DEL TEXTO */
        color: #B71C1C !important; /* Rojo oscuro para contraste perfecto */
        font-size: 1.2rem !important;
        font-weight: 900 !important;
        text-transform: uppercase;
        text-shadow: none !important; /* Sin sombras raras */
        letter-spacing: 0.5px;
        
        /* 4. FORMA Y POSICIÓN */
        display: block !important;
        width: 90% !important; /* Ocupa casi todo el ancho pero deja aire */
        margin: 0 auto 20px auto !important; /* Centrado automático */
        padding: 12px 10px !important;
        border-radius: 50px !important; /* Redondo tipo cápsula */
        
        /* 5. DETALLES FINALES */
        box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
        border: 2px solid #fff !important; /* Borde blanco para separarlo del fondo */
        text-align: center !important;
    }
}

/* =======================================================
   🛒 SUPER CARRITO MÓVIL (ESTILO APP MODERNA)
   ======================================================= */

   @media (max-width: 1024px) {

    /* 1. EL CONTENEDOR (Efecto "Hoja Deslizante") */
    .cart-sidebar {
        /* Estado inicial OCULTO (Abajo) */
        transform: translateY(100%); 
        transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    }

    .cart-sidebar.active {
        top: auto !important;     
        bottom: 0 !important;     
        height: 85vh !important;  
        width: 100% !important;   
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 25px 25px 0 0 !important; 
        box-shadow: 0 -10px 40px rgba(0,0,0,0.3) !important;
        border-top: 1px solid rgba(0,0,0,0.05);
        
        /* Estado FINAL VISIBLE (Sube a su sitio) */
        transform: translateY(0) !important;
        
        /* IMPORTANTE: Quitamos la propiedad 'animation' */
    }


    /* --- LA "MANIJA" (El toque que faltaba) --- */
    /* Crea esa barrita gris típica de iOS/Android */
    .cart-header::before {
        content: '';
        position: absolute;
        top: 12px;           /* Posición superior */
        left: 50%;           /* Centrado horizontal */
        transform: translateX(-50%);
        width: 50px;         /* Ancho de la barra */
        height: 5px;         /* Grosor */
        background-color: #e0e0e0; /* Color gris suave */
        border-radius: 10px; /* Bordes redondos */
    }

    /* 3. TÍTULO Y SUBTÍTULO (Más definidos) */
    .cart-text-info h2 {
        font-size: 1.5rem !important; /* Un poco más grande */
        font-weight: 800 !important;
        color: #1a1a1a !important;
        letter-spacing: -0.5px;
    }

    .cart-text-info small {
        font-size: 0.9rem !important;
        color: #666 !important;
        margin-top: 4px;
        display: block;
    }
    
    /* Icono de la bolsa (Opcional: un poco más de brillo) */
    .cart-header-icon {
        filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
    }

    /* Ajuste del tamaño de la letra "X" o SVG dentro */
    #close-cart-btn svg, 
    #close-cart-btn span {
        font-size: 1.6rem; 
        font-weight: 400; /* Más fina se ve más elegante */
    }

    /* 4. LISTA DE PRODUCTOS (Estilo Tarjetas) */
    #cart-items {
        background-color: #fafafa !important; /* Fondo gris muy tenue */
        padding: 15px !important;
        gap: 15px;
        display: flex;
        flex-direction: column;
    }

    #cart-items li {
        background: white;
        border-radius: 12px;
        padding: 12px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.03);
        border: 1px solid #eee;
        margin-bottom: 0 !important; /* El gap del padre se encarga */
    }

    /* Nombre del producto y precio */
    .cart-item-info strong {
        font-size: 1rem;
        color: #222;
        display: block;
        margin-bottom: 4px;
    }
    
    /* 5. CONTROLES DE CANTIDAD (Grandes para el dedo) */
    .quantity-controls {
        background: #f4f4f4;
        border-radius: 8px;
        flex-direction: row !important; /* Poner horizontal: [-] 1 [+] */
        padding: 2px;
        gap: 0 !important;
        margin-right: 10px;
    }

    .quantity-controls button {
        width: 32px !important;
        height: 32px !important;
        font-size: 1.2rem !important;
        color: #333 !important;
        background: white !important;
        border-radius: 6px !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 2px !important;
    }
    
    .quantity-controls span {
        font-size: 0.9rem !important;
        min-width: 25px;
    }

    /* Botón eliminar (Papelera roja sutil) */
    .btn-remove-item {
        color: #ff4d4d !important;
        background: rgba(255, 77, 77, 0.1) !important;
        width: 32px !important;
        height: 32px !important;
        border-radius: 50%;
    }

    /* 6. PIE DE PÁGINA (Total y Checkout) */
    .cart-sticky-footer {
        padding: 20px 25px 30px 25px !important; /* Más espacio abajo para iPhones */
        box-shadow: 0 -4px 20px rgba(0,0,0,0.08) !important;
        z-index: 100;
    }

    .cart-total span:first-child { font-size: 1rem; }
    .cart-total span:last-child { font-size: 1.5rem; color: #333; }

    .btn-checkout {
        background: #E60000 !important; /* Rojo marca */
        height: 50px;
        font-size: 1.1rem;
        box-shadow: 0 8px 20px rgba(230, 0, 0, 0.3);
    }
}

/* =======================================================
   🚫 BLOQUEO DE ZOOM INVOLUNTARIO (DOBLE TAP)
   ======================================================= */

/* Aplicamos esto a todos los botones interactivos propensos a clicks rápidos */
button, 
.btn-remove-item, 
.quantity-controls button, 
.btn-add-cart,
.open-cart-button,
#close-cart-btn {
    /* Esta es la magia: deshabilita el zoom por doble toque 
       pero permite hacer scroll con el dedo */
    touch-action: manipulation !important;
}

/* Refuerzo específico para el botón de eliminar (la X o papelera) */
.btn-remove-item {
    cursor: pointer;
    user-select: none; /* Evita que se seleccione texto al tocar rápido */
    -webkit-tap-highlight-color: transparent; /* Quita el parpadeo azul en Android/iOS */
}
#toast-container {
    /* El modal tiene 99999, así que las alertas deben tener más para verse */
    z-index: 100001 !important; 
}

/* =========================================
   🔔 ESTILOS AVISOS PRO (CLEAN UI)
   ========================================= */

/* Ajuste del cuerpo de notificaciones para contraste */
.notifications-body {
    background-color: #f9f9f9; /* Fondo gris muy tenue detrás de las tarjetas */
    padding: 15px;
    gap: 12px; /* Espacio entre tarjetas */
    display: flex;
    flex-direction: column;
}

/* 1. LA TARJETA (Base) */
.cart-msg-box {
    background: #ffffff; /* Blanco puro */
    border: none !important;
    border-left: 5px solid #ccc !important; /* Línea de color a la izquierda */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); /* Sombra muy sutil */
    
    padding: 15px;
    display: flex;
    align-items: flex-start; /* Alinea arriba si hay mucho texto */
    gap: 15px;
    
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Efecto Hover: Se levanta suavemente */
.cart-msg-box:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

/* 2. EL ÍCONO (Círculo Moderno) */
#cart-msg-icon {
    font-size: 1.2rem;
    min-width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* Círculo perfecto */
    flex-shrink: 0;
    
    /* Animación suave del ícono */
    animation: pulseIconSoft 3s infinite ease-in-out;
}

@keyframes pulseIconSoft {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 3. EL TEXTO */
.cart-msg-box span:last-child {
    font-size: 0.9rem;
    color: #444; /* Gris oscuro para lectura cómoda */
    font-weight: 500;
    line-height: 1.4;
    margin-top: 2px; /* Ajuste visual */
}

/* --- TEMAS DE COLOR (Colores Pastel + Acentos Fuertes) --- */

/* 🔵 INFO (Azul) */
.cart-msg-box.info {
    border-left-color: #2196F3 !important;
}
.cart-msg-box.info #cart-msg-icon {
    background-color: #E3F2FD; /* Fondo pastel */
    color: #1976D2;            /* Ícono fuerte */
}

/* 🟡 WARNING (Amarillo/Naranja) */
.cart-msg-box.warning {
    border-left-color: #FFC107 !important;
}
.cart-msg-box.warning #cart-msg-icon {
    background-color: #FFF8E1;
    color: #FFA000;
}

/* 🔴 ERROR (Rojo) */
.cart-msg-box.error {
    border-left-color: #F44336 !important;
}
.cart-msg-box.error #cart-msg-icon {
    background-color: #FFEBEE;
    color: #D32F2F;
}

/* 🟢 SUCCESS (Verde) */
.cart-msg-box.success {
    border-left-color: #4CAF50 !important;
}
.cart-msg-box.success #cart-msg-icon {
    background-color: #E8F5E9;
    color: #388E3C;
}

/* --- DETALLE DE BRILLO (SHINE) --- */
/* Un destello muy sutil que pasa de vez en cuando */
.cart-msg-box::after {
    content: '';
    position: absolute;
    top: 0; left: -150%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.8), transparent);
    transform: skewX(-20deg);
    animation: shineCard 5s infinite;
    pointer-events: none;
}

@keyframes shineCard {
    0% { left: -150%; }
    10% { left: 150%; } /* Pasa rápido */
    100% { left: 150%; }
}

/* =======================================================
   📢 MENSAJE DEL CARRITO (ESTILO PRO & LLAMATIVO)
   ======================================================= */

   .cart-msg-box {
    width: 100%;
    margin-bottom: 15px; /* Espacio antes del total */
    padding: 16px 20px;
    border-radius: 12px; /* Bordes más redondeados */
    display: flex;
    align-items: center;
    gap: 15px;
    
    /* Tipografía más clara y profesional */
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
    
    /* Sombra elegante para dar profundidad */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    
    /* Necesario para el efecto de brillo */
    position: relative;
    overflow: hidden; 
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    
    /* Quitamos bordes viejos */
    border: none !important;
}

/* Efecto al tocar/pasar el mouse */
.cart-msg-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* --- COLORES Y DEGRADADOS (SEGÚN TIPO) --- */

/* 🔵 INFO: Azul corporativo limpio */
.cart-msg-box.info {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    color: #0D47A1;
    border-left: 6px solid #1976D2 !important;
}

/* 🟡 ADVERTENCIA: Dorado cálido */
.cart-msg-box.warning {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
    color: #E65100;
    border-left: 6px solid #FF8F00 !important;
}

/* 🔴 URGENTE: Rojo suave pero alerta */
.cart-msg-box.error {
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    color: #B71C1C;
    border-left: 6px solid #D32F2F !important;
}

/* 🟢 ÉXITO/PROMO: Verde fresco */
.cart-msg-box.success {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    color: #1B5E20;
    border-left: 6px solid #2E7D32 !important;
}

/* --- ICONO ANIMADO --- */
#cart-msg-icon {
    font-size: 1.6rem;
    min-width: 30px;
    text-align: center;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15)); /* Sombra al icono */
    animation: bounceIcon 3s infinite ease-in-out;
}

@keyframes bounceIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); } /* Rebote suave */
}

/* --- ANIMACIÓN DE DESTELLO (SHINE EFFECT) --- */
/* Crea una luz blanca que cruza el mensaje cada 6 segundos */
.cart-msg-box::after {
    content: '';
    position: absolute;
    top: 0; 
    left: -150%; /* Empieza fuera a la izquierda */
    width: 60%; 
    height: 100%;
    
    /* Degradado transparente -> blanco -> transparente */
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.6), transparent);
    
    transform: skewX(-25deg); /* Inclinamos la luz */
    animation: shineMessage 6s infinite; /* Se repite infinitamente */
    pointer-events: none;
}

@keyframes shineMessage {
    0% { left: -150%; }
    15% { left: 150%; } /* Pasa rápido */
    100% { left: 150%; } /* Espera el resto del tiempo */
}

/* Ajuste para cuando hay varios mensajes juntos */
#global-messages-container .cart-msg-box,
#cart-messages-stack .cart-msg-box {
    margin-bottom: 0 !important; /* El gap del contenedor padre se encarga del espacio */
    width: 100%;
    box-sizing: border-box;
}

/* Animación de entrada en cascada */
.cart-msg-box {
    animation: slideInStack 0.5s ease forwards;
}

@keyframes slideInStack {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =======================================================
   📱 ENCABEZADO MÓVIL V5 (BANNER DE LADO A LADO)
   ======================================================= */

   .mobile-insta-btn { display: none; }

   @media (max-width: 900px) {
   
       /* 1. AJUSTE DEL CONTENEDOR PRINCIPAL ROJO */
       .main-header {
           padding-bottom: 10px !important;
           margin-bottom: 5px !important;
           border-bottom-left-radius: 20px !important;
           border-bottom-right-radius: 20px !important;
           overflow: hidden; /* Para que nada se salga de las esquinas */
       }
   
       .main-header .container {
           padding: 0 !important; /* Quitamos padding para que el banner toque los bordes */
           width: 100% !important;
       }
   
       /* 2. EL NUEVO BANNER (CINTA OSCURA) */
       .mobile-brand-banner {
           width: 100% !important; /* De lado a lado */
           
           /* COLOR ELEGIDO: Negro con 20% de transparencia (Elegante) */
           background: rgba(0, 0, 0, 0.2); 
           border-top: 1px solid rgba(255, 255, 255, 0.1);
           border-bottom: 1px solid rgba(255, 255, 255, 0.1);
           
           display: flex;
           flex-direction: column;
           align-items: center;
           justify-content: center;
           
           padding: 15px 0 12px 0 !important; /* Espacio arriba y abajo dentro del banner */
           margin-bottom: 10px !important;
           margin-top: 5px !important;
       }
   
       /* 3. TÍTULO DENTRO DEL BANNER */
       h1.store-name {
           background: none !important; /* Quitamos el fondo viejo */
           border: none !important;
           padding: 0 !important;
           margin: 0 !important;
           width: auto !important;
       }
   
       h1.store-name span.brand-main {
           font-size: 8.5vw !important; /* Gigante */
           line-height: 0.9 !important;
           text-shadow: 2px 2px 0px #8B0000 !important; /* Sombra para resaltar */
           margin-bottom: 5px !important;
           display: block;
       }
   
       h1.store-name span.brand-sub {
           letter-spacing: 4px !important;
           font-size: 0.7rem !important;
           opacity: 0.9;
           margin-bottom: 2px !important;
       }
   
        /* 4. BOTÓN INSTAGRAM (CORREGIDO) */
        .mobile-insta-btn {
            display: inline-flex !important;
            align-items: center;
            justify-content: center; /* Centrar contenido */
            gap: 8px;
            background: white; 
            color: #B71C1C !important; 
            
            padding: 6px 20px !important; /* Un poco más de aire */
            border-radius: 50px;
            font-size: 0.8rem !important;
            font-weight: 800;
            text-decoration: none;
            margin-top: 8px !important;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
            
            /* IMPORTANTE: Evita que el botón crezca infinitamente */
            width: auto !important; 
            max-width: 90%;
        }

        /* 👇 ESTO ES LO QUE FALTA PARA QUE NO SE VEA GIGANTE 👇 */
        .mobile-insta-btn img {
            width: 18px !important;  /* Tamaño fijo pequeño */
            height: 18px !important; /* Tamaño fijo pequeño */
            object-fit: contain;
            display: block;
            flex-shrink: 0; /* Evita que se deforme */
        }
   
        /* =======================================================
            CORRECCIÓN FINAL V2: SEPARACIÓN PERFECTA
            ======================================================= */

            /* 1. LA FILA DE ABAJO (DISTRIBUCIÓN) */
            .logo-and-cart {
                display: grid !important;
                /* Redujimos columnas laterales a 65px para ganar espacio central 
                pero aumentamos el GAP para que no se toquen */
                grid-template-columns: 65px 1fr 65px !important;
                
                align-items: center !important;
                width: 100% !important;
                
                /* 🔥 LA SOLUCIÓN: Aumentamos el hueco a 12px (antes 8px) 🔥 */
                gap: 12px !important; 
                
                padding: 0 10px 15px 10px !important;
                margin: 0 !important;
            }

            /* 2. EL BOTÓN "PEDIR DE NUEVO" (Ajuste para que quepa con el nuevo espacio) */
            #btn-history-mobile {
                justify-self: center !important;
                width: 85% !important;
                
                display: flex !important;
                align-items: center !important;
                justify-content: center !important;
                gap: 5px !important; /* Icono un poco más cerca del texto */
                
                background: linear-gradient(180deg, #FFD700 0%, #FFC300 100%) !important;
                color: #B71C1C !important;
                border: 2px solid #fff !important;
                border-radius: 50px !important;
                
                /* Reducimos padding lateral para compensar el gap externo */
                padding: 6px 4px !important; 
                
                box-shadow: 0 4px 0 #C79600, 0 10px 10px rgba(0,0,0,0.2) !important;
                animation: pulseButton 3s infinite ease-in-out;
                z-index: 40 !important;
                margin: 0 !important;
                white-space: nowrap !important;
                overflow: hidden;
            }

            /* Estilos internos del texto (Reducidos milimétricamente) */
            .history-icon {
                font-size: 1rem !important; /* Icono un pelín más chico */
                filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
            }

            .history-text-group {
                display: flex !important;
                flex-direction: column !important;
                align-items: flex-start !important;
                line-height: 0.95 !important;
            }

            .history-main {
                /* Bajamos de 0.75rem a 0.7rem para que entre cómodo */
                font-size: 0.7rem !important; 
                font-weight: 900 !important;
                text-transform: uppercase;
                letter-spacing: 0.2px; /* Letras un poco más juntas */
            }

            .history-sub {
                font-size: 0.55rem !important;
                font-weight: 700 !important;
                opacity: 0.9;
                margin-top: 1px;
            }

            /* Animación Latido */
            @keyframes pulseButton {
                0%, 100% { transform: scale(1); }
                50% { transform: scale(1.02); }
            }

            /* 3. LOGO (Ajustado) */
            .header-logo {
                height: 100px !important; /* Un poco más controlado */
                width: auto !important;
                margin-top: -30px !important;    
                margin-bottom: -30px !important; 
                margin-left: -5px !important; 
                justify-self: start !important; /* Pegado a la izquierda */
                position: relative !important;
                z-index: 50 !important;
            }

            /* 4. CARRITO (Ajustado) */
            .cart-widget {
                justify-self: end !important; /* Pegado a la derecha */
                width: auto !important;
                padding: 5px 8px !important;
                border-radius: 50px !important;
                background: white;
            }
   }

   /* Esto oculta el botón en PC para que solo salga en el celular */
#btn-history-mobile {
    display: none;
}

/* =======================================================
   🛠️ CORRECCIONES FINALES CARRITO MÓVIL
   ======================================================= */

   @media (max-width: 1024px) {

    /* 1. BOTÓN CERRAR (X) - Ahora visible y elegante */
    #close-cart-btn {
        /* Fondo Rojo Intenso para que no se pierda en el fondo kraft/blanco */
        background-color: #E60000 !important; 
        color: #ffffff !important; /* La X en blanco puro */
        
        /* Borde blanco para separarlo del fondo */
        border: 2px solid #ffffff !important; 
        
        /* Aseguramos visibilidad total */
        opacity: 1 !important; 
        box-shadow: 0 3px 8px rgba(0,0,0,0.3) !important;
        
        /* Un poco más grande para el dedo */
        width: 40px !important;
        height: 40px !important;
    }

    /* 2. BOTÓN FINALIZAR COMPRA - Ahora Amarillo (Brand) */
    .btn-checkout {
        /* Cambiamos el rojo/verde por tu Amarillo #FFC300 */
        background: #FFC300 !important;
        background: linear-gradient(180deg, #FFD700 0%, #FFC300 100%) !important;
        
        /* Letra negra para contraste perfecto (negro sobre amarillo se lee mejor) */
        color: #222 !important; 
        font-weight: 900 !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;

        /* Sombra amarilla brillante */
        box-shadow: 0 5px 15px rgba(255, 195, 0, 0.4) !important;
        border: none !important;
    }
    
    /* Efecto al presionar el botón amarillo */
    .btn-checkout:active {
        transform: scale(0.98);
        background: #FFB300 !important;
    }
}

/* =======================================================
   🛠️ CORRECCIONES FINALES DE EMERGENCIA (CARRITO MÓVIL)
   ======================================================= */

   @media (max-width: 1024px) {

    /* 1. FONDO OSCURO (MARGEN NEGRO) AL ABRIR EL CARRITO */
    /* Usamos un truco de sombra gigante para oscurecer el resto de la página */
    .cart-sidebar.active {
        box-shadow: 
            /* Sombra normal del carrito para profundidad */
            -5px 0 20px rgba(0,0,0,0.2), 
            /* 🔥 LA MAGIA: Una sombra gigante que cubre toda la pantalla de negro */
            0 0 0 1000vh rgba(0, 0, 0, 0.8) !important;
    }

    /* 2. FORZAR COLOR AMARILLO EN EL BOTÓN "FINALIZAR COMPRA" */
    /* Usamos el ID (#cart-sidebar) para que tenga MÁS peso que cualquier otro estilo anterior */
    #cart-sidebar .btn-checkout {
        /* Fondo Amarillo Intenso */
        background-color: #FFC300 !important;
        background: linear-gradient(180deg, #FFD700 0%, #FFC300 100%) !important;
        
        /* Texto Negro (para que se lea bien sobre amarillo) */
        color: #000000 !important;
        
        /* Estilos de fuente */
        font-weight: 900 !important;
        text-transform: uppercase;
        border: 2px solid #fff !important; /* Un bordecito blanco para que resalte más */
        box-shadow: 0 4px 15px rgba(255, 195, 0, 0.4) !important;
    }

    /* Efecto al presionar el botón */
    #cart-sidebar .btn-checkout:active {
        transform: scale(0.96);
        background: #e6b800 !important;
    }

    /* 3. ASEGURAR VISIBILIDAD DE LA X DE CERRAR */
    #close-cart-btn {
        background-color: #E60000 !important; /* Rojo fuerte */
        color: white !important;
        border: 2px solid white !important;
        opacity: 1 !important;
        z-index: 100 !important;
    }
}

/* --- FIX PARA QUE SWEETALERT SALGA ENCIMA DE TODO --- */
.swal2-container {
    z-index: 999999 !important; /* Un número absurdamente alto */
}

/* Opcional: Para asegurar que el fondo oscuro también tape todo */
.swal2-backdrop-show {
    z-index: 999998 !important;
}

/* --- CAJA DE INFORMACIÓN DE PAGO --- */
.payment-info-box {
    margin-top: 10px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
    animation: fadeIn 0.3s ease-in-out;
}

/* Estilo Azul (QR) */
.payment-info-box.qr-style {
    background-color: #E3F2FD;
    color: #0D47A1;
    border-left: 4px solid #2196F3;
}

/* Estilo Naranja (Datáfono) */
.payment-info-box.datafono-style {
    background-color: #FFF3E0;
    color: #E65100;
    border-left: 4px solid #FF9800;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.all-products-item {
    border-bottom: 2px solid #eee;
    margin-bottom: 10px !important;
    background-color: #fff9e6 !important; /* Color ligeramente distinto */
    font-weight: bold !important;
}

.all-products-item:hover {
    background-color: #FFC300 !important;
    color: white !important;
}

/* --- BOTÓN DE RESET CON ONDA --- */
#btn-reset-filters {
    display: none; /* Se activa por JS */
    margin: 10px auto;
    padding: 8px 20px;
    border-radius: 50px;
    border: 2px solid #FFC300;
    background-color: #fff;
    color: #E60000;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    z-index: 1;
}

/* La onda de animación */
#btn-reset-filters::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50px;
    border: 2px solid #FFC300;
    animation: rippleReset 2s infinite;
    z-index: -1;
}

@keyframes rippleReset {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.4, 1.8); /* Se expande más a lo largo */
        opacity: 0;
    }
}

#btn-reset-filters:hover {
    background-color: #FFC300;
    color: #fff;
    transform: scale(1.05);
}

/* --- CONTENEDOR DE FILTROS LIMPIO --- */
.filter-controls-modern {
    display: flex;
    flex-wrap: wrap; /* Permite que bajen si no caben en móvil */
    gap: 12px;       /* ESPACIO CLAVE: Separa todo uniformemente */
    align-items: center; /* Centra verticalmente */
    padding: 15px;
    background: #fff;
    border-radius: 0 0 15px 15px; /* Redondeado solo abajo */
}

/* --- AJUSTE DE INPUTS --- */
.input-wrapper {
    position: relative;
    /* Esto hace que crezcan para llenar espacio, pero no menos de 200px */
    flex: 1 1 200px; 
}

/* --- BOTÓN DE RESET INTEGRADO --- */
#btn-reset-filters {
    /* 1. Dimensiones */
    height: 46px; /* Misma altura que tus inputs (aprox) */
    padding: 0 20px;
    margin: 0; /* Quitamos márgenes externos, usamos el gap del padre */
    
    /* 2. Comportamiento Flexible */
    /* En PC se ajusta al texto, en Móvil ocupará el ancho disponible si hace falta */
    flex: 0 0 auto; 
    
    /* 3. Estética */
    border-radius: 50px;
    border: 2px solid #FFC300;
    background-color: #fff;
    color: #E60000;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap; /* Evita que el texto se parta en dos líneas */
    
    /* 4. Animación */
    position: relative;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Efecto Hover */
#btn-reset-filters:hover {
    background-color: #FFC300;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 195, 0, 0.3);
}

/* ONDA DE ANIMACIÓN (Más sutil) */
#btn-reset-filters::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 50px;
    border: 2px solid #FFC300;
    z-index: -1;
    animation: resetPulse 2s infinite;
    opacity: 0;
}

@keyframes resetPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.1); opacity: 0; }
}

/* --- RESPONSIVE: AJUSTE PARA MÓVIL --- */
@media (max-width: 768px) {
    #btn-reset-filters {
        width: 100%; /* En celular, que ocupe todo el ancho para ser fácil de tocar */
        margin-top: 5px; /* Un pelín de aire extra arriba en móvil */
    }
}

/* =========================================
   📱 CORRECCIÓN FILTROS EN MÓVIL
   ========================================= */

   @media (max-width: 900px) {

    /* 1. EL CONTENEDOR: Pila Vertical */
    .filter-controls-modern {
        display: flex !important;
        flex-direction: column !important; /* Uno debajo del otro */
        align-items: stretch !important;   /* Estirar hijos al 100% del ancho */
        gap: 10px !important;              /* Espacio uniforme entre ellos */
        padding: 15px !important;
    }

    /* 2. LOS INPUTS (Cajas de texto y Select) */
    .input-wrapper {
        width: 100% !important;
        flex: none !important; /* Desactiva el cálculo flexible de PC */
        margin: 0 !important;
    }

    /* Ajuste para que el input dentro del wrapper llene todo */
    .filter-controls-modern input, 
    .filter-controls-modern select {
        width: 100% !important;
        box-sizing: border-box !important; /* Evita que el padding rompa el ancho */
    }

    /* 3. EL BOTÓN "VER TODO" */
    #btn-reset-filters {
        width: 100% !important; /* Botón ancho fácil de tocar con el dedo */
        margin: 5px 0 0 0 !important; /* Un poquito de aire arriba */
        
        display: none; /* Se mantiene oculto hasta que JS lo active */
        /* Cuando JS lo active (display: inline-block), este width: 100% mandará */
    }

    /* Aseguramos que cuando sea visible sea bloque en móvil */
    #btn-reset-filters[style*="display: inline-block"] {
        display: block !important;
    }
}
/* --- ESTILOS PARA LA IMAGEN EN EL CARRITO --- */

/* Ajustamos el contenedor del item para que alinee todo */
#cart-items li {
    display: flex;
    align-items: center; /* Centra verticalmente */
    gap: 12px;           /* Espacio entre foto, texto y botones */
    padding: 10px;
    /* Mantenemos tus bordes y fondo existentes */
}

/* La Imagen Miniatura */
.cart-item-thumb {
    width: 55px;         /* Tamaño fijo */
    height: 55px;        /* Cuadrada */
    object-fit: cover;   /* Recorta la imagen para llenar el cuadrado sin deformar */
    border-radius: 8px;  /* Bordes redondeados */
    border: 1px solid #eee;
    flex-shrink: 0;      /* Evita que la imagen se aplaste si hay mucho texto */
    background-color: #fff;
}

/* Ajuste del texto para que use el espacio restante */
.cart-item-info {
    flex-grow: 1;
    /* Quitamos el grid display si lo tenías, flex es mejor aquí */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Ajuste para que los controles no se peguen demasiado */
.cart-item-controls {
    flex-shrink: 0;
}

/* =========================================
   ✨ MODAL DE TEMPORADA V4 (ESTILO APP & SIN SCROLL) ✨
   ========================================= */

/* 1. EL FONDO (OVERLAY) */
#promo-modal.modal-overlay {
    background-color: rgba(0, 0, 0, 0.9) !important;
    z-index: 100000 !important;
    padding: 0 !important;
    display: none;
    justify-content: center;
    align-items: center;
    overscroll-behavior: contain;
}

/* 2. LA CAJA DEL MODAL (VERSIÓN PC) */
.promo-content {
    background: #ffffff;
    width: 100%;
    max-width: 800px !important;
    height: 85vh; 
    
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6) !important;
    
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important; 
    position: relative;
    
    /* 🔥 CORRECCIÓN CRÍTICA DE SCROLL 🔥 */
    /* Esto asegura que el contenido nunca sea más ancho que la caja */
    box-sizing: border-box !important; 
}

/* 3. CABECERA (LIMPIA Y MODERNA) */
.promo-content .modal-header {
    flex-shrink: 0;
    padding: 15px 20px !important;
    background-color: #111; /* Negro elegante por si falla la imagen */
    color: white;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Controles (Buscador + Total) */
.promo-controls {
    display: flex;
    gap: 10px;
    width: 100%;
    box-sizing: border-box !important; /* Evita desbordamiento horizontal */
}

#promo-search-input {
    flex: 1;
    padding: 10px 15px;
    border-radius: 8px; /* Bordes más suaves, estilo iOS */
    border: none;
    background: rgba(255,255,255,0.15); /* Gris translúcido */
    color: white;
    outline: none;
    font-size: 0.95rem;
    transition: background 0.3s;
}
#promo-search-input:focus {
    background: rgba(255,255,255,0.25);
}

.promo-budget-bar {
    background: #FFC300;
    color: #333;
    font-weight: 800;
    padding: 0 15px;
    border-radius: 8px; /* Coherencia visual */
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 4. CUERPO SCROLLABLE (SOLO VERTICAL) */
#promo-products-grid {
    flex-grow: 1; 
    overflow-y: auto !important; /* Scroll vertical SÍ */
    overflow-x: hidden !important; /* Scroll horizontal MUERTO 🚫 */
    
    overscroll-behavior: contain; 
    -webkit-overflow-scrolling: touch; 
    
    padding: 15px !important;
    background: #f8f9fa; /* Gris muy suave, moderno */
    
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    align-content: start;
    box-sizing: border-box !important; /* Vital para que el padding no sume ancho */
}

/* --- TRUCO: OCULTAR LA BARRA DE SCROLL (PERO MANTENER LA FUNCIÓN) --- */
#promo-products-grid::-webkit-scrollbar {
    width: 6px; /* Muy finita en PC */
}
#promo-products-grid::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 10px;
}
/* En Móvil a veces es mejor ocultarla del todo para limpieza visual */
@media (max-width: 600px) {
    #promo-products-grid::-webkit-scrollbar {
        display: none; 
    }
}


/* =========================================
   🖥️ CORRECCIÓN SCROLL Y TITILEO EN PC
   ========================================= */

/* Aseguramos que el contenedor del modal nunca genere scroll horizontal */
.promo-content {
    /* Forzamos a que el navegador oculte cualquier desbordamiento horizontal */
    overflow-x: hidden !important; 
}

#promo-products-grid {
    /* 1. ESTABILIDAD: Barra vertical siempre visible en PC 
       (Evita que el contenido "salte" o titile cuando aparece/desaparece) */
    overflow-y: scroll !important; 
    
    /* 2. LIMPIEZA: Ocultar barra horizontal a la fuerza */
    overflow-x: hidden !important;
    
    /* 3. MARGEN DE SEGURIDAD: */
    /* A veces la rejilla toca el borde y activa el scroll. Damos 2px de aire */
    width: 100% !important;
    padding-right: 5px !important; /* Espacio para que no se pegue a la barra */
    box-sizing: border-box !important;
    
    /* Corrección de la rejilla para que no se rompa */
    display: grid;
    /* Usamos minmax con cuidado para que entren bien */
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    align-content: start;
}

/* =========================================
   🛒 1. SOLUCIÓN CARRITO (NIVEL DIOS)
   ========================================= */
/* Obligamos al carrito y sus botones a estar SIEMPRE encima del modal */
.cart-sidebar,
.cart-sidebar.active,
.open-cart-button,
#cart-float-btn, 
.cart-floating-badge {
    z-index: 200000 !important; /* 200mil > 100mil del modal */
    position: fixed !important; /* Asegura que no se esconda */
}

/* La cortina oscura del carrito (si la hubiera) */
.cart-overlay {
    z-index: 199999 !important;
}

/* =========================================
   🔔 CORRECCIÓN DE NOTIFICACIONES (ANTI-BLOQUEO)
   ========================================= */

/* 1. EL CONTENEDOR DE ALERTAS */
#toast-container {
    /* Nivel máximo para que se vean sobre el modal y carrito */
    z-index: 200005 !important; 
    
    /* 🔥 LA CLAVE: Permite que el dedo "atraviese" la caja vacía */
    pointer-events: none !important; 
    
    /* Ajuste de posición para móvil (Centrado abajo) */
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
    bottom: 30px !important;
    
    /* Ancho máximo seguro */
    width: 90% !important;
    max-width: 400px !important;
    
    display: flex;
    flex-direction: column-reverse; /* Las nuevas salen abajo */
    align-items: center;
}

/* 2. LA TARJETA DE NOTIFICACIÓN INDIVIDUAL */
.toast {
    /* 🔥 Permite hacer scroll aunque tengas el dedo encima de la alerta */
    pointer-events: none !important; 
    
    /* Diseño más limpio */
    margin-top: 10px !important;
    background: rgba(30, 30, 30, 0.95) !important; /* Fondo oscuro elegante */
    backdrop-filter: blur(4px);
    color: white !important;
    border-radius: 50px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3) !important;
    font-weight: 600 !important;
    text-align: center !important;
    
    /* Animación de entrada rápida */
    animation: fadeInUp 0.3s ease-out forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   ✖️ BOTÓN DE CERRAR MEJORADO (ESTILO APP)
   ========================================= */

/* 1. CONTENEDOR DE LA FILA SUPERIOR */
/* Alinea el título a la izquierda y el botón a la derecha */
.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 15px; /* Espacio antes del buscador */
}

/* 2. EL BOTÓN "X" BURBUJA */
#btn-close-promo-internal {
    /* Tamaño del área táctil (Dedo) */
    width: 40px;
    height: 40px;
    
    /* Forma Circular */
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2); /* Borde sutil */
    
    /* Efecto Vidrio (Glassmorphism) */
    background-color: rgba(255, 255, 255, 0.15); 
    backdrop-filter: blur(4px); /* Difumina lo que haya detrás */
    
    /* Alineación del icono */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Color */
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    
    /* Sombra para que flote */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 3. ESTADO HOVER (PC) */
#btn-close-promo-internal:hover {
    background-color: rgba(230, 0, 0, 0.8); /* Rojo al pasar el mouse */
    border-color: transparent;
    transform: rotate(90deg); /* Pequeña rotación divertida */
}

/* 4. ESTADO ACTIVE (CUANDO LO TOCAS EN MÓVIL) */
#btn-close-promo-internal:active {
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(0.9); /* Efecto de presionar botón */
}

/* Busca esto en ajustes.css (Casi al final) y edítalo */
#promo-modal-title {
    font-size: 2.2rem !important; /* 🔥 AUMENTADO (Antes era 1.3rem) */
    font-weight: 900 !important;   /* Letra extra gruesa */
    text-transform: uppercase;     /* Truco Pro: Mayúsculas se ven más "Temporada" */
    letter-spacing: 1px;           /* Separación para elegancia */
    
    color: white;
    text-shadow: 0 4px 8px rgba(0,0,0,0.5); /* Sombra más fuerte para que resalte */
    
    /* MANTÉN ESTO (Es importante para la alineación) */
    flex: 1; 
    padding-right: 15px;
}

/* =========================================
   🍎 CORRECCIÓN: CONTROLES DE PESO MÓVIL (COMPACTOS)
   (Pegar al final de ajustes.css)
   ========================================= */

   @media (max-width: 600px) {

    /* 1. CONTENEDOR PRINCIPAL DENTRO DE LA TARJETA */
    .weight-controls-wrapper {
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: 100%;
        margin-top: auto; /* Empuja hacia abajo para alinear */
    }

    /* 2. LAS PESTAÑAS (Gramos | Unidades) */
    .weight-tabs {
        display: flex;
        background: #f0f0f0;
        border-radius: 8px;
        padding: 3px;
        gap: 0; /* Pegados */
    }

    .weight-tabs .tab-btn {
        flex: 1; /* Mitad y mitad */
        font-size: 0.7rem !important;
        padding: 4px 0 !important;
        background: transparent;
        color: #777;
        border: none;
        border-radius: 6px;
        font-weight: 600;
        transition: all 0.2s;
    }

    /* Pestaña Activa (Amarilla) */
    .weight-tabs .tab-btn.active {
        background: #fff;
        color: #000;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    /* 3. LA FILA DE INPUT + BOTÓN AGREGAR */
    .weight-controls {
        display: flex !important;
        align-items: center !important;
        gap: 5px !important; /* Espacio pequeño entre input y botón */
        width: 100% !important;
    }

    /* 4. EL INPUT (NUMÉRICO) - Controlamos que no crezca */
    .weight-controls input.weight-input,
    .weight-controls input.unit-input {
        /* Tamaño fijo suficiente para "500" o "12" */
        width: 55px !important; 
        flex: 0 0 auto !important; /* PROHIBIDO CRECER */
        
        height: 38px !important; /* Altura cómoda para el dedo */
        padding: 0 !important;
        text-align: center;
        
        border: 1px solid #ddd !important;
        border-radius: 8px !important; /* Cuadrado redondeado */
        font-size: 1rem !important; /* Letra grande para leer bien */
        font-weight: 700;
        color: #333;
        background: #fff;
    }
    
    /* Efecto al tocar el input */
    .weight-controls input:focus {
        border-color: #FFC300 !important;
        box-shadow: 0 0 0 2px rgba(255, 195, 0, 0.2) !important;
    }

    /* 5. OCULTAR TEXTOS DE RELLENO EN MÓVIL */
    /* Ocultamos el "g", "(aprox)" para que quepa el botón grande */
    .weight-controls span {
        display: none !important;
    }

    /* 6. EL BOTÓN "AGREGAR" (Grande y bonito) */
    .btn-add-weight, 
    .btn-add-units {
        /* Ocupa todo el espacio que sobra a la derecha */
        flex: 1 !important; 
        
        height: 38px !important; /* Misma altura que el input */
        padding: 0 !important;
        margin: 0 !important;
        
        /* Diseño botón */
        background: linear-gradient(135deg, #E60000 0%, #D32F2F 100%) !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important; /* Coherencia visual */
        
        /* Texto */
        font-size: 0.8rem !important;
        font-weight: 800 !important;
        text-transform: uppercase;
        
        /* Centrado */
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 5px;
        
        box-shadow: 0 3px 6px rgba(230, 0, 0, 0.2);
    }

    /* Icono "+" antes del texto Agregar (opcional, visualmente ayuda) */
    .btn-add-weight::before, 
    .btn-add-units::before {
        content: '+';
        font-size: 1.2rem;
        line-height: 0;
        margin-top: -2px;
    }

    /* Efecto de presión */
    .btn-add-weight:active, 
    .btn-add-units:active {
        transform: scale(0.96);
    }
    
    /* 7. TEXTO PEQUEÑO DE AYUDA (Debajo) */
    .input-mode small {
        font-size: 0.65rem !important;
        margin-top: 4px !important;
        color: #888 !important;
        white-space: nowrap; /* Que no salte de línea */
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
/* =========================================
   🖥️ CORRECCIÓN: CONTROLES DE PESO PC (ESCRITORIO)
   (Pegar al final de ajustes.css)
   ========================================= */

   @media (min-width: 601px) {

    /* 1. CONTENEDOR PRINCIPAL */
    .weight-controls-wrapper {
        display: flex;
        flex-direction: column;
        gap: 5px;
        width: 100%;
        margin-top: auto;
    }

    /* 2. PESTAÑAS (Gramos | Unidades) - Estilo limpio */
    .weight-tabs {
        display: flex;
        background: #f4f4f4;
        border-radius: 6px;
        padding: 2px;
        margin-bottom: 2px;
    }

    .weight-tabs .tab-btn {
        flex: 1;
        font-size: 0.7rem !important; /* Letra pequeña y elegante */
        padding: 3px 0 !important;
        background: transparent;
        color: #666;
        border: none;
        border-radius: 4px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
    }

    /* Pestaña Activa */
    .weight-tabs .tab-btn.active {
        background: #fff;
        color: #000;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

    /* 3. ALINEACIÓN HORIZONTAL (Input + Botón) */
    .weight-controls {
        display: flex !important;
        align-items: center !important;
        gap: 5px !important;
        width: 100% !important;
    }

    /* 4. INPUT CONTROLADO (Para que no rompa la tarjeta) */
    .weight-controls input.weight-input,
    .weight-controls input.unit-input {
        width: 50px !important; /* Ancho fijo pequeño */
        flex: 0 0 auto !important; /* No permitimos que crezca */
        
        height: 34px !important; /* Altura estándar PC */
        padding: 0 5px !important;
        text-align: center;
        
        border: 1px solid #ddd !important;
        border-radius: 6px !important; /* Menos redondeado que en móvil */
        font-size: 0.9rem !important;
        color: #333;
    }

    /* Efecto Focus */
    .weight-controls input:focus {
        border-color: #FFC300 !important;
        outline: none;
    }

    /* 5. OCULTAR TEXTOS QUE ESTORBAN ("g", "aprox") */
    .weight-controls span {
        display: none !important;
    }

    /* 6. BOTÓN "AGREGAR" (Ocupa el resto del espacio) */
    .btn-add-weight, 
    .btn-add-units {
        flex: 1 !important; /* Llena el hueco disponible */
        
        height: 34px !important; /* Misma altura que el input */
        padding: 0 !important;
        margin: 0 !important;
        
        background: linear-gradient(135deg, #E60000 0%, #D32F2F 100%) !important;
        color: white !important;
        border: none !important;
        border-radius: 6px !important;
        
        font-size: 0.75rem !important;
        font-weight: 700 !important;
        text-transform: uppercase;
        cursor: pointer;
        
        display: flex !important;
        align-items: center;
        justify-content: center;
        transition: transform 0.1s, box-shadow 0.2s;
    }

    /* Hover en PC */
    .btn-add-weight:hover, 
    .btn-add-units:hover {
        background: linear-gradient(135deg, #ff4d4d 0%, #E60000 100%) !important;
        transform: translateY(-1px);
        box-shadow: 0 3px 8px rgba(230, 0, 0, 0.2);
    }
    
    /* Click */
    .btn-add-weight:active, 
    .btn-add-units:active {
        transform: scale(0.98);
    }

    /* Texto de ayuda inferior */
    .input-mode small {
        display: block;
        font-size: 0.65rem !important;
        color: #999 !important;
        text-align: center;
        margin-top: 3px;
    }
}

/* =========================================
   📦 ESTILO MODAL DE STOCK AGOTADO
   (Pegar al final de ajustes.css)
   ========================================= */

/* 1. LA VENTANA MODAL (Bordes Redondos y Limpieza) */
.swal-stock-popup {
    border-radius: 20px !important;
    padding: 0 0 20px 0 !important;
    overflow: hidden;
    font-family: 'Inter', sans-serif !important;
}

/* 2. EL ENCABEZADO PERSONALIZADO (Icono Animado) */
.stock-header-anim {
    background: #f9f9f9;
    padding: 20px;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}
.stock-icon-bounce {
    font-size: 3.5rem;
    animation: bounceBox 2s infinite;
}
@keyframes bounceBox {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* 3. CAJA DE TEXTO DESTACADA */
.stock-highlight-box {
    background: #fff8e1; /* Fondo crema suave */
    border-left: 5px solid #FFC300; /* Borde amarillo marca */
    padding: 15px;
    margin: 15px 25px;
    border-radius: 0 8px 8px 0;
    text-align: left;
    color: #5d4037;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* 4. EL BOTÓN "ACEPTAR" (Negro Elegante con Hover) */
.btn-swal-black {
    background: #222 !important; /* Negro suave */
    color: white !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 15px 30px !important;
    border-radius: 50px !important; /* Pastilla redonda */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2) !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

.btn-swal-black:hover {
    background: #000 !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3) !important;
}

.btn-swal-black:focus {
    box-shadow: 0 0 0 4px rgba(0,0,0,0.1) !important;
}

/* =========================================
   🛒 CABECERA DEL CARRITO (DISEÑO FINAL PRO)
   (Reemplaza el código anterior con este)
   ========================================= */

/* 1. EL CONTENEDOR ROJO */
#cart-sidebar .cart-header {
    background: linear-gradient(135deg, #D50000 0%, #B71C1C 100%) !important; /* Rojo más elegante */
    padding: 20px 25px !important; /* Más espacio para que respire */
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-bottom: 4px solid #8E0000 !important; /* Borde inferior oscuro para dar profundidad */
    box-shadow: 0 10px 20px rgba(0,0,0,0.15) !important; /* Sombra flotante */
    position: relative;
    z-index: 10;
}

/* 2. EL TÍTULO "TU CANASTA" (Ahora destaca mucho más) */
#cart-sidebar .cart-header h2,
#cart-sidebar .cart-title {
    color: #ffffff !important;
    font-family: 'Poppins', sans-serif !important; /* Fuente moderna */
    font-size: 1.4rem !important; /* Letra más grande */
    font-weight: 900 !important; /* ¡SUPER NEGRITA! */
    text-transform: uppercase !important; /* MAYÚSCULAS */
    letter-spacing: 1px !important; /* Espacio entre letras */
    text-shadow: 2px 2px 0px rgba(0,0,0,0.2) !important; /* Sombra sólida al texto */
    margin: 0 !important;
    
    /* Agregamos el ícono automáticamente con CSS */
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Agrega el ícono de carrito antes del texto automáticamente */
#cart-sidebar .cart-header h2::before,
#cart-sidebar .cart-title::before {
    content: '🛒'; 
    font-size: 1.4rem;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2));
}

/* 3. EL CONTADOR DE ITEMS (La bolita blanca) */
#cart-count,
.cart-count-badge {
    background: #ffffff !important;
    color: #D50000 !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    padding: 4px 10px !important;
    font-size: 0.9rem !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
    margin-left: 10px;
}

/* 4. EL BOTÓN CERRAR "X" (Estilo Botón Flotante) */
button#close-cart-btn,
.close-cart {
    background: rgba(255,255,255,0.2) !important;
    border: 2px solid rgba(255,255,255,0.4) !important;
    color: white !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    font-size: 1.2rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    backdrop-filter: blur(4px);
}

button#close-cart-btn:hover,
.close-cart:hover {
    background: #ffffff !important;
    color: #D50000 !important; /* Rojo al pasar el mouse */
    transform: rotate(90deg) scale(1.1) !important;
    border-color: white !important;
}

/* 5. CORRECCIÓN DE FONDO DE LA LISTA (Por si acaso) */
/* Aseguramos que los productos tengan fondo blanco para que no se pierdan */
#cart-items {
    background-color: #f9f9f9 !important;
    padding-top: 10px !important;
}

/* =========================================
   🛒 CORRECCIÓN: LISTA DE PRODUCTOS (VISIBILIDAD)
   (Pegar al final de ajustes.css)
   ========================================= */

/* 1. EL CONTENEDOR DE LA LISTA */
#cart-items {
    background-color: #f4f4f4 !important; /* Fondo gris claro general */
    padding: 10px !important;
}

/* 2. CADA PRODUCTO (Convertirlo en una tarjeta blanca) */
#cart-items li {
    background-color: #ffffff !important; /* Fondo BLANCO puro */
    color: #333333 !important;            /* Texto OSCURO (para que no se pierda) */
    
    border-radius: 10px !important;       /* Bordes redondeados */
    margin-bottom: 10px !important;       /* Separación entre productos */
    padding: 10px !important;
    
    border: 1px solid #e0e0e0 !important; /* Borde sutil */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important; /* Sombra suave */
    
    /* Flexbox para alinear imagen y texto */
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* 3. EL NOMBRE DEL PRODUCTO (Negrita y Oscuro) */
.cart-item-info strong {
    color: #000000 !important; /* Negro absoluto */
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    display: block;
    margin-bottom: 2px;
}

/* 4. EL PRECIO (Gris oscuro) */
.cart-item-info span {
    color: #666666 !important;
    font-size: 0.85rem !important;
}

/* 5. MENSAJE DE CARRITO VACÍO */
.cart-empty {
    color: #555 !important;
    text-align: center;
    padding: 20px !important;
    font-style: italic;
}

/* =======================================================
   🛒 REDISEÑO HEADER CARRITO MÓVIL (ESTILO "APP PRO")
   (Pegar al final de ajustes.css)
   ======================================================= */

   @media (max-width: 900px) {

    /* 1. EL CONTENEDOR PRINCIPAL (La Hoja) */
    .cart-sidebar.active {
        /* Redondeamos solo arriba para efecto "Cajón" */
        border-radius: 25px 25px 0 0 !important; 
        
        /* Quitamos bordes negros gruesos antiguos si los hubiera */
        border: none !important; 
        border-top: 1px solid rgba(0,0,0,0.05) !important;
        
        /* Sombra suave de alta calidad */
        box-shadow: 0 -10px 40px rgba(0,0,0,0.15) !important;
        
        overflow: hidden !important; /* Para que el header respete los bordes redondos */
    }

    /* 2. EL HEADER (Ahora Blanco y Limpio) */
    #cart-sidebar .cart-header {
        /* Fondo blanco con un degradado sutil imperceptible */
        background: linear-gradient(to bottom, #ff0000, #ff0000) !important;
        padding: 20px 25px 15px 25px !important;
        
        /* Alineación */
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        
        /* Separación sutil del contenido */
        border-bottom: 1px solid #f0f0f0 !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.02) !important;
        
        position: relative; /* Para posicionar la manija */
        min-height: auto !important;
    }

    /* 3. LA "MANIJA" GRIS (Detalle visual de App Móvil) */
    /* Esa barrita gris arriba que indica que es un panel deslizante */
    #cart-sidebar .cart-header::after {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 5px;
        background-color: #e0e0e0;
        border-radius: 10px;
    }

    /* 4. TÍTULO Y SUBTÍTULO (Tipografía Moderna) */
    .cart-text-info {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
    }

    /* Título "Mi Canasta" */
    #cart-sidebar .cart-header h2, 
    #cart-sidebar .cart-title {
        color: #ffffff !important; /* Negro suave */
        font-family: 'Poppins', sans-serif !important;
        font-size: 1.4rem !important;
        font-weight: 800 !important;
        text-transform: capitalize !important; /* Solo primera mayúscula, más elegante */
        letter-spacing: -0.5px !important;
        text-shadow: none !important; /* Quitamos sombras viejas */
        margin: 0 !important;
        
        display: flex !important;
        align-items: center !important;
    }

    /* Icono del Carrito (Ahora rojo para destacar sobre blanco) */
    #cart-sidebar .cart-header h2::before,
    #cart-sidebar .cart-title::before {
        content: '🛍️'; 
        font-size: 1.4rem;
        margin-right: 8px;
        filter: drop-shadow(0 2px 5px rgba(230,0,0,0.2));
    }

    /* Subtítulo pequeño */
    .cart-text-info small {
        color: #888 !important;
        font-size: 0.8rem !important;
        font-weight: 500 !important;
    }

    /* 5. CONTADOR DE ITEMS (Píldora Roja) */
    #cart-count, .cart-count-badge {
        background: #E60000 !important; /* Rojo Marca */
        color: white !important;
        font-size: 0.75rem !important;
        padding: 3px 8px !important;
        border-radius: 50px !important;
        margin-left: 8px !important;
        box-shadow: 0 2px 5px rgba(230, 0, 0, 0.3) !important;
        vertical-align: middle;
        position: relative;
        top: -2px;
    }

    /* 6. BOTÓN CERRAR (Minimalista y Elegante) */
    button#close-cart-btn, 
    .close-cart {
        /* Círculo Gris Claro */
        background-color: #ffb4b4 !important;
        color: #000000 !important;
        border: none !important;
        
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        border-radius: 50% !important;
        
        display: flex !important;
        align-items: center;
        justify-content: center;
        
        font-size: 1.2rem !important;
        margin-left: 10px !important;
        box-shadow: none !important;
        transition: transform 0.2s ease;
    }

    /* Efecto al tocar */
    button#close-cart-btn:active {
        background-color: #E60000 !important; /* Se pone rojo al tocarlo */
        color: white !important;
        transform: scale(0.9);
    }
}

/* =======================================================
   🛒 CORRECCIÓN HEADER MÓVIL (TEXTO CENTRADO + 1 SOLO ÍCONO)
   ======================================================= */

   @media (max-width: 900px) {

    /* 1. CENTRAR TÍTULO Y SUBTÍTULO */
    .cart-text-info {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important; /* Mantenemos a la izquierda para que pegue con el ícono */
        justify-content: center !important;
        gap: 0 !important;
    }

    /* TÍTULO "Mi Canasta" */
    #cart-sidebar .cart-header h2, 
    #cart-sidebar .cart-title {
        /* Eliminamos el ::before que causaba el ícono doble */
        display: block !important; 
        margin: 0 !important;
        text-align: left !important;

        /* --- AGREGA O EDITA ESTAS DOS LÍNEAS: --- */
        font-size: 2.2em !important; /* Antes era más pequeño (aprox 1.4rem) */
        text-shadow: 1px 2px 4px rgba(0,0,0,0.2) !important; /* Sombra suave y elegante */
    }

    /* ELIMINAR EL ÍCONO DUPLICADO (El del lateral derecho del texto) */
    #cart-sidebar .cart-header h2::before,
    #cart-sidebar .cart-title::before {
        content: none !important; /* 🚫 ESTO BORRA EL ÍCONO EXTRA */
        display: none !important;
    }

    /* 2. CENTRAR EL SUBTÍTULO "Productos seleccionados" */
    /* Para que quede alineado visualmente con el título */
    .cart-text-info small {
        width: 100% !important;
        text-align: left !important; /* Alineado al inicio del título */
        margin-left: 2px !important; /* Un pequeño ajuste óptico */
    }
}

/* =======================================================
   TITULO Y SUBTITULO CARRITO MÓVIL (CORRECCIÓN)
   ======================================================= */
   @media (max-width: 900px) {

    /* 1. ALINEAR TODO EL BLOQUE DE TEXTO AL CENTRO */
    .cart-text-info {
        align-items: center !important; /* Centra el subtítulo respecto al título */
        text-align: center !important;
    }

    /* 2. MEJORAR EL SUBTÍTULO "Productos seleccionados" */
    .cart-text-info small {
        color: #ffffff !important;       /* Blanco Puro */
        text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important; /* Sombra negra para contraste */
        font-weight: 500 !important;     /* Letra legible */
        font-size: 0.85rem !important;   
        letter-spacing: 0.5px !important;
        opacity: 0.95 !important;        /* Casi totalmente opaco */
        margin-top: 2px !important;
        display: block !important;
    }
}

/* =======================================================
   🔒 CORRECCIÓN SCROLL: EVITAR QUE SE MUEVA EL FONDO
   (Pegar al final de ajustes.css)
   ======================================================= */

   @media (max-width: 1024px) {
    
    /* 1. Al contenedor principal del carrito */
    .cart-sidebar.active {
        /* Evita que el scroll pase al body cuando llegas al tope */
        overscroll-behavior: contain; 
    }

    /* 2. A la lista de productos (donde haces scroll con el dedo) */
    #cart-items {
        /* Permite scroll suave en iPhone */
        -webkit-overflow-scrolling: touch !important;
        
        /* ATRAPA EL SCROLL: Si llegas al final, ahí se queda */
        overscroll-behavior-y: contain !important; 
        
        /* Le dice al navegador que esta zona es para deslizar verticalmente */
        touch-action: pan-y !important;
    }
}