/* ==========================================================================
   1. VARIABLES Y TIPOGRAFÍA PREMIUM (Estilo Roky's)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@800;900&family=Roboto:wght@400;500;700&display=swap');

:root {
    --color-primario: #0e8a35;  /* verde */
    --color-secundario: #facc15;  /* amarillo */
    --color-acento: #ea580c;  /* color ladrillo */
    --color-fondo: #f8f7f5; /* Gris ultra claro para que resalten las tarjetas blancas */
    --color-texto: #0f172a; /* azul oscuro */
    --color-gris: #64748b;
    --color-borde: #e2e8f0;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}

body { 
    background-color: var(--color-fondo); 
    color: var(--color-texto); 
    overflow-x: hidden; 
    padding-bottom: 80px; 
    font-size: 14px; 
    font-family: 'Roboto', sans-serif; /* Fuente base limpia */
}

body.no-scroll { 
    overflow: hidden !important; 
    height: 100vh !important; 
    touch-action: none; 
}

/* 🟢 LA MAGIA "PALOSECO": Clase maestra para títulos impactantes */
.text-bold-premium, .section-title, .card-title, .cat-tab, .del-label, .sidebar-item, .modal-title, .cart-item-title, .form-title, .checkout-title-main {
    /* font-family: 'Montserrat', sans-serif; */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #000000;
}

/* ==========================================================================
   2. EL NUEVO FLUJO DEL HEADER (Cero choques)
   ========================================================================== */
