/* ==========================================================================
   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; 
    --color-secundario: #facc15; 
    --color-acento: #ea580c; 
    --color-fondo: #f8f7f5; /* Gris ultra claro para que resalten las tarjetas blancas */
    --color-texto: #0f172a;
    --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: #0f172a;
}

/* ==========================================================================
   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: 15px; 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; margin-bottom: 15px; line-height: 1.2; }

/* ==========================================================================
   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: white; border: none; width: 100%; padding: 8px; border-radius: 8px; 
    font-size: 0.85rem; font-family: 'Montserrat', sans-serif; font-weight: 800; cursor: pointer; pointer-events: none; 
}

@media (max-width: 767px) {
    .card-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; width: 100%; }
}

/* ==========================================================================
   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; height: 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: 80px; 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-family: 'Montserrat', sans-serif; font-weight: 800;}
.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;}
.opcion-precio { font-size: 0.85rem; font-weight: 700; 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: 15px 20px; 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: 800; color: var(--color-primario); font-size: 0.95rem; font-family: 'Montserrat', sans-serif;}
.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; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !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: 20px; color: #64748b; 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: #f0f9ff; 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: transparent !important; padding-left: 0 !important; padding-right: 0 !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; }
}