:root {
    /* Sistema de diseño "Artisanal Street Food" (Stitch). El rojo de
       marca se queda en #F22011 a propósito — es el mismo rojo ya
       impreso en el logo y en los letreros de nombre de producto
       (assets/nombrelasclasicas.png y similares), que son imágenes
       reales y no se pueden recolorear desde CSS. Usar el #D92518
       exacto del mock aquí crearía un choque de color visible contra
       esos letreros cada vez que aparecen juntos. */
    --red: rgb(242, 32, 17);
    --red-dark: #b30001;
    --red-light: #fff3f1;
    --green: #1a9c4a;
    --green-light: #eaf8ee;
    --yellow: #ffb800;
    --accent-warm: #e8a858;
    --black: #090909;
    --white: #ffffff;
    --background: #fff8f5;

    --ink-soft: #6a615b;
    --ink-faint: #8a817c;
    --surface-tint: #fff4dc;
    --line: rgba(27, 28, 26, 0.08);

    /* Tipografía actualizada al sistema de diseño 2026-09-11
       ("Gourmet Street Comfort"): Outfit para titulares/precios en
       vez de Epilogue, mismo rol y pesos. */
    --font-display: 'Outfit', 'Montserrat', "Arial Black", sans-serif;
    --font-body: 'Plus Jakarta Sans', Arial, Helvetica, sans-serif;

    --shadow-card: 0 12px 28px -10px rgba(242, 32, 17, 0.14);
    --shadow-cta: 0 6px 16px -6px rgba(242, 32, 17, 0.28);
    --shadow-pop: 0 14px 32px rgba(9, 9, 9, 0.18);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html, body {
    width: 100%;
    min-height: 100%;
    /* "overflow-x: hidden" a secas hace que el navegador calcule
       "overflow-y" como "auto" automáticamente (así lo pide la spec
       de CSS cuando un eje queda distinto de "visible" y el otro se
       deja "visible") — eso convierte a html Y a body, por separado,
       en dos contenedores de scroll anidados en vez de dejar que el
       viewport visual sea el único que scrollea. En algunos
       navegadores esa doble caja atrapa el gesto real de la rueda del
       mouse o del dedo (el scroll programático sí funciona, porque
       apunta directo a un elemento, pero el gesto real no sabe cuál
       de las dos cajas debe mover). "overflow-x: clip" evita esto:
       corta el desborde horizontal sin declarar una caja de scroll
       nueva. La línea de "hidden" se deja primero como respaldo para
       el navegador viejo que no entienda "clip" (si no lo entiende,
       ignora esa segunda línea y se queda con "hidden"). */
    overflow-x: hidden;
    overflow-x: clip;
}

body {
    font-family: var(--font-body);
    background-color: var(--background);
    background-image: radial-gradient(rgba(242, 32, 17, 0.09) 1.1px, transparent 1.1px);
    background-size: 20px 20px;
    color: var(--black);
    -webkit-tap-highlight-color: transparent;
}

button {
    font-family: inherit;
}

.app {
    width: 100%;
    max-width: 640px;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--background);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.05);
}

/* Páginas largas (formularios, listas, resumen de pago, y la lista
   de salchipapas con scroll) necesitan poder desplazarse. Se marca
   con una clase propia (.app-scroll) puesta directamente en el HTML
   de cada pantalla larga, en vez de depender de la pseudo-clase
   :has() — algunos navegadores/apps de celular (ej. el navegador
   interno de WhatsApp/Instagram, o versiones viejas de Safari/Chrome)
   no la soportan, y sin este respaldo la página se quedaba con
   overflow:hidden fijo — no scrolleaba con el mouse ni con el dedo,
   aunque hubiera contenido de sobra debajo. */
.app-scroll {
    height: auto;
    max-height: none;
    min-height: 100dvh;
    overflow: visible;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    flex-shrink: 0;
    width: 100%;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(251, 249, 245, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 8px rgba(9, 9, 9, 0.04);
    padding: 8px 16px;
    padding-top: max(8px, env(safe-area-inset-top));
}

.main-logo {
    display: block;
    width: auto;
    max-width: min(340px, 68vw);
    height: min(56px, 8vh);
    object-fit: contain;
}

.back-button {
    position: absolute;
    left: clamp(8px, 2.5vw, 20px);
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--surface-tint);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: var(--shadow-card);
    transition: transform 0.15s ease;
}

.back-button:active {
    transform: translateY(-50%) scale(0.9);
}

.back-icon {
    display: block;
    font-size: 22px;
    line-height: 1;
    transform: translateY(-1px);
}

.logo-fallback {
    color: var(--black);
    font-family: var(--font-display);
    font-weight: 900;
    font-style: italic;
    letter-spacing: -1px;
    font-size: clamp(18px, 4vw, 26px);
}