/* La cabecera principal se vuelve sticky, fluye natural y se pega arriba */
.header-app { 
    position: sticky; 
    top: 0; 
    width: 100%; 
    background: white; 
    z-index: 2000; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.header-top { 
    display: flex; justify-content: space-between; align-items: center; 
    height: 55px; /* Altura fija en móvil */
    padding: 0 15px; max-width: 1200px; margin: 0 auto; 
}

.btn-icon { background: none; border: none; font-size: 24px; color: var(--color-texto); cursor: pointer; }
.logo-mirkos { display: flex; align-items: center; justify-content: center; height: 100%; }
.logo-mirkos img { height: 40px; object-fit: contain; }
.cart-icon-wrapper { position: relative; background: var(--color-secundario); color: #000; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* 🟢 ADIÓS AL PADDING FANTASMA */
.espaciado-top-header { padding-top: 0 !important; }

/* ==========================================================================
   3. BANNERS Y DELIVERY BAR
   ========================================================================== */
.banner-container-pro { width: 100%; max-width: 1400px; margin: 0 auto; }

.delivery-bar-pro {
    background: white; padding: 10px 15px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--color-borde); max-width: 1400px; margin: 0 auto;
}
.del-bloque { display: flex; align-items: center; gap: 8px; }
.del-principal { flex: 2; cursor: pointer; }
.del-rating { flex: 1.2; justify-content: center; }
.del-info { flex: 0; justify-content: flex-end; }
.del-divisor { width: 1px; height: 24px; background-color: #e2e8f0; margin: 0 8px; }
.del-textos { display: flex; flex-direction: column; align-items: flex-start; }
.del-sub { font-size: 0.7rem; font-weight: 600; color: var(--color-gris); line-height: 1.1; font-family: 'Roboto', sans-serif;}
.icono-moto, .icono-tiempo { color: var(--color-acento); font-size: 24px !important; }
.icono-estrella { color: #f59e0b; font-size: 24px !important; }
.info-link { color: #565656; display: flex; align-items: center; justify-content: center; text-decoration: none; background: #f1f5f9; padding: 4px; border-radius: 50%; }

@media (max-width: 400px) {
    .delivery-bar-pro { padding: 8px 10px; }
    .del-bloque { gap: 5px; }
    .del-label { font-size: 0.78rem; }
    .del-sub { font-size: 0.65rem; }
    .icono-tiempo, .icono-estrella { font-size: 20px !important; }
}

/* ==========================================================================
   4. CONTENEDOR PRINCIPAL Y CATEGORÍAS (Menú One-Page)
   ========================================================================== */
.main-content { min-height: 100vh; max-width: 1400px; margin: 0 auto; }
html { scroll-behavior: smooth; }

/* 🟢 FIX: OBLIGAMOS A LA BARRA DE CATEGORÍAS A PEGARSE EXACTO DEBAJO DEL HEADER */
.main-content > div[style*="position: sticky"] {
    top: 55px !important; /* Altura del header móvil */
    z-index: 1990 !important;
}

.scroll-horizontal { display: flex; overflow-x: auto; gap: 30px; padding: 0 5px 5px 5px; scroll-behavior: smooth; }
.scroll-horizontal::-webkit-scrollbar { display: none; }
.cat-tab { font-size: 17px; padding-bottom: 5px; cursor: pointer; transition: color 0.2s, border-bottom 0.2s; white-space: nowrap; }
.cat-tab.active { color: var(--color-acento); border-bottom: 3px solid var(--color-acento); }

.seccion-categoria-bloque {
    padding: 25px 15px; margin-bottom: 20px;
    scroll-margin-top: 130px; /* Evita que el header tape el título al hacer scroll */
}
.section-title { font-size: 1.2rem; padding: 20px; line-height: 1.2; padding: 20px;}



/* ==========================================================================
   EFECTO RIPPLE (MATERIAL DESIGN)
   ========================================================================== */
button { position: relative; overflow: hidden; isolation: isolate; }
.ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.4); transform: translate(-50%, -50%) scale(0); pointer-events: none; z-index: 10; animation: ripple-wave 600ms linear forwards; }
@keyframes ripple-wave { 0% { transform: translate(-50%, -50%) scale(0); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; } }


/* ==========================================================================
   5. TARJETAS DE PRODUCTO (Rediseño Estilo Franquicia)
   ========================================================================== */
.grid-productos { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.card-producto { 
    display: flex; flex-direction: column; background: white; border-radius: 12px; cursor: pointer; overflow: hidden; 
    transition: transform 0.2s, box-shadow 0.2s; 
}
.card-producto:active { transform: scale(0.98); }

.card-img-wrapper { width: 100%; aspect-ratio: 1/1; background: #f1f5f9; overflow: hidden; }
.card-img { width: 100%; height: 100%; object-fit: cover; }
.card-info-container { padding: 12px; display: flex; flex-direction: column; flex-grow: 1; }
.card-title { font-size: 0.85rem; line-height: 1.2; margin-bottom: 6px; }
.card-desc { font-size: 0.75rem; color: var(--color-gris); line-height: 1.3; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { font-size: 1.05rem; font-weight: 800; color: var(--color-acento); margin-bottom: 10px; margin-top: auto; font-family: 'Montserrat', sans-serif;}

.btn-agregar { 
    background: var(--color-primario); color: rgb(250 229 70/var(--tw-text-opacity)); --tw-text-opacity: 1; border: none; width: 100%; padding: 8px; border-radius: 8px; 
    font-size: 0.85rem; font-weight: 600; cursor: pointer; pointer-events: none; 
}

@media (max-width: 767px) {
    .card-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; width: 100%; }
}

/* =======================================================
   🟢 REDISEÑO MÓVIL: Tarjetas "Más Vendidos" (Horizontales)
   ======================================================= */
/*
@media (max-width: 767px) {
    // 1. Cambiamos la tarjeta a fila horizontal y le damos un ancho fijo para el carrusel
    #contenedor-mas-vendidos .card-producto { flex-direction: row; height: 120px; min-width: 280px; }
    
    // 2. La imagen se vuelve un cuadrado perfecto a la izquierda
    #contenedor-mas-vendidos .card-img-wrapper { width: 120px; height: 100%; border-radius: 12px 0 0 12px; flex-shrink: 0; }
    
    // 3. Ajustamos el contenedor de texto
    #contenedor-mas-vendidos .card-info-container { padding: 10px; justify-content: center; }
    
    // 4. ¡ADIÓS DESCRIPCIÓN! (Solo en esta sección)
    #contenedor-mas-vendidos .card-desc { display: none !important; }
    
    // 5. Ajustes finos de tipografía y espaciados para el nuevo tamaño
    #contenedor-mas-vendidos .card-title { font-size: 0.9rem; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 6px; }
    #contenedor-mas-vendidos .card-price { font-size: 1rem; margin-bottom: 6px; margin-top: 0; }
    #contenedor-mas-vendidos .btn-agregar { padding: 6px; font-size: 0.8rem; }
}
*/

/* =======================================================
   🟢 REDISEÑO MÓVIL: Tarjetas "Más Vendidos" (Verticales Compactas)
   ======================================================= */
@media (max-width: 767px) {
    /* 1. Ocultamos la descripción exclusivamente en esta sección */
    #contenedor-mas-vendidos .card-desc { display: none !important; }
    
    /* 2. Le damos un ancho ideal para que entren unas 2 tarjetas en pantalla, manteniendo la imagen grande */
    #contenedor-mas-vendidos .card-producto { min-width: 160px; max-width: 190px; flex: 0 0 auto; }
    
    /* 3. Ajustes finos para que el título y precio se vean prolijos sin la descripción */
    #contenedor-mas-vendidos .card-title { font-size: 0.9rem; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 8px; }
    #contenedor-mas-vendidos .card-price { font-size: 1.05rem; margin-bottom: 10px; margin-top: auto; }
}

/* =======================================================
   🟢 FIX CARRUSEL: Scroll Nativo a prueba de bugs
   ======================================================= */
#grid-mas-vendidos { display: flex; flex-wrap: nowrap; overflow-x: auto; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; gap: 15px; scrollbar-width: none; }
/* Oculta la barra de scroll en Chrome/Safari/Edge */
#grid-mas-vendidos::-webkit-scrollbar { display: none; }

/* ==========================================================================
   6. ADAPTACIÓN A PANTALLAS GRANDES (ESCRITORIO)
   ========================================================================== */
@media (min-width: 768px) {
    /* Header más alto */
    .header-top { height: 70px !important; padding: 0 30px; }
    .logo-mirkos img { height: 50px; }
    
    /* Categorías se pegan a los 70px del header */
    .main-content > div[style*="position: sticky"] { top: 70px !important; }
    .seccion-categoria-bloque { scroll-margin-top: 150px; padding-left: 30px; padding-right: 30px; --tw-bg-opacity: 1; background: rgb(255 255 255 / var(--tw-bg-opacity)); border-radius: 10px; }
    
    /* Grilla de productos (Estilo Lista Horizontal Limpia) */
    .grid-productos { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .card-producto:hover { transform: translateY(-3px); }
    
    .card-producto {
        display: grid !important;
        grid-template-columns: 140px 1fr !important;
        grid-template-rows: auto auto 1fr auto;
        grid-template-areas: "img title" "img desc" "img spacer" "img price-btn";
        gap: 0 15px; align-items: start;
    }
    
    .card-img-wrapper { grid-area: img; margin-bottom: 0; width: 140px; height: 100%; border-radius: 12px 0 0 12px;}
    .card-info-container { display: contents; }
    .card-title { grid-area: title; margin-bottom: 0; font-size: 1rem; padding-top: 15px; }
    .card-desc { grid-area: desc; margin-bottom: 0; font-size: 0.8rem; padding-right: 15px;}
    .price-btn-group { grid-area: price-btn; display: flex; justify-content: space-between; align-items: center; padding: 0 15px 15px 0; width: 100%;}
    .card-price { margin-bottom: 0; font-size: 1.15rem; }
    .btn-agregar { width: auto; padding: 8px 20px; }
}

@media (min-width: 1024px) {
    .grid-productos { grid-template-columns: repeat(3, 1fr); gap: 25px; }
}

/* ==========================================================================
   7. ZONA BLINDADA: CHECKOUT, CARRITO, MODALES Y SIDEBAR
   (No se ha alterado la lógica, solo heredan la tipografía nueva automáticamente)
   ========================================================================== */

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: white !important; z-index: 3000; display: none; opacity: 0; transition: opacity 0.3s ease; overflow: hidden; }
.modal-overlay.show { display: block; opacity: 1; }
.bottom-sheet { background: white; width: 100%; height: 100dvh !important; max-width: 100% !important; border-radius: 0 !important; position: relative; display: flex; flex-direction: column; overflow-y: auto; }
.modal-header-movil { position: sticky; top: 0; z-index: 20; background: white; display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; border-bottom: 1px solid #f1f5f9; flex-shrink: 0; }
.btn-icon-header { background: transparent; border: none; color: #475569; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 4px; }
.modal-img-wrapper { width: 100%; aspect-ratio: 1 / 1; background: #f1f5f9; display: flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative; overflow: hidden; }
#modal-img, .modal-img-wrapper img { width: 100% !important; object-fit: cover !important; object-position: center; }
.modal-body { padding: 20px; flex: 1; display: flex; flex-direction: column; overflow-y: visible; padding-bottom: 40px; } 
.modal-title { font-size: 1.3rem; margin-bottom: 5px; }
.modal-desc { font-size: 0.89rem; color: #191919; line-height: 1.5; margin-bottom: 20px; font-family: 'Roboto', sans-serif;}
.textarea-comentarios { width: 100%; padding: 14px 16px; border: 1px solid var(--color-borde); border-radius: 10px; resize: none; font-family: inherit; font-size: 1rem; min-height: 50px; background: #f8fafc; transition: all 0.3s; }
.textarea-comentarios:focus { background: white; border-color: var(--color-primario); outline: none; }
.modal-sticky-footer { position: sticky; bottom: 0; z-index: 20; width: 100%; background: white; padding: .75rem 0; box-shadow: 0 -10px 25px rgba(0,0,0,0.06); border-top: 1px solid var(--color-borde); }
.modal-footer-content { display: flex; gap: 35px; align-items: center; width: 100%; padding: 0 2rem; }
.control-cantidad { display: flex; align-items: center; gap: 10px; background: transparent; padding: 0; border: none; }
.btn-qty { background: white; border: 1px solid #cbd5e1; color: var(--color-primario); font-size: 22px; cursor: pointer; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,0.05); touch-action: manipulation; transition: all 0.1s ease-out; font-family: 'Montserrat', sans-serif; font-weight: 800;}
.btn-qty:active { transform: scale(0.92); background: #fed7aa !important; border-color: var(--color-primario); }
.qty-numero { font-size: 1.25rem; min-width: 20px; text-align: center; font-family: 'Montserrat', sans-serif; font-weight: 800;}
.btn-agregar-final { flex: 1; background: var(--color-primario); color: rgb(250 229 70); border: none; padding: 12px; border-radius: 10px; font-size: 16px; cursor: pointer; display: flex; justify-content: space-between; transition: background 0.2s; align-items: center;  font-weight: 600;}
.btn-agregar-final:hover { background: #0b6b29; }

@media (min-width: 768px) {
    .modal-overlay { align-items: center; justify-content: center; display: none; background: var(--color-fondo) !important; padding: 0 !important; }
    .bottom-sheet { flex-direction: row; height: 100vh !important; max-width: 1200px !important; margin: 0 auto; border-left: 1px solid var(--color-borde); border-right: 1px solid var(--color-borde); box-shadow: none !important; }
    .modal-header-movil { position: absolute; right: 20px; top: 20px; background: #f1f5f9 !important; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: none !important; z-index: 100; }
    .btn-volver-movil { display: none; } 
    .modal-img-wrapper { width: 50%; height: 100%; aspect-ratio: auto; max-height: none; background: #f1f5f9; padding: 0; }
    .modal-body { width: 50%; padding: 40px; padding-bottom: 120px; overflow-y: auto; }
    .modal-sticky-footer { position: absolute; width: 50%; left: 50%; bottom: 0; padding: 20px 40px; }
}

/* Modificadores y Extras */
.mod-grupo { margin-bottom: 20px; }
.mod-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.mod-titulo { font-size: 0.95rem; font-weight: 700; color: #1e293b; font-family: 'Roboto', sans-serif;}
.badge-obligatorio { background: #fee2e2; color: #ef4444; font-size: 0.65rem; padding: 3px 8px; border-radius: 4px; font-weight: 700; }
.badge-opcional { background: #f1f5f9; color: #64748b; font-size: 0.65rem; padding: 3px 8px; border-radius: 4px; font-weight: 700; }
.opciones-grid { display: flex; flex-direction: column; gap: 1px; background: #e2e8f0; border-radius: 10px; overflow: hidden; border: 1px solid #e2e8f0; }
.opcion-item { display: flex; align-items: center; gap: 12px; padding: 14px; background: white; cursor: pointer; transition: background 0.2s; position: relative; }
.opcion-item:active { background: #f8fafc; }
.opcion-item input { position: absolute; opacity: 0; }
.opcion-info { flex: 1; display: flex; justify-content: space-between; align-items: center; }
.opcion-nombre { font-size: 0.9rem; color: #334155; font-weight: 500; font-family: 'Roboto', sans-serif;}

/* 🟢 FIX MÓVIL: Precio debajo del nombre en extras múltiples */
@media (max-width: 767px) {
    .opcion-item-multi .opcion-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px; /* Pequeño espacio entre nombre y precio */
    }
    
    /* Le quitamos el padding derecho al precio en móvil para que quede alineado a la izquierda */
    .opcion-item-multi .opcion-precio {
        padding-right: 0 !important;
        font-size: 0.8rem !important; /* Un poco más pequeño para jerarquía visual */
    }
}


.opcion-precio { font-size: 0.85rem; font-weight: 700; padding-right: 10px; color: var(--color-primario); }
.custom-radio, .custom-check { width: 20px; height: 20px; border: 2px solid #cbd5e1; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.opcion-item input:checked ~ .custom-radio, .opcion-item input:checked ~ .custom-check { border-color: var(--color-primario); background: var(--color-primario); }
.opcion-item input:checked ~ .custom-radio::after { content: ''; width: 8px; height: 8px; background: white; border-radius: 50%; }
.opcion-item input:checked ~ .custom-check::after { content: 'L'; transform: rotate(45deg) scaleX(-1); color: white; font-weight: bold; font-size: 11px; margin-bottom: 2px;}
.opcion-item-multi { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; background: white; border-bottom: 1px solid #f1f5f9; }
.btn-add-extra-init { background: white; border: 1.5px solid #ef4444; color: #ef4444; width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; padding: 0; }
.btn-add-extra-init:active { background: #fef2f2; transform: scale(0.9); }
.extra-counter-active { display: flex; align-items: center; gap: 8px; background: white; border: 1px solid #e2e8f0; border-radius: 8px; padding: 2px; }
.btn-extra-ctrl { background: #ef4444; border: none; color: white; width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.1s; padding: 0; }
.btn-extra-ctrl:active { transform: scale(0.9); }
.btn-extra-ctrl.btn-minus-extra { background: #f1f5f9; color: #ef4444; }
.extra-qty-val { font-weight: 800; font-size: 0.95rem; min-width: 20px; text-align: center; color: #0f172a;}

/* Carrito y Sidebar */
.checkout-screen { position: fixed; top: 0; left: 100%; width: 100%; height: 100vh; height: 100dvh; background: var(--color-fondo); z-index: 2000; transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1); display: block !important; overflow-y: auto !important; overflow-x: hidden !important; overscroll-behavior: auto !important; -webkit-overflow-scrolling: touch; touch-action: auto; }
#checkout-paso-1, #checkout-paso-2 { height: auto !important; min-height: 100%; }
.escudo-teclado-ios { position: fixed; top: -50vh; left: 0; width: 100vw; height: 200vh; background: var(--color-fondo); z-index: 1995; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 0.3s ease; }
.checkout-screen.show + .escudo-teclado-ios { opacity: 1; visibility: visible; }
.cart-sidebar { 
    position: fixed; 
    top: 0; 
    bottom: 0; 
    right: -500px; 
    width: 100%; 
    max-width: 400px; 
    background: white; 
    z-index: 3001 !important; /* Tapará el header que tiene 2000 */
    transition: right 0.3s cubic-bezier(0.175, 0.885, 0.32, 1); 
    display: flex; 
    flex-direction: column; 
    box-shadow: -5px 0 25px rgba(0,0,0,0.15); 
}
.cart-sidebar.show { right: 0; }
.cart-header { flex-shrink: 0; 
    border-bottom: 1px solid var(--color-borde); 
    position: sticky; /* Se asegura de que la cabecera del carrito no se mueva */
    top: 0;
    z-index: 10;
    background: white; }
.cart-body { flex: 1; overflow-y: auto; padding: 10px; }
#cart-overlay {background: rgba(15, 23, 42, 0.6) !important; 
    z-index: 3000 !important; /* Justo debajo del panel del carrito */}
.cart-footer { flex-shrink: 0; padding: 10px 15px; border-top: 1px solid var(--color-borde); background: white; box-shadow: 0 -4px 15px rgba(0,0,0,0.05); z-index: 10; }
.cart-item { display: flex; gap: 12px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid var(--color-borde); }
.cart-item-img { width: 65px; height: 65px; border-radius: 10px; object-fit: cover; background: #f1f5f9; }
.cart-item-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.cart-item-sub { font-size: 0.85rem; color: var(--color-gris); margin-bottom: 2px; font-weight: 500; font-family: 'Roboto', sans-serif;}
.cart-item-price { font-weight: 500; color: var(--color-texto); font-size: 0.95rem; }
.btn-eliminar { background: none; border: none; color: #ef4444; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 5px; border-radius: 6px; transition: background 0.2s; height: max-content; }

/* Animaciones de Error */
@keyframes zumbido { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.error-shake { animation: zumbido 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; background-color: #fef2f2 !important; border-radius: 10px; padding: 4px; box-shadow: 0 0 0 1px #ef4444 inset; transition: background-color 0.3s; }
.input-error { border-color: #ef4444 !important; background-color: #fef2f2 !important; transition: all 0.3s ease; }
@keyframes saltoLlamativo { 0%, 100% { transform: translateY(0) scale(1); } 30% { transform: translateY(-6px) scale(1.15); } 50% { transform: translateY(0) scale(1); } 70% { transform: translateY(-3px) scale(1.05); } 80% { transform: translateY(0) scale(1); } }
.badge-animado { animation: saltoLlamativo 2.5s infinite ease-in-out; box-shadow: 0 2px 5px rgba(234, 88, 12, 0.5); }
@keyframes ondaEstado { 0% { transform: scale(1); opacity: 0.55; } 70% { transform: scale(2.8); opacity: 0; } 100% { transform: scale(3.1); opacity: 0; } }

/* Menú Lateral */
.sidebar-menu { position: fixed; top: 0; left: -320px; width: 270px; max-width: 85vw; height: auto; max-height: 85dvh; border-radius: 0 0 24px 0; background: white; z-index: 4000; transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1); display: flex; flex-direction: column; box-shadow: 4px 4px 25px rgba(0,0,0,0.15); }
.sidebar-menu.show { left: 0; }
.sidebar-header { padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--color-borde); }
.sidebar-body { flex: 1; overflow-y: auto; padding-bottom: 15px; }
.sidebar-item { padding: 13px 18px; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; cursor: pointer; transition: all 0.2s; }
.sidebar-item:active { background: #f8fafc; }
.sidebar-item.active { color: var(--color-acento); border-left: 4px solid var(--color-acento); padding-left: 14px; background: #fff7ed; }
#sidebar-overlay { background: rgba(15, 23, 42, 0.6) !important; }

/* Modales Promos */
.modal-promo-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(15, 23, 42, 0.75); z-index: 999999; display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(3px); animation: fadeInPromo 0.3s ease-out forwards; }
.modal-promo-content { background: white; width: 100%; max-width: 450px; border-radius: 20px 20px 0 0; padding: 24px; box-sizing: border-box; position: relative; box-shadow: 0 -10px 25px rgba(0,0,0,0.15); animation: slideUpPromo 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@media (min-width: 500px) { .modal-promo-overlay { align-items: center; } .modal-promo-content { border-radius: 20px; } }
.btn-cerrar-promo { position: absolute; top: 15px; right: 15px; background: #f1f5f9; border: none; border-radius: 50%; width: 32px; height: 32px; font-size: 26px; color: #28292b; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.promo-header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; padding-right: 30px;}
.promo-icon-header { color: #ea580c; font-size: 28px; background: #fff7ed; padding: 8px; border-radius: 12px; }
.promo-monto { font-size: 1.8rem; font-weight: 900; color: #ea580c; text-align: center; margin-bottom: 20px; font-family: 'Montserrat', sans-serif;}
.promo-reglas-lista { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.promo-regla-item { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; color: #475569; background: #f8fafc; padding: 10px 15px; border-radius: 10px; font-family: 'Roboto', sans-serif;}
.promo-instruccion { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; padding: 12px 15px; border-radius: 10px; font-size: 0.85rem; line-height: 1.4; margin-bottom: 20px; }
.promo-codigo-caja { background: #fff7ed; border: 2px dashed #fdba74; padding: 15px 20px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: background 0.2s; }
.promo-codigo-caja:active { background: #ffedd5; }
@keyframes fadeInPromo { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUpPromo { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fadeOutPromo { from { opacity: 1; } to { opacity: 0; } }
@keyframes slideDownPromo { from { transform: translateY(0); } to { transform: translateY(100%); } }
.modal-promo-overlay.cerrando { animation: fadeOutPromo 0.3s ease forwards !important; }
.modal-promo-overlay.cerrando .modal-promo-content { animation: slideDownPromo 0.3s ease forwards !important; }

/* Letrero Abierto/Cerrado */
.estado-local-pill { display: inline-flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid #e5e7eb; background: #ffffff; color: #0f172a; font-size: 0.93rem; font-weight: 600; transition: all 0.25s ease; }
.estado-dot-wrap { position: relative; width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.estado-dot { width: 10px; height: 10px; border-radius: 50%; position: relative; z-index: 2; }
.estado-wave { position: absolute; width: 10px; height: 10px; border-radius: 50%; z-index: 1; opacity: 0; }
.estado-icono { font-size: 18px; line-height: 1; }
.estado-texto { white-space: nowrap; }
.estado-local-pill.abierto { background: #f8fffb; border-color: #bbf7d0; color: #166534; }
.estado-local-pill.abierto .estado-dot { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12); }
.estado-local-pill.abierto .estado-wave { background: rgba(34, 197, 94, 0.30); animation: ondaEstado 1.8s ease-out infinite; }
.estado-local-pill.abierto .estado-icono { color: #ff265e; }
.estado-local-pill.cerrado { background: #fff8f8; border-color: #fecaca; color: #991b1b; }
.estado-local-pill.cerrado .estado-dot-wrap { display: none; }
.estado-local-pill.cerrado .estado-icono { color: #dc2626; }

/* ==========================================================================
   8. CHECKOUT MÓVIL Y DESKTOP (INTACTO SEGÚN TUS ÓRDENES)
   ========================================================================== */
.checkout-header { padding: 12px 15px; position: sticky; top: 0; background: white; z-index: 2001; border-bottom: 1px solid var(--color-borde); display: flex; align-items: center; gap: 15px; }
.checkout-screen.show { left: 0; }
.form-section { background: #FFFFFF; padding: 10px; margin-bottom: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.02); /*border: 1px solid #bae6fd; */}
.radio-group { display: flex; gap: 10px; margin-bottom: 15px; }
.radio-btn { flex: 1; text-align: center; padding: 12px; border: 1px solid var(--color-borde); border-radius: 8px; font-weight: 700; font-size: 0.85rem; cursor: pointer; color: var(--color-texto); background: white; transition: all 0.2s; }
.radio-btn.active { background: #ff0202; color: white; }
.input-group { margin-bottom: 15px; }
.input-group label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--color-gris); margin-bottom: 6px; } 
.input-control { width: 100%; padding: 14px; border: 1px solid var(--color-borde); border-radius: 10px; font-size: 0.95rem; font-family: 'Roboto', sans-serif; transition: border 0.3s; background: #f8fafc; }
.input-control:focus { outline: none; border-color: var(--color-primario); background: white; }
#checkout-paso-1 .radio-group { position: sticky; top: 61px; background: var(--color-fondo); padding: 10px 20px; margin: 0 -20px 15px -20px; z-index: 2000; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
#lista-predicciones { box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important; border-top: none !important; }

@media (max-width: 767px) {
    #checkout-paso-2 { display: flex; flex-direction: column; gap: 6px !important; }
    .seccion-categoria-bloque { background: rgb(255 255 255 / var(--tw-bg-opacity)); --tw-bg-opacity: 1;  padding: 0 15px !important; border-radius: 0 !important; margin-bottom: 0 !important; }
    .form-section { margin-bottom: 5px; }
    #resumen-ubicacion-paso2 { background: #f0fdf4 !important; border: 1px dashed #22c55e !important; padding: 10px 12px !important; border-radius: 8px !important; position: relative; margin-bottom: 5px !important; }
    #resumen-ubicacion-paso2 span { font-size: 0.7rem !important; color: #64748b !important; }
    #resumen-ubicacion-paso2 #texto-resumen-direccion { font-size: 0.85rem !important; font-weight: 600 !important; color: #166534 !important; line-height: 1.3; }
    #contenedor-resumen-checkout { background: white !important; border-radius: 8px !important; border: 1px solid #f1f5f9 !important; margin-bottom: 5px; }
    #contenedor-resumen-checkout div[onclick="toggleResumenCheckout()"] { padding: 10px 12px !important; }
    #contenedor-resumen-checkout div[onclick="toggleResumenCheckout()"] span[style*="font-weight: 800; color: #ea580c;"] { font-size: 1rem !important; }
    #cuerpo-resumen-checkout div[style*="border-bottom: 1px dashed #e2e8f0;"] { padding: 6px 0 !important; border-bottom: 1px solid #f1f5f9 !important; }
    #cuerpo-resumen-checkout div[style*="font-weight: 700; font-size: 0.95rem;"] { font-size: 0.82rem !important; font-weight: 600 !important; }
    #cuerpo-resumen-checkout div[style*="font-weight: 800; color: #0f172a;"] { font-size: 0.85rem !important; }
    #cuerpo-resumen-checkout button[onclick*="eliminarDesdeCheckout"] { width: 24px !important; height: 24px !important; border-radius: 6px !important; }
    #cuerpo-resumen-checkout button[onclick*="eliminarDesdeCheckout"] span { font-size: 16px !important; }
    #cuerpo-resumen-checkout div[style*="border-top: 2px solid #f1f5f9;"] { padding-top: 8px !important; margin-top: 8px !important; }
    #cuerpo-resumen-checkout div[style*="font-size: 1.2rem;"] { font-size: 1rem !important; }
    .input-group { margin-bottom: 8px !important; }
    .input-group label { font-size: 0.75rem !important; font-weight: 700 !important; color: #2d2b31 !important; margin-bottom: 3px !important; }
    .input-control { padding: 10px !important; font-size: 0.88rem !important; border-radius: 6px !important; border: 1px solid #cbd5e1 !important; background: #f8fafc !important; }
    #container-celular { border-radius: 6px !important; border: 1px solid #cbd5e1 !important; }
    #chk-pais { font-size: 0.85rem !important; padding: 0 6px !important; }
    #chk-celular { padding: 10px !important; font-size: 0.88rem !important; }
    #checkout-total-final { padding: 14px !important; font-size: 1rem !important; border-radius: 8px !important; }
}

@media (min-width: 768px) {
    #checkout-paso-1 .checkout-content-wrapper { max-width: 600px; margin: 40px auto; background: white; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.08); border: 1px solid var(--color-borde); overflow: hidden; }
    .checkout-paso-2-grid { max-width: 1000px; margin: 40px auto; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 0 !important; align-items: start; }
    .checkout-btn-wrapper { position: sticky; bottom: 0; left: 0; width: 100%; padding: 15px 50px; background: white; box-shadow: 0 -4px 15px rgba(0,0,0,0.08); z-index: 9999; }
    .chk-col-resumen { position: relative !important; top: auto !important; }
    #checkout-paso-2 { background: transparent !important; padding-bottom: 40px !important; }
}


/* ================= CARRUSEL DE BANNERS PROMOCIONALES ================= */
.carrusel-banners-wrapper { width: 100%; max-width: 1200px; margin: 15px auto 5px auto; overflow: hidden; position: relative; }
.carrusel-banners { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; gap: 12px; padding: 0 15px 10px 15px; -webkit-overflow-scrolling: touch; }
.carrusel-banners::-webkit-scrollbar { display: none; }
.banner-item { flex: 0 0 90%; scroll-snap-align: center; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.08); cursor: pointer; transition: transform 0.2s; }
.banner-item:active { transform: scale(0.98); }
.banner-item img { width: 100%; height: 100%; aspect-ratio: 21/9; object-fit: cover; display: block; }
@media (min-width: 768px) { .banner-item { flex: 0 0 calc(50% - 6px); scroll-snap-align: start; } .banner-item img { aspect-ratio: 16/7; } }


/* =======================================================
   🔥 ACTUALIZACIÓN PRO: CARRUSEL HORIZONTAL INTELIGENTE (Híbrido PC/Móvil)
   ======================================================= */
.carrusel-mas-vendidos { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 10px; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; }
.carrusel-mas-vendidos::-webkit-scrollbar { display: none; }
.carrusel-mas-vendidos .card-producto { flex: 0 0 auto; width: 200px; }
@media (min-width: 768px) { .carrusel-mas-vendidos .card-producto { width: 420px; } }
.btn-nav-mv:hover { background: #f1f5f9 !important; transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important; }
.btn-nav-mv:active { transform: scale(0.92); }

/* ==========================================================================
   UX CHECKOUT PANTALLAS GRANDES (PC / TABLET)
   ========================================================================== */
.checkout-centro { max-width: 1100px; margin: 0 auto; width: 100%; box-sizing: border-box; }

@media (min-width: 992px) {
  .checkout-dos-columnas { display: grid !important; grid-template-columns: 1.2fr 1fr; grid-template-areas: "ubicacion resumen" "formularios resumen"; gap: 20px 40px; align-items: start; padding-bottom: 0 !important; }
  #bloque-ubicacion { grid-area: ubicacion; }
  #bloque-formularios { grid-area: formularios; }
  #bloque-resumen { grid-area: resumen; position: sticky; top: 90px; }
  .checkout-btn-wrapper { position: static !important; padding: 20px 0 40px 0 !important; box-shadow: none !important; background: transparent !important; width: 100%; max-width: 1100px; margin: 0 auto; display: grid !important; grid-template-columns: 1.2fr 1fr; gap: 40px; }
  .checkout-btn-wrapper button { grid-column: 1 / 2; margin: 0 !important; width: 100% !important; max-width: none !important; }
  #cuerpo-resumen-checkout { display: block !important; } 
  #icono-resumen-checkout { display: none !important; } 
}


/* ==========================================================================
   MODAL MINIMALISTA DE ELIMINACIÓN (CHECKOUT)
   ========================================================================== */
#modal-confirmar-eliminar { background: rgba(15, 23, 42, 0.65) !important; opacity: 0; transition: opacity 0.2s ease; }
#modal-confirmar-eliminar.show-mini { opacity: 1; }
.modal-minimalista { background: white; border-radius: 16px; padding: 24px; width: 90%; max-width: 320px; text-align: center; box-shadow: 0 10px 25px rgba(0,0,0,0.1); transform: scale(0.95); opacity: 0; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
.modal-overlay.show-mini .modal-minimalista { transform: scale(1); opacity: 1; }
.icono-alerta { color: #f59e0b; margin-bottom: 8px; }
.icono-alerta span { font-size: 48px; }
.modal-minimalista h3 { font-size: 1.1rem; font-weight: 800; color: #1e293b; margin-bottom: 8px; font-family: 'Montserrat', sans-serif; }
.modal-minimalista p { font-size: 0.9rem; color: #64748b; line-height: 1.4; margin-bottom: 20px; }
.modal-mini-botones { display: flex; gap: 10px; width: 100%; }
.btn-mini-cancelar { flex: 1; background: #f1f5f9; color: #475569; font-size: 14px; border: none; padding: 12px 0; border-radius: 10px; font-weight: 700; cursor: pointer; transition: background 0.2s; }
.btn-mini-cancelar:active { background: #e2e8f0; }
.btn-mini-confirmar { flex: 1; background: #fee2e2; color: #ef4444; border: font-size: 14px; none; padding: 12px 0; border-radius: 10px; font-weight: 700; cursor: pointer; transition: background 0.2s; }
.btn-mini-confirmar:active { background: #fecaca; }


/* =======================================================
   🎁 OFERTAS WEB: CARRUSEL HERO (Móvil + PC)
   ======================================================= */
.hero-slider-contenedor { position: relative; width: 100%; overflow: hidden; border-radius: 0px; background: #f8fafc; }
.hero-slider-track { display: flex; width: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; align-items: flex-start; }
.hero-slider-track::-webkit-scrollbar { display: none; }
.hero-slide { flex: 0 0 100%; max-width: 100%; width: 100%; scroll-snap-align: center; position: relative; cursor: pointer; aspect-ratio: 1 / 1; overflow: hidden; }
.hero-slide.sin-link { cursor: default; }
.hero-slide picture { display: block; width: 100%; height: 100%; line-height: 0; }
.hero-slide img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; padding: 0; border: none; }
.btn-hero-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.95); border: none; width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; color: #1e293b; box-shadow: 0 4px 8px rgba(0,0,0,0.15); transition: all 0.2s; }
.btn-hero-nav:hover { background: white; transform: translateY(-50%) scale(1.1); color: #ea580c; }
.btn-hero-nav.prev { left: 10px; }
.btn-hero-nav.next { right: 10px; }
.hero-slider-dots { position: absolute; bottom: 12px; left: 0; width: 100%; display: flex; justify-content: center; gap: 8px; z-index: 10; }
.hero-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.3s; border: 1px solid rgba(0,0,0,0.2); }
.hero-dot.activo { background: #ea580c; transform: scale(1.3); box-shadow: 0 0 5px rgba(0,0,0,0.3); border-color: white; }

/* 🟢 RESPONSIVE PC: La caja cambia a proporción 5:1 (Ultra-Panorámica) */
@media (min-width: 768px) { .hero-slide { aspect-ratio: 5 / 1; } .hero-slider-contenedor { border-radius: 0; } .btn-hero-nav { width: 45px; height: 45px; } .btn-hero-nav.prev { left: 20px; } .btn-hero-nav.next { right: 20px; } }
/* 🟢 RESPONSIVE MÓVIL: Borde a borde */
@media (max-width: 850px) { .hero-slider-contenedor { border-radius: 0;} }
/* =======================================================
   RELOJ DE OFERTAS (Cinta Negra Responsive)
   ======================================================= */
.cinta-reloj-ofertas { background: #0f172a; color: white; padding: 8px 5px; text-align: center; font-weight: 700; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; gap: 4px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); white-space: nowrap; overflow: hidden; }
.cinta-reloj-ofertas span { color: #facc15; font-size: 0.9rem; }
@media (min-width: 768px) { .cinta-reloj-ofertas { font-size: 0.95rem; padding: 8px 12px; gap: 8px; } .cinta-reloj-ofertas span { font-size: 1.05rem; } #contenedor-ofertas-web .section-title { padding-left: 250px !important; } }


.btn-nav-mv { touch-action: manipulation; }



/* ==========================================================================
   PANTALLA DE ÉXITO (DISEÑO TICKET TIPO RAPPI/UBER)
   ========================================================================== */
.exito-oculto { display: none !important; }
#pantalla-exito-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgb(255 255 255); backdrop-filter: blur(4px); z-index: 99999; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; animation: fadeIn 0.4s ease-out; overflow-y: auto; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.ticket-recibo { background: #ffffff; width: 100%; max-width: 360px; border-radius: 16px 16px 0 0; position: relative; display: flex; flex-direction: column; align-items: center; filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2)); margin-bottom: 25px; }
.ticket-recibo::after { content: ""; position: absolute; bottom: -10px; left: 0; width: 100%; height: 10px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10'%3E%3Cpolygon fill='%23ffffff' points='0,0 20,0 10,10'/%3E%3C/svg%3E"); background-size: 20px 10px; background-repeat: repeat-x; }
.ticket-header { width: 100%; padding: 30px 20px 15px; text-align: center; border-bottom: 2px dashed #e2e8f0; }
.circulo-check { width: 50px; height: 50px; background: #22c55e; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 15px; box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.15); }
.circulo-check span { font-size: 30px; font-weight: bold; }
.ticket-header h2 { color: #0f172a; font-size: 1.5rem; font-weight: 800; margin: 0; }
.ticket-body { padding: 20px; text-align: center; width: 100%; }
.chef-animado { font-size: 60px; margin-bottom: 10px; }
.chef-animado-img { width: 45px; height: 45px; margin-bottom: 15px; display: block; margin-left: auto; margin-right: auto; }

.texto-gracias { font-size: 1.1rem; color: #475569; line-height: 1.5; margin-bottom: 20px; }
.texto-gracias b { color: #ef4444; }
.caja-gris-wa { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 15px; width: 100%; }
.caja-gris-wa p { font-size: 0.85rem; color: #64748b; font-weight: 600; margin: 0 0 12px 0; }
.btn-whatsapp-ticket { background: #25D366; color: white; padding: 12px 16px; border-radius: 8px; font-weight: 700; font-size: 1rem; text-decoration: none; display: flex; align-items: center; justify-content: center; position: relative; box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2); transition: transform 0.2s; width: 100%; }
.btn-whatsapp-ticket:active { transform: scale(0.96); }
.btn-whatsapp-ticket span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); }
.btn-otro-pedido { margin-top: 10px; background: #ffffff; color: #25d366; border: 2px solid rgb(37 211 102); padding: 12px 24px; border-radius: 20px; font-weight: 600; font-size: 1rem; cursor: pointer; transition: background 0.2s, border 0.2s; }
.btn-otro-pedido:active { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); }