.product-screen {
    width: 100%;
    padding: 14px 16px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.products-list {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.salsas-inline {
    width: 100%;
    max-width: 480px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.salsas-inline[hidden] { display: none; }

.salsas-inline-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.salsas-inline-note {
    color: var(--red);
    text-transform: none;
    letter-spacing: normal;
    font-weight: 700;
}

.portion-tabs {
    display: flex;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 2px;
}

.portion-tab {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: none;
    padding: 5px 10px;
    border-radius: 10px;
    background: var(--surface-tint);
    color: var(--ink-soft);
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.portion-tab.active {
    background: var(--black);
    color: var(--white);
}

.portion-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
    flex-shrink: 0;
}

.portion-pending {
    font-size: 10px;
    font-weight: 800;
    color: var(--red);
}

.portion-tab.active .portion-pending {
    color: #ff8a80;
}

.sauce-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
}

.sauce-pill {
    flex: 0 0 auto;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    background: var(--white);
    color: var(--ink-soft);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.sauce-pill .sauce-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid var(--ink-faint);
    flex-shrink: 0;
}

.sauce-pill.active {
    border-color: var(--green);
    background: var(--green-light);
    color: var(--green);
}

.sauce-pill.active .sauce-dot {
    background: var(--green);
    border-color: var(--green);
}

.empty-state {
    width: 100%;
    max-width: 420px;
    margin: clamp(30px, 8vh, 70px) auto;
    text-align: center;
    color: var(--ink-soft);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
}

.product-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 4px 20px -2px rgba(242, 32, 17, 0.08);
    overflow: hidden;
}

.product-card-photo {
    position: relative;
    width: 100%;
    height: clamp(180px, 32vh, 240px);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 40px;
    background: radial-gradient(120% 130% at 50% 18%, #fff6ea 0%, var(--surface-tint) 55%, #f7e2bc 100%);
    overflow: hidden;
}

.product-card-body {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 16px 18px;
}

.product-card.agotado .product-card-photo {
    filter: grayscale(0.5);
}

.product-price-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 3;
    background: rgba(9, 9, 9, 0.82);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 14px;
    text-align: right;
    line-height: 1.15;
    pointer-events: none;
}

.product-price-badge-label {
    display: block;
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--yellow);
}

.product-price-badge-value {
    display: block;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 800;
    color: var(--white);
}

.product-card-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
    filter: drop-shadow(0 14px 18px rgba(9, 9, 9, 0.18));
    user-select: none;
    -webkit-user-drag: none;
}

.product-title-box {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-name-image {
    display: block;
    width: min(300px, 70vw);
    max-height: clamp(30px, 4.5vh, 44px);
    object-fit: contain;
}

.product-name-fallback {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.1rem, 4.5vw, 1.4rem);
    color: var(--black);
    text-align: center;
}

.ingredients {
    width: min(100%, 480px);
    text-align: center;
    color: var(--ink-soft);
    font-family: var(--font-body);
    font-size: clamp(12px, 1.8vh, 14px);
    font-weight: 500;
    line-height: 1.4;
    padding: 0 6px 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ver-gramaje-button {
    border: none;
    background: none;
    color: var(--red);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    padding: 0;
    margin-top: 2px;
}

.ver-gramaje-button[hidden] { display: none; }

.gramaje-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 45vh;
    overflow-y: auto;
}

.gramaje-fila {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.gramaje-fila:last-child { border-bottom: none; padding-bottom: 0; }

.gramaje-nombre {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 14px;
    color: var(--black);
}

.gramaje-cantidad {
    font-family: var(--font-body);
    font-size: 12.5px;
    color: var(--ink-soft);
}

.sizes-container {
    width: 100%;
    max-width: 480px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 4px;
}

.size-card {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px 11px;
    border-radius: 12px;
    background: var(--white);
    border: 1.5px solid var(--line);
    box-shadow: 0 2px 10px -1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.size-card.selected {
    border-color: var(--red);
}

.size-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    overflow: hidden;
}

.size-label {
    display: block;
    min-width: 0;
    color: var(--ink-faint);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price {
    display: block;
    color: var(--red);
    font-family: var(--font-display);
    font-size: clamp(15px, 2.4vw, 19px);
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.quantity-controls {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr 22px 14px 22px;
    justify-content: space-between;
    align-items: center;
    column-gap: 4px;
    padding-top: 5px;
    border-top: 1px solid var(--line);
}

.quantity-controls::before {
    content: "Cant.";
    font-family: var(--font-body);
    font-size: 10.5px;
    font-weight: 500;
    color: var(--ink-faint);
}

.qty-btn {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.qty-btn:active { transform: scale(0.92); }

.qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.minus { background: var(--surface-tint); color: var(--black); }
.plus { background: var(--red); color: var(--white); box-shadow: 0 3px 8px rgba(242, 32, 17, 0.35); }

.agotado-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-8deg);
    z-index: 4;
    background: rgba(9, 9, 9, 0.85);
    color: var(--white);
    padding: 6px 22px;
    border-radius: 8px;
    border: 2px solid var(--white);
    font-weight: 800;
    letter-spacing: 1.5px;
    font-size: clamp(13px, 2.6vw, 18px);
    white-space: nowrap;
}
.agotado-badge[hidden] { display: none; }

.quantity {
    width: 100%;
    min-width: 0;
    display: block;
    text-align: center;
    color: var(--black);
    font-size: clamp(11px, 1.5vw, 14px);
    font-weight: 800;
    white-space: nowrap;
}

.promo-reopen-button {
    position: absolute;
    right: clamp(8px, 2.5vw, 20px);
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease;
}

.promo-reopen-button:active { transform: translateY(-50%) scale(0.9); }
.promo-reopen-button[hidden] { display: none; }

.promo-reopen-icon {
    font-size: clamp(16px, 3vw, 22px);
    line-height: 1;
}

.promo-reopen-image {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.promo-reopen-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--red);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    border: 2px solid var(--white);
}
.promo-reopen-badge[hidden] { display: none; }

/* ---- Ventana emergente de la promoción ---- */

.promo-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(9, 9, 9, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.promo-overlay[hidden] { display: none; }

.promo-modal {
    position: relative;
    width: 100%;
    max-width: 340px;
    max-height: 90dvh;
    border-radius: 20px;
    border: 4px solid transparent;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    background-image:
        linear-gradient(var(--black), var(--black)),
        linear-gradient(90deg, var(--red), var(--yellow), var(--red), var(--yellow), var(--red));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-size: 100% 100%, 300% 100%;
    background-position: 0 0, 0% 0%;
    animation: promoBorderMove 3s linear infinite;
    overflow: hidden;
}

@keyframes promoBorderMove {
    to { background-position: 0 0, 100% 0%; }
}

.promo-modal-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.promo-modal-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(9, 9, 9, 0.25) 0%, rgba(9, 9, 9, 0.55) 45%, rgba(9, 9, 9, 0.88) 100%);
}

.promo-modal-content {
    position: relative;
    z-index: 2;
    max-height: 90dvh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(6px, 1.2vh, 10px);
    padding: clamp(20px, 4vh, 30px) clamp(18px, 4vw, 24px) clamp(20px, 4vh, 28px);
    text-align: center;
}

.promo-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: var(--white);
    color: var(--black);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.promo-modal-close:active { transform: scale(0.9); }

.promo-badge {
    color: var(--yellow);
    font-size: clamp(11px, 1.8vw, 13px);
    font-weight: 800;
    letter-spacing: 0.8px;
}

.promo-title-image {
    width: min(180px, 50vw);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.promo-image-fallback {
    font-size: 48px;
}

.promo-name {
    color: var(--white);
    font-size: clamp(18px, 4vw, 24px);
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.promo-desc {
    color: var(--white);
    font-size: clamp(12px, 2.2vw, 14px);
    font-weight: 600;
    line-height: 1.35;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.promo-price {
    color: var(--white);
    font-size: clamp(20px, 4.5vw, 26px);
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.promo-quantity-controls {
    display: grid;
    grid-template-columns: 40px 32px 40px;
    align-items: center;
    column-gap: 8px;
    margin-top: 4px;
}

.promo-qty-btn {
    width: 100%;
    aspect-ratio: 1;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.promo-qty-btn:active { transform: scale(0.92); }

.promo-quantity {
    text-align: center;
    color: var(--white);
    font-weight: 800;
    font-size: 16px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.promo-added-note {
    color: var(--yellow);
    font-size: 13px;
    font-weight: 800;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}
.promo-added-note[hidden] { display: none; }

.promo-continue-button {
    width: 100%;
    max-width: 220px;
    height: 46px;
    margin-top: 6px;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--red);
    color: var(--white);
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s ease;
}

.promo-continue-button:active { transform: scale(0.96); }

@keyframes promoBadgePulse {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.35); }
}

.promo-reopen-badge.pulse {
    animation: promoBadgePulse 0.4s ease;
}

/* ---- Modal para elegir la salsa (aparece al continuar) ---- */

.salsa-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(9, 9, 9, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.salsa-overlay[hidden] { display: none; }

.salsa-modal {
    width: 100%;
    max-width: 360px;
    max-height: 90dvh;
    overflow-y: auto;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-pop);
    padding: clamp(20px, 4vh, 28px) clamp(18px, 4vw, 24px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.salsa-modal-title {
    font-family: var(--font-display);
    font-size: clamp(18px, 3.5vw, 22px);
    font-weight: 800;
    color: var(--black);
}

.salsa-modal-subtitle {
    color: var(--ink-soft);
    font-size: clamp(14px, 3vw, 16px);
    font-weight: 600;
    margin-top: -8px;
}

.salsa-confirm-button {
    margin-top: 4px;
    padding: 16px;
    border: none;
    border-radius: 9999px;
    background: var(--red);
    color: var(--white);
    font-family: var(--font-body);
    font-weight: 800;
    font-size: clamp(14px, 3vw, 16px);
    box-shadow: var(--shadow-cta);
    cursor: pointer;
}

.salsa-confirm-button:active { transform: scale(0.97); }

.bottom-bar {
    position: sticky;
    bottom: 0;
    z-index: 40;
    flex-shrink: 0;
    width: 100%;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 18px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(9, 9, 9, 0.06);
}

.total-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
    gap: 1px;
}

.total-label {
    color: var(--ink-faint);
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.total-price {
    color: var(--black);
    font-family: var(--font-display);
    font-size: clamp(20px, 4vw, 26px);
    font-weight: 800;
    line-height: 1.1;
}

.continue-button {
    width: auto;
    min-width: 150px;
    height: 52px;
    padding: 0 22px;
    border: none;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--red);
    color: var(--white);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-cta);
    transition: transform 0.15s ease;
}

.continue-button:active { transform: scale(0.97); }

.continue-arrow { font-size: 15px; }

.continue-button:disabled {
    background: #c8c8c8;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.8;
}

/* El botón final de "PAGAR" (confirmacion.html) se distingue del resto
   de los "CONTINUAR" con un amarillo suave en vez de rojo — mismo
   token que ya usa el resto del sistema para superficies cálidas
   (--surface-tint), así no se inventa un color nuevo. */
#payButton {
    background: var(--surface-tint);
    color: var(--black);
}

#payButton:disabled {
    background: #ededed;
    color: var(--ink-faint);
}

@media (max-width: 600px) {
    .main-logo { max-width: 260px; height: 52px; }
    .product-screen { padding: 14px 12px 22px; }
    .product-name-image { width: min(260px, 82vw); max-height: 48px; }
    .ingredients { max-width: 340px; line-height: 1.45; }
    .sizes-container { max-width: 360px; grid-template-columns: 1fr; gap: 10px; margin-bottom: 6px; }
    .size-card { min-height: 70px; grid-template-columns: minmax(0, 1fr) clamp(80px, 24vw, 96px); column-gap: 10px; padding: 10px 16px; }
    .bottom-bar { padding: 10px 14px; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
    .continue-button { min-width: 130px; height: 46px; }
}


/* =======================================================
   PANTALLA DE BEBIDAS
======================================================= */

.drinks-screen {
    width: 100%;
    flex: 1 1 auto;
    padding: 18px 16px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.drinks-list {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drink-card {
    width: 100%;
    min-height: 92px;
    display: grid;
    grid-template-columns: clamp(60px, 16vw, 88px) minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 16px;
    padding: 12px 16px;
    border-radius: 18px;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.drink-image-box {
    width: 100%;
    height: clamp(50px, 8vh, 72px);
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 14px;
    background: var(--surface-tint);
}

.drink-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.drink-image-fallback {
    font-size: clamp(22px, 5vw, 30px);
}

.drink-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: clamp(4px, 1.2vh, 9px);
}

.drink-name {
    min-width: 0;
    color: var(--black);
    font-family: var(--font-body);
    font-weight: 800;
    font-size: clamp(14px, 2.4vh, 17px);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.drink-price {
    min-width: 0;
    color: var(--red);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(14px, 2.2vh, 16px);
    white-space: nowrap;
}

.drink-para {
    min-width: 0;
    max-width: 100%;
    color: #777;
    font-weight: 600;
    font-size: clamp(11px, 1.8vh, 13px);
    line-height: 1.25;
    white-space: normal;
    word-break: break-word;
}

.drink-quantity-controls {
    display: grid;
    grid-template-columns: clamp(26px, 5.5vw, 34px) clamp(18px, 3.6vw, 24px) clamp(26px, 5.5vw, 34px);
    align-items: center;
    column-gap: clamp(3px, 1vw, 6px);
}

.drink-qty-btn {
    width: clamp(26px, 5.5vw, 34px);
    height: clamp(26px, 5.5vw, 34px);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: clamp(15px, 2.8vw, 19px);
    font-weight: 800;
    line-height: 1;
    transition: transform 0.15s ease;
}

.drink-qty-btn:active { transform: scale(0.92); }

.drink-qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.drink-card.agotado {
    background: rgba(0, 0, 0, 0.03);
}

.drink-card.agotado .drink-image {
    filter: grayscale(1);
    opacity: 0.5;
}

.drink-card.agotado .drink-price {
    color: #b8291b;
    letter-spacing: 0.5px;
}

.drink-quantity {
    text-align: center;
    color: var(--black);
    font-weight: 800;
    font-size: clamp(13px, 2.4vw, 16px);
}

@media (max-width: 600px) {
    .drinks-screen { padding: 12px 16px; }
}
/* =======================================================
   PANTALLA DE DATOS DE ENTREGA
======================================================= */

.delivery-screen {
    width: 100%;
    flex: 1 1 auto;
    padding: 22px 16px 28px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.delivery-form {
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Sin esto, el "display:flex" de arriba le gana a la regla del
   navegador que oculta lo que tiene el atributo "hidden" (un
   "display" puesto por el sitio siempre le gana al del navegador,
   sin importar el orden) — el formulario "escondido" se seguía
   viendo. Mismo arreglo que ya tienen .promo-overlay/.salsa-overlay
   más abajo. */
.delivery-form[hidden] { display: none; }

.delivery-intro {
    width: 100%;
    text-align: center;
    margin-bottom: 4px;
}

.delivery-intro-titulo {
    font-family: var(--font-display);
    font-size: clamp(19px, 4vw, 24px);
    font-weight: 800;
    color: var(--black);
    letter-spacing: -0.3px;
}

.delivery-intro-subtitulo {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
    margin-top: 4px;
}

.delivery-form-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow-card);
    padding: 18px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.field-label {
    color: var(--ink-faint);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.field-label-icon {
    display: flex;
    align-items: center;
    gap: 6px;
}

.field-label-icon span {
    font-size: 14px;
}

.field-input {
    width: 100%;
    padding: clamp(11px, 2vh, 16px) clamp(14px, 3vw, 18px);
    border-radius: 14px;
    border: 2px solid var(--line);
    background: var(--white);
    font-family: var(--font-body);
    font-size: clamp(15px, 2.4vw, 17px);
    font-weight: 600;
    color: var(--black);
}

.field-input:focus {
    outline: none;
    border-color: var(--red);
}

.field-input::placeholder {
    color: #a5a5a5;
    font-weight: 500;
}

.location-button {
    width: 100%;
    padding: clamp(13px, 2vh, 16px);
    border: none;
    border-radius: 9999px;
    background: var(--red);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: clamp(13px, 2vw, 15px);
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-cta);
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.location-button:active { transform: scale(0.98); }
.location-button:disabled { opacity: 0.7; cursor: wait; }

.location-icon {
    font-size: 1.2em;
}

.location-result {
    width: 100%;
    padding: 0;
    border-radius: 12px;
    font-size: clamp(12px, 2vw, 14px);
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.location-result.ok {
    padding: clamp(10px, 1.8vh, 14px);
    background: rgba(34, 160, 78, 0.12);
    border: 2px solid rgba(34, 160, 78, 0.35);
    color: #1a7a3c;
}

.location-result.error {
    padding: clamp(10px, 1.8vh, 14px);
    background: rgba(242, 32, 17, 0.08);
    border: 2px solid rgba(242, 32, 17, 0.3);
    color: #b8291b;
}

.location-result.info {
    padding: clamp(10px, 1.8vh, 14px);
    background: rgba(9, 9, 9, 0.05);
    border: 2px solid rgba(9, 9, 9, 0.15);
    color: #3a3a3a;
}

.field-error {
    display: block;
    min-height: 0;
    color: #b8291b;
    font-size: clamp(10px, 1.6vw, 12px);
    font-weight: 700;
    line-height: 1.3;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.15s ease, max-height 0.15s ease;
}

.field-error.visible {
    opacity: 1;
    max-height: 40px;
}

.field-input.invalid {
    border-color: var(--red);
    background: rgba(242, 32, 17, 0.04);
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: clamp(8px, 2vw, 12px);
    cursor: pointer;
    padding: 2px 0;
}

.checkbox-input {
    flex-shrink: 0;
    width: clamp(18px, 3.2vw, 22px);
    height: clamp(18px, 3.2vw, 22px);
    margin-top: 2px;
    accent-color: var(--red);
    cursor: pointer;
}

.checkbox-text {
    color: var(--black);
    font-size: clamp(13px, 2.2vw, 15px);
    font-weight: 600;
    line-height: 1.3;
}

@media (max-width: 600px) {
    .delivery-screen { padding: clamp(22px, 6vh, 40px) 18px 14px; }
}

@media (max-height: 650px) {
    .delivery-screen { padding-top: 14px; }
    .delivery-form { gap: 8px; }
    .field-group { gap: 3px; }
    .field-input { padding: 8px 14px; font-size: 14px; }
    .location-button { padding: 8px; }
}

/* =======================================================
   PANTALLA DE CONFIRMACIÓN
======================================================= */

.summary-screen {
    width: 100%;
    flex: 1 1 auto;
    padding: 20px 16px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.summary-card {
    width: 100%;
    max-width: 400px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    padding: clamp(14px, 2.2vh, 18px) clamp(16px, 3.5vw, 20px);
    overflow: hidden;
}

.summary-list {
    width: 100%;
    min-height: 0;
    display: grid;
    grid-auto-rows: minmax(20px, 1fr);
    gap: clamp(2px, 0.6vh, 6px);
    overflow-y: auto;
}

.summary-item {
    width: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: 1.4em minmax(0, 1fr) clamp(46px, 12vw, 64px) 1.6em;
    align-items: baseline;
    gap: clamp(6px, 1.5vw, 10px);
    padding: 0 2px;
}

.summary-item-remove {
    align-self: center;
    width: 1.6em;
    height: 1.6em;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    color: var(--black);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.summary-item-remove:active { transform: scale(0.9); }

.summary-item-qty {
    color: var(--black);
    font-size: clamp(13px, 2.1vw, 16px);
    font-weight: 800;
    text-align: center;
}

.summary-item-name {
    min-width: 0;
    color: var(--black);
    font-size: clamp(12px, 2vw, 15px);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.summary-item-price {
    flex-shrink: 0;
    text-align: right;
    color: var(--black);
    font-size: clamp(12px, 2vw, 15px);
    font-weight: 800;
}

.summary-totals {
    width: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: clamp(6px, 1.2vh, 10px);
    border-top: 2px dashed rgba(242, 32, 17, 0.25);
}

.summary-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.summary-label {
    color: var(--black);
    font-size: clamp(11px, 1.8vw, 13px);
    font-weight: 800;
    letter-spacing: 0.4px;
}

.summary-value {
    color: var(--black);
    font-size: clamp(12px, 1.9vw, 14px);
    font-weight: 800;
}

.summary-row-total {
    margin: 4px -16px -16px;
    padding: 10px 16px;
    background: var(--surface-tint);
    border-radius: 0 0 20px 20px;
}

.summary-row-total .summary-label {
    color: var(--black);
    font-size: clamp(15px, 2.4vw, 19px);
    font-weight: 800;
}

.summary-row-total .summary-value {
    color: var(--red);
    font-family: var(--font-display);
    font-size: clamp(20px, 3.2vw, 26px);
    font-weight: 800;
}

.payment-methods {
    width: 100%;
    max-width: 380px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(10px, 2vh, 18px);
    padding-top: clamp(4px, 1vh, 8px);
}

.payment-title {
    color: var(--black);
    font-size: clamp(10px, 1.6vw, 12px);
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.payment-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(6px, 1.6vw, 10px);
}

.payment-button {
    position: relative;
    width: 100%;
    min-width: 0;
    height: clamp(52px, 9vh, 76px);
    border: 1.5px solid var(--line);
    border-radius: 16px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(5px, 1vh, 9px) clamp(6px, 1.4vw, 10px);
    cursor: pointer;
    box-shadow: var(--shadow-card);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.payment-button:active { transform: scale(0.97); }

.payment-button.selected {
    border-color: var(--red);
    background: rgba(242, 32, 17, 0.04);
    box-shadow: var(--shadow-card);
}

.payment-button.selected::after {
    content: "✓";
    position: absolute;
    top: -7px;
    right: -7px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    border: 2px solid var(--white);
}

.payment-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.payment-button span {
    color: var(--black);
    font-size: clamp(11px, 1.8vw, 13px);
    font-weight: 800;
    letter-spacing: 0.5px;
}

.payment-selected {
    min-height: 1.2em;
    color: var(--black);
    font-size: clamp(11px, 1.8vw, 13px);
    font-weight: 800;
    text-align: center;
}

.efectivo-monto {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--surface-tint);
    border: 1px solid var(--line);
}
.efectivo-monto[hidden] { display: none; }

.efectivo-monto-titulo {
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 800;
    color: var(--black);
}

.efectivo-chips {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.efectivo-chip {
    padding: 8px 4px;
    border-radius: 10px;
    border: 1.5px solid var(--line);
    background: var(--white);
    color: var(--black);
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}

.efectivo-chip.active {
    border-color: var(--red);
    background: rgba(242, 32, 17, 0.06);
    color: var(--red);
}

.efectivo-otro-row {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--white);
    border: 1.5px solid var(--line);
    border-radius: 10px;
    padding: 8px 12px;
}

.efectivo-otro-simbolo {
    font-family: var(--font-body);
    font-weight: 800;
    color: var(--ink-faint);
}

.efectivo-otro-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    color: var(--black);
}
.efectivo-otro-input:focus { outline: none; }

.efectivo-cambio {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--green-light);
    color: #1a7a3c;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
}
.efectivo-cambio[hidden] { display: none; }
.efectivo-cambio strong { font-size: 16px; }

.metodo-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.metodo-info[hidden] { display: none; }

.metodo-qr {
    width: clamp(90px, 24vw, 130px);
    height: auto;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}
.metodo-qr[hidden] { display: none; }

.metodo-telefono-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(12px, 2vw, 14px);
    font-weight: 800;
    color: var(--black);
}
.metodo-telefono-row[hidden] { display: none; }

.metodo-copiar-btn {
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    background: var(--red);
    color: var(--white);
    font-size: clamp(10px, 1.6vw, 12px);
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 600px) {
    .payment-buttons {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .payment-button {
        height: 58px;
        padding: 8px 16px;
    }

    .payment-button.selected::after {
        top: 50%;
        right: 12px;
        transform: translateY(-50%);
    }
}
/* ---- Aviso (reemplaza alert() nativo) ---- */

.aviso-toast {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 200;
    box-sizing: border-box;
    background: var(--red);
    color: var(--white);
    border-bottom: 4px solid var(--red-dark);
    border-radius: 0 0 14px 14px;
    padding: max(14px, env(safe-area-inset-top)) 22px 14px;
    text-align: center;
    font-weight: 700;
    font-size: clamp(13px, 3vw, 15px);
    line-height: 1.35;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    opacity: 0;
    transform: translateY(-100%);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.aviso-toast-visible {
    transform: translateY(0);
    opacity: 1;
}

/* =======================================================
   PANTALLA DE PAPAPUNTOS (cuenta.html)
======================================================= */

.cuenta-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    width: 100%;
    max-width: 480px;
}

.cuenta-titulo {
    font-family: var(--font-display);
    font-size: clamp(20px, 4.5vw, 26px);
    font-weight: 800;
    color: var(--black);
}

.cuenta-texto {
    font-family: var(--font-body);
    font-size: clamp(13px, 2.8vw, 15px);
    color: var(--ink-soft);
    font-weight: 500;
    line-height: 1.4;
}

.cuenta-puntos-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark, #c2130a) 55%, var(--yellow) 150%);
    color: var(--white);
    border-radius: 20px;
    padding: 20px 28px 24px;
    margin-top: 6px;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow-cta, 0 10px 30px -8px rgba(242, 32, 17, 0.4));
}

.cuenta-puntos-etiqueta-chica {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.85;
}

.cuenta-puntos-numero {
    font-size: clamp(32px, 8vw, 44px);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
}

.cuenta-puntos-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 2px;
    opacity: 0.9;
}

.cuenta-progreso {
    width: 100%;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.cuenta-progreso-fila {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
    opacity: 0.95;
}

.cuenta-progreso-barra {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    overflow: hidden;
}

.cuenta-progreso-relleno {
    height: 100%;
    border-radius: 999px;
    background: var(--white);
    transition: width 0.3s ease;
}

.cuenta-tabs {
    display: flex;
    width: 100%;
    max-width: 480px;
    border-radius: 9999px;
    overflow: hidden;
    border: 2px solid var(--red);
    background: var(--white);
}
.cuenta-tabs[hidden] { display: none; }

.cuenta-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: var(--white);
    color: var(--red);
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
}

.cuenta-tab.activa {
    background: var(--red);
    color: var(--white);
}

.cuenta-badge-bienvenida {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 9999px;
    background: var(--surface-tint);
    color: #7c5800;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 800;
}

.cuenta-club-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 9999px;
    background: var(--white);
    border: 1.5px solid var(--surface-tint);
    box-shadow: var(--shadow-card);
    color: #7c5800;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.cuenta-logo {
    width: 180px;
    max-width: 60vw;
    height: auto;
    margin: 4px auto 2px;
}

.cuenta-opcional-badge {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    background: var(--surface-2, #f3ece2);
    color: var(--ink-soft);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
}

.cuenta-pin-hint {
    font-size: 10px;
    font-weight: 800;
    color: #a86b00;
    background: var(--surface-tint);
    padding: 2px 8px;
    border-radius: 9999px;
    text-transform: none;
    letter-spacing: 0;
}

.cuenta-guest-link {
    display: block;
    text-align: center;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-soft);
    text-decoration: none;
}

.cuenta-footer-ayuda {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 22px 0 8px;
    text-align: center;
}

.cuenta-footer-ayuda a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--black);
    font-weight: 800;
    font-size: 12px;
    text-decoration: none;
}

.cuenta-footer-copy {
    font-size: 10px;
    color: var(--ink-faint);
}

.pin-boxes {
    display: flex;
    gap: 10px;
}

.pin-box {
    width: 100%;
    height: 52px;
    text-align: center;
    border-radius: 14px;
    border: 2px solid var(--line);
    background: var(--white);
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    color: var(--black);
}

.pin-box:focus {
    outline: none;
    border-color: var(--red);
}

.cuenta-recompensas {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cuenta-recompensa-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--white);
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--line);
}

.cuenta-recompensa-card.seleccionada {
    border-color: var(--red);
    background: rgba(242, 32, 17, 0.06);
}

.cuenta-recompensa-nombre {
    font-weight: 800;
    font-size: 14px;
    color: var(--black);
}

.cuenta-recompensa-detalle {
    font-size: 12px;
    color: #777;
    font-weight: 600;
    margin-top: 2px;
}

.cuenta-btn {
    flex-shrink: 0;
    padding: 9px 16px;
    border-radius: 10px;
    border: none;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
}

.cuenta-btn-primary { background: var(--red); color: var(--white); }
.cuenta-btn-secondary { background: #e2e5e9; color: var(--black); }
.cuenta-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Botón "Mi cuenta" (Papapuntos) en la barra superior de Pantalla 1
   — mismo estilo que el botón de reabrir la promo, pero del lado
   izquierdo (que en esta pantalla está libre, no hay back-button). */
.menu-button {
    position: absolute;
    left: clamp(8px, 2.5vw, 20px);
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--surface-tint);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease;
}

.menu-button:active { transform: translateY(-50%) scale(0.9); }

/* En pantallas con back-button (que ya ocupa el lado izquierdo), el
   menú se ubica del lado derecho en su lugar. */
.menu-button.menu-button-right {
    left: auto;
    right: clamp(8px, 2.5vw, 20px);
}

.menu-icon {
    width: 18px;
    height: 13px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-icon span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--black);
}

/* ---- Menú (Iniciar sesión, Buscar mi pedido, WhatsApp) ---- */

.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 95;
    background: rgba(9, 9, 9, 0.4);
}

.menu-overlay[hidden] { display: none; }

.menu-panel {
    position: absolute;
    top: calc(64px + env(safe-area-inset-top));
    left: 12px;
    width: min(280px, calc(100vw - 24px));
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--shadow-pop);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 12px;
    border-radius: 12px;
    color: var(--black);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 14.5px;
    font-weight: 700;
    transition: background 0.15s ease;
}

.menu-item:active { background: var(--surface-tint); }
.menu-item[hidden] { display: none; }

.menu-item-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-soft);
}

.menu-item-icon svg { width: 20px; height: 20px; fill: currentColor; }
.menu-item-icon .material-symbols-outlined,
.menu-login-icon .material-symbols-outlined { font-size: 20px; }

.menu-item-icon-whatsapp { color: #25d366; }
.menu-item-whatsapp { color: #128c4a; }

/* ---- Botón de "Iniciar sesión" (Salchipuntos), destacado como CTA de
   verdad en vez de una fila más de la lista — mismo lenguaje visual
   que .location-button (rojo, píldora, sombra) para que se note que
   es la acción principal del menú. ---- */
.menu-login-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    margin-bottom: 6px;
    border-radius: 9999px;
    background: var(--red);
    color: var(--white);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 14.5px;
    font-weight: 800;
    box-shadow: var(--shadow-cta);
    position: relative;
    transition: transform 0.15s ease;
}

.menu-login-btn:active { transform: scale(0.98); }

.menu-login-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.menu-section-label {
    padding: 10px 12px 4px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.menu-section-label[hidden] { display: none; }

.menu-divider {
    margin: 6px 8px;
    border: none;
    border-top: 1px solid var(--line);
}

.cuenta-button-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--red);
    color: var(--white);
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

.cuenta-button-badge[hidden] { display: none; }

.cuenta-link-btn {
    background: none;
    border: none;
    color: var(--red);
    font-weight: 700;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    padding: 4px;
    align-self: center;
}

/* =======================================================
   BARRA DE PROGRESO DE 5 PASOS (index/categoria/entrega/confirmacion)
======================================================= */

.step-progress {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto 12px;
    padding: 10px 12px;
    background: var(--surface-tint);
    border: 1px solid var(--line);
    border-radius: 18px;
}

/* Los círculos y su línea viven en su propia caja de ancho flexible
   — así el botón de WhatsApp (al lado, fuera de esta caja) nunca
   les queda encima, sin importar el ancho de pantalla. */
.step-progress-body {
    position: relative;
    flex: 1;
    min-width: 0;
}

/* Línea que conecta los círculos por detrás — el tramo ya recorrido
   se pinta encima con .step-progress-fill. */
.step-progress-track {
    position: absolute;
    top: 18px;
    left: 26px;
    right: 26px;
    height: 3px;
    background: var(--line);
    border-radius: 999px;
    z-index: 0;
}

.step-progress-fill {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--red), var(--yellow));
    border-radius: 999px;
    transition: width 0.3s ease;
}

.step-progress-items {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
}

.step-progress-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.step-progress-dot {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 800;
    background: var(--white);
    color: var(--ink-faint);
    border: 2px solid var(--line);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.step-progress-item.done .step-progress-dot {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}

.step-progress-item.active .step-progress-dot {
    background: linear-gradient(135deg, var(--red), var(--yellow));
    color: var(--white);
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.35);
}

/* El círculo trae 3 posibles contenidos (número / ícono del paso /
   palomita) y CSS decide cuál se ve según el estado — evita tres
   círculos distintos en el HTML de cada página. */
.step-progress-num,
.step-progress-icon,
.step-progress-check {
    display: none;
}

.step-progress-item:not(.active):not(.done) .step-progress-num {
    display: inline;
}

.step-progress-item.active .step-progress-icon {
    display: inline-flex;
    font-size: 16px;
}

.step-progress-item.done .step-progress-check {
    display: inline-flex;
    font-size: 16px;
}

.step-progress-label {
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 700;
    color: var(--ink-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.step-progress-item.active .step-progress-label {
    color: var(--red);
    font-weight: 800;
}

.step-heading {
    width: 100%;
    max-width: 480px;
    margin: 0 auto 12px;
    font-family: var(--font-display);
    font-size: clamp(14px, 3.6vw, 16px);
    font-weight: 800;
    letter-spacing: 0.3px;
    color: var(--red);
    text-transform: uppercase;
}

.step-heading:empty { display: none; }

/* ---- Pestaña para cambiar entre Salchipapas y otra categoría "con
   tamaños" (ej. Hamburguesas) — oculta por completo hasta que esa
   otra categoría exista de verdad (ver script.js/hamburguesas.js),
   así que en un sitio con solo Salchipapas no cambia nada. ---- */
.menu-switch {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto 10px;
    padding: 0 16px;
}

.menu-switch[hidden] { display: none; }

.menu-switch-item {
    flex: 1;
    text-align: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    background: var(--white);
    color: var(--ink-soft);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.menu-switch-item:active { transform: scale(0.97); }

.menu-switch-item.active {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
    box-shadow: var(--shadow-cta);
}

/* ---- Botón de contacto directo por WhatsApp ----
   Antes era una tarjeta de ancho completo con texto y número —
   ocupaba una fila entera solo para eso. Ahora es una burbuja
   chica al lado de la barra de pasos (.step-progress es flex, este
   botón es el segundo hijo, fuera de la caja de los círculos) —
   mismo acceso directo, cero fila extra en la pantalla. */
.whatsapp-banner {
    flex-shrink: 0;
    align-self: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #25d366;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.4);
}

.whatsapp-banner .material-symbols-outlined {
    font-size: 16px;
}

/* ---- Direcciones guardadas en el checkout (entrega.html) ---- */

.direcciones-rapidas {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 4px;
}

.direcciones-rapidas[hidden] { display: none; }

.direcciones-rapidas-titulo {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.direccion-rapida-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 14px;
    border: 1.5px solid var(--line);
    background: var(--white);
    cursor: pointer;
    text-align: left;
}

.direccion-rapida-card.selected {
    border-color: var(--red);
    background: rgba(242, 32, 17, 0.04);
}

.direccion-rapida-nombre {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 13px;
    color: var(--black);
}

.direccion-rapida-texto {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--ink-soft);
    font-weight: 500;
}

.direccion-rapida-check {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--line);
}

.direccion-rapida-card.selected .direccion-rapida-check {
    border-color: var(--red);
    background: var(--red);
    position: relative;
}

.direccion-rapida-card.selected .direccion-rapida-check::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 11px;
    font-weight: 800;
}

.direcciones-rapidas-otra {
    align-self: flex-start;
    background: none;
    border: none;
    color: var(--red);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    padding: 2px;
}

.cerrado-banner {
    margin: 0 16px 12px;
    padding: 12px 16px;
    background: var(--red);
    color: var(--white);
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
}

.cerrado-banner[hidden] { display: none; }
