/* ================================================
   YOGEN FRÜZ KIOSKO - CSS
   Rediseño alineado al Brand Book oficial.
   Resolución: 1080x1920 (kiosko vertical)

   REGLA DE ORO DEL COLOR (Brand Book):
   El blanco es el producto. El azul (PMS 2925) y el rosado (PMS 204)
   representan la fruta: se usan SOLO como acento (botones, selección,
   precios, ícono ☺). Jamás como fondo de pantalla completa.
   El entorno es predominantemente blanco con una zona celeste clara.
   ================================================ */

/* ========================
   Blindaje de kiosko
   Desactiva selección de texto, resaltado táctil, zoom por gesto y
   arrastre de imágenes. Complementa kiosk-lock.js y el modo --kiosk de Edge.
   Los campos de texto (PIN admin, etc.) se re-habilitan explícitamente.
   ======================== */
html {
    touch-action: pan-x pan-y;   /* permite desplazar, no pinch-zoom */
    -ms-touch-action: pan-x pan-y;
}
* {
    -webkit-user-select: none;   /* sin selección de texto */
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none; /* sin menú "guardar imagen" en táctil */
    -webkit-tap-highlight-color: transparent; /* sin flash azul al tocar */
}
input, textarea, [contenteditable="true"] {
    -webkit-user-select: text;   /* re-habilita escritura donde hace falta */
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}
img {
    -webkit-user-drag: none;     /* no arrastrar imágenes (no bloquea el toque) */
    user-drag: none;
}

/* ========================
   Design Tokens (Brand Book)
   ======================== */
:root {
    /* Colores de marca — acento puntual, nunca fondo completo */
    --yf-blue: #0197D9;        /* Yogen Früz Blue  · PMS 2925 (selección, títulos, check) */
    --yf-blue-dark: #0179AC;
    --yf-blue-soft: #E4F4FB;   /* tinte de selección / hover */
    --yf-pink: #EC1C8A;        /* Yogen Früz Pink  · PMS 204 (CTA, precios, ícono ☺) */
    --yf-pink-dark: #C81576;
    --yf-pink-soft: #FDE7F2;

    /* Superficies — el blanco es el producto */
    --white: #FFFFFF;          /* superficie / tarjetas / "el producto" */
    --celeste: #EAF6FB;        /* zona celeste clara: fondo de pantalla y panel lateral */
    --celeste-deep: #DBEEF7;   /* borde suave sobre celeste */

    /* Texto */
    --text: #1F2A33;           /* casi-negro azulado, legible */
    --text-soft: #5B6B77;      /* nombres de producto en gris/celeste, instrucciones */
    --muted: #90A2AD;
    --line: #E7EEF2;           /* líneas limpias, minimizan la confusión */

    /* Retro-compatibilidad con nombres de variables usados en admin.css/JS.
       El JS de tema mapea primary→--pink, secondary→--purple, accent→--green.
       Los apuntamos a la paleta de marca para que el admin herede el look. */
    --pink: var(--yf-pink);
    --pink-dark: var(--yf-pink-dark);
    --pink-light: #F582BC;
    --purple: var(--yf-blue);
    --green: var(--yf-blue);
    --green-dark: var(--yf-blue-dark);
    --bg: var(--celeste);
    --card: var(--white);
    --text-secondary: var(--text-soft);
    --border: var(--line);

    /* Feedback */
    --ok: #2FB483;
    --ok-dark: #229268;
    --danger: #E4572E;

    --shadow-sm: 0 2px 10px rgba(1, 60, 90, 0.06);
    --shadow: 0 8px 26px rgba(1, 60, 90, 0.08);
    --shadow-lg: 0 18px 50px rgba(1, 60, 90, 0.14);
    --radius: 22px;
    --radius-sm: 14px;
    --radius-pill: 999px;
    --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);

    /* Tipografías corporativas (Brand Book):
       Primaria — Chalet Nineteen Sixty (títulos, personalidad).
       Secundaria — Helvetica Neue (cuerpo, instrucciones).
       No hay licencia de Chalet embebida, así que usamos una pila geométrica
       cercana en espíritu (Poppins/Montserrat si el equipo las tiene) y caemos
       a Helvetica Neue / system-ui. Cambiar aquí si se instala Chalet. */
    --font-display: 'Chalet Nineteen Sixty', 'Poppins', 'Montserrat', 'Helvetica Neue', system-ui, sans-serif;
    --font-body: 'Helvetica Neue', 'Helvetica', 'Arial', system-ui, -apple-system, sans-serif;
}

/* ========================
   Reset & Base
   ======================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text);
    background: var(--celeste);
    user-select: none;
    -webkit-user-select: none;
}

h1, h2, h3, .display {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

/* ========================
   Screen Management
   ======================== */
.screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    z-index: 1;
    background: var(--celeste);
}

.screen.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

/* ======================================================
   SPLASH (Pantalla 0 · Bienvenida)
   "Fondo celeste claro · Logo · Frase · Producto centrado
   · Un único CTA rosado. Cero saturación."
   ====================================================== */
#screen-splash {
    background:
        radial-gradient(120% 80% at 50% -10%, #FFFFFF 0%, var(--celeste) 55%, var(--celeste) 100%);
    cursor: pointer;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Acentos suaves de marca (la "fruta añadida"), muy sutiles, nunca dominan */
.splash-bg { position: absolute; inset: 0; pointer-events: none; }

.splash-circle { position: absolute; border-radius: 50%; opacity: 0.5; filter: blur(2px); }
.c1 { width: 360px; height: 360px; background: var(--yf-blue-soft); top: -6%; left: -8%; animation: floatA 12s ease-in-out infinite; }
.c2 { width: 280px; height: 280px; background: var(--yf-pink-soft); bottom: 6%; right: -6%; animation: floatB 14s ease-in-out infinite; }
.c3 { width: 220px; height: 220px; background: var(--yf-blue-soft); bottom: 22%; left: 8%; animation: floatA 16s ease-in-out infinite reverse; }

.splash-content {
    text-align: center;
    z-index: 2;
    color: var(--text);
    padding: 0 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.splash-logo { margin-bottom: 18px; }

.splash-logo-img {
    height: 118px;
    width: auto;
    filter: drop-shadow(0 6px 18px rgba(1, 60, 90, 0.10));
}

/* Fallback tipográfico del logo (si faltara el SVG) */
.logo-y, .header-logo-y { font-family: var(--font-display); font-weight: 800; font-size: 72px; letter-spacing: 2px; color: var(--yf-blue); }
.logo-f, .header-logo-f { font-family: var(--font-display); font-weight: 800; font-size: 72px; letter-spacing: 2px; color: var(--yf-pink); }

.splash-tagline {
    font-size: 30px;
    font-weight: 500;
    color: var(--text-soft);
    line-height: 1.4;
    margin-bottom: 26px;
}

.splash-divider {
    width: 72px;
    height: 5px;
    background: var(--yf-pink);
    border-radius: 3px;
    margin: 0 auto 28px;
}

.splash-welcome {
    font-size: 66px;
    font-weight: 800;
    color: var(--yf-blue);
    margin-bottom: 10px;
    line-height: 1.05;
}

.splash-invite {
    font-size: 30px;
    color: var(--text-soft);
    margin-bottom: 24px;
}

/* CTA único, rosado (regla del Brand Book) */
.splash-cta {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-size: 27px;
    font-weight: 700;
    color: var(--white);
    background: var(--yf-pink);
    padding: 26px 56px;
    border-radius: var(--radius-pill);
    box-shadow: 0 12px 34px rgba(236, 28, 138, 0.34);
    animation: pulse 2.4s ease-in-out infinite;
}

.pulse-ring {
    width: 15px;
    height: 15px;
    background: var(--white);
    border-radius: 50%;
    animation: pulseRing 2s ease-in-out infinite;
}

/* Floaters de producto (sutiles) */
.splash-floaters { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }

.splash-floater {
    position: absolute;
    opacity: 0;
    filter: drop-shadow(0 6px 16px rgba(1, 60, 90, 0.12));
    animation: floaterDrift linear infinite;
    will-change: transform, opacity;
}

@keyframes floaterDrift {
    0% { transform: translateY(100vh) rotate(-8deg) scale(0.7); opacity: 0; }
    12% { opacity: 0.16; }
    50% { opacity: 0.18; }
    88% { opacity: 0.10; }
    100% { transform: translateY(-120vh) rotate(8deg) scale(1); opacity: 0; }
}

/* Producto protagonista en el centro */
.splash-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    min-height: 300px;
    justify-content: flex-end;
}

.showcase-img {
    height: 360px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 16px 34px rgba(1, 60, 90, 0.16));
    animation: showcaseEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.showcase-img.swap { animation: showcaseSwap 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }

.showcase-name {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    color: var(--text);
    animation: showcaseFadeUp 0.5s ease-out;
}
.showcase-name.swap { animation: showcaseFadeUp 0.5s ease-out; }

.showcase-price {
    font-size: 34px;
    font-weight: 800;
    color: var(--yf-pink);
    padding: 4px 22px;
    animation: showcaseFadeUp 0.5s ease-out 0.1s both;
}
.showcase-price.swap { animation: showcaseFadeUp 0.5s ease-out 0.1s both; }

@keyframes showcaseEnter { 0% { transform: scale(0.4) rotate(-10deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes showcaseSwap { 0% { transform: scale(0.6) translateY(24px); opacity: 0; } 100% { transform: scale(1) translateY(0); opacity: 1; } }
@keyframes showcaseFadeUp { 0% { transform: translateY(14px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }

/* Carrusel inferior de productos (tira sutil) */
.splash-carousel {
    position: absolute;
    bottom: 34px;
    left: 0; right: 0;
    height: 120px;
    overflow: hidden;
    z-index: 2;
    mask-image: linear-gradient(to right, transparent 0%, white 12%, white 88%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, white 12%, white 88%, transparent 100%);
}

.splash-carousel-track {
    display: flex;
    gap: 52px;
    align-items: center;
    height: 100%;
    animation: carouselScroll 24s linear infinite;
    width: max-content;
}

.splash-carousel-track img {
    height: 96px;
    width: auto;
    object-fit: contain;
    opacity: 0.55;
    filter: drop-shadow(0 4px 10px rgba(1, 60, 90, 0.10));
    flex-shrink: 0;
}

@keyframes carouselScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ======================================================
   HEADER (blanco, limpio, logo + carrito)
   El entorno es blanco; el header ya no es un gradiente fucsia.
   ====================================================== */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 104px;
    background: var(--white);
    color: var(--text);
    flex-shrink: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    z-index: 5;
}

.header-brand { display: flex; align-items: center; gap: 12px; }

.header-logo-img {
    height: 54px;
    width: auto;
}

.header-brand.small .header-logo-img { height: 44px; }
.header-brand .header-logo-y, .header-brand .header-logo-f { font-size: 38px; }
.header-brand.small .header-logo-y, .header-brand.small .header-logo-f { font-size: 30px; }

/* Botón Volver — pill celeste, texto azul */
.header-back-btn {
    background: var(--celeste);
    border: 1px solid var(--celeste-deep);
    color: var(--yf-blue);
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 700;
    padding: 15px 30px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.header-back-btn:active { background: var(--yf-blue-soft); transform: scale(0.97); }

.header-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--yf-blue);
}

/* Carrito en header — acento rosado en el badge */
.header-cart-btn {
    background: var(--celeste);
    border: 1px solid var(--celeste-deep);
    color: var(--yf-blue);
    font-size: 30px;
    padding: 13px 22px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.header-cart-btn:active { background: var(--yf-blue-soft); }

.cart-badge {
    position: absolute;
    top: -8px; right: -8px;
    background: var(--yf-pink);
    color: var(--white);
    font-size: 17px;
    font-weight: 800;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--white);
    box-shadow: 0 2px 8px rgba(236, 28, 138, 0.4);
}

.cart-badge.hidden { display: none; }

/* ======================================================
   PRODUCTS SCREEN (Pantalla 1 · Elige tu producto)
   Layout: panel lateral de categorías (celeste) + grilla blanca.
   ====================================================== */
.products-title {
    padding: 22px 40px 6px;
    flex-shrink: 0;
}

.products-title h2 {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 800;
    color: var(--yf-blue);
}

.products-title p {
    font-size: 20px;
    color: var(--text-soft);
    margin-top: 2px;
}

/* Cuerpo de dos columnas: categorías + grilla */
.products-body {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 288px 1fr;
    gap: 0;
}

/* Panel lateral izquierdo — "espacio para ver otras categorías".
   Look moderno: fondo blanco, tarjetas de categoría grandes con ícono en chip. */
.category-rail {
    background: var(--white);
    border-right: 1px solid var(--line);
    padding: 24px 18px 28px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.category-rail-title {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    padding: 2px 6px 10px;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    border: 2px solid var(--line);
    background: var(--celeste);
    color: var(--text);
    text-align: left;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    padding: 20px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.1;
}

/* Ícono dentro de un "chip" circular blanco */
.category-btn .cat-ico {
    font-size: 28px;
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

/* Categoría activa — resaltada en azul (selección = azul, Brand Book) */
.category-btn.active {
    background: var(--yf-blue);
    border-color: var(--yf-blue);
    color: var(--white);
    box-shadow: 0 10px 26px rgba(1, 151, 217, 0.28);
}

.category-btn.active .cat-ico {
    background: rgba(255, 255, 255, 0.22);
    box-shadow: none;
}

/* Grilla de productos: 2 columnas (pantalla vertical) → cards más anchas. */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(400px, auto);
    gap: 26px;
    padding: 26px 32px 32px;
    overflow-y: auto;
    align-content: start;
    min-height: 0;
}

/* ======================================================
   PRODUCT CARD — blanco, jerarquía, aire, precio rosado
   ====================================================== */
.product-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.product-card:active {
    transform: scale(0.96);
    box-shadow: var(--shadow-lg);
    border-color: var(--yf-blue);
}

.product-card.out-of-stock { opacity: 0.5; filter: grayscale(0.5); }
.product-card.out-of-stock:active { transform: none; border-color: var(--line); }

.product-card-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 0;
    padding: 14px;
    overflow: hidden;
    /* Fondo celeste MUY sutil detrás del producto (nunca saturado) */
    background:
        radial-gradient(80% 70% at 50% 38%, var(--celeste) 0%, var(--white) 78%);
}

.product-emoji {
    font-size: 76px;
    z-index: 1;
    filter: drop-shadow(0 6px 14px rgba(1, 60, 90, 0.12));
}

.product-img {
    width: 100%;
    max-height: 100%;
    object-fit: contain;
    z-index: 1;
    filter: drop-shadow(0 8px 16px rgba(1, 60, 90, 0.12));
    transition: transform 0.2s;
}

.product-card:active .product-img { transform: scale(0.95); }

/* Badge "Popular" para guiar la elección */
.badge-popular {
    position: absolute;
    top: 14px; left: 14px;
    background: var(--yf-pink);
    color: var(--white);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.03em;
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    z-index: 2;
    box-shadow: 0 4px 12px rgba(236, 28, 138, 0.35);
}

.badge-armado {
    position: absolute;
    top: 14px; right: 14px;
    background: var(--yf-blue-soft);
    color: var(--yf-blue);
    font-size: 13px;
    font-weight: 800;
    padding: 6px 13px;
    border-radius: var(--radius-pill);
    z-index: 2;
}

.badge-stock {
    position: absolute;
    inset: auto auto 14px 14px;
    background: rgba(31, 42, 51, 0.82);
    color: var(--white);
    font-size: 14px;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    z-index: 3;
}

.product-card-info {
    padding: 20px 26px 26px;
    flex-shrink: 0;
    border-top: 1px solid var(--line);
}

.product-name {
    font-family: var(--font-display);
    font-size: 27px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.15;
    color: var(--text);
}

.product-desc {
    font-size: 18px;
    color: var(--text-soft);
    margin-bottom: 12px;
}

/* Precio destacado en rosado (Brand Book) */
.product-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--yf-pink);
}

.products-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    gap: 12px;
    padding: 60px;
}

/* ======================================================
   CART BAR (barra inferior de la pantalla de productos)
   ====================================================== */
.cart-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 100px;
    background: var(--white);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 24px rgba(1, 60, 90, 0.08);
    flex-shrink: 0;
    transform: translateY(100%);
    transition: transform var(--transition);
}

.cart-bar.visible { transform: translateY(0); }

.cart-bar-left { display: flex; flex-direction: column; gap: 2px; }
.cart-bar-count { font-size: 17px; color: var(--text-soft); }
.cart-bar-total { font-size: 32px; font-weight: 800; color: var(--text); }

.cart-bar-btn {
    background: var(--yf-pink);
    color: var(--white);
    border: none;
    font-size: 23px;
    font-weight: 800;
    padding: 20px 44px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 22px rgba(236, 28, 138, 0.3);
}

.cart-bar-btn:active { background: var(--yf-pink-dark); transform: scale(0.97); }

/* ======================================================
   CUSTOMIZATION (Pantallas 2-3 · base, endulzante, etc.)
   "Una decisión a la vez. Opción seleccionada resaltada en
   azul con check. El stepper marca el avance."
   ====================================================== */

/* Stepper de progreso siempre visible */
.customize-progress {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 60px 6px;
    flex-shrink: 0;
    background: var(--white);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 86px;
}

.progress-dot {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 800;
    background: var(--celeste);
    color: var(--muted);
    border: 2px solid var(--celeste-deep);
    transition: all 0.3s;
}

/* Paso activo → azul */
.progress-dot.active {
    background: var(--yf-blue);
    color: var(--white);
    border-color: var(--yf-blue);
    transform: scale(1.12);
    box-shadow: 0 0 0 6px var(--yf-blue-soft);
}

/* Paso completado → azul con check */
.progress-dot.done {
    background: var(--yf-blue);
    color: var(--white);
    border-color: var(--yf-blue);
}

.progress-label { font-size: 14px; color: var(--muted); font-weight: 700; }
.progress-label.active { color: var(--yf-blue); }

.progress-line {
    flex: 1;
    height: 3px;
    background: var(--celeste-deep);
    margin: 22px 4px 0;
    border-radius: 2px;
    transition: background 0.3s;
    min-width: 34px;
}

.progress-line.done { background: var(--yf-blue); }

.customize-header {
    text-align: center;
    padding: 10px 40px 14px;
    flex-shrink: 0;
    background: var(--white);
}

.customize-header h2 {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--yf-blue);
}

.customize-header p { font-size: 22px; color: var(--text-soft); }

/* Hero del producto en armado */
.customize-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 40px 0;
    flex-shrink: 0;
    position: relative;
    background: var(--white);
}

.hero-product-wrap {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 14px 30px rgba(1, 60, 90, 0.16));
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.hero-product-img.pulse { transform: scale(1.08); }

.hero-ingredients { position: absolute; inset: 0; pointer-events: none; z-index: 2; }

.hero-ingredient-badge {
    position: absolute;
    background: var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--yf-blue);
    animation: ingredientAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-ingredient-badge img { width: 80%; height: 80%; object-fit: contain; }
.hero-ingredient-badge .badge-emoji { font-size: 22px; }

.hero-ingredient-badge:nth-child(1) { width: 48px; height: 48px; top: 8px;   left: -16px; }
.hero-ingredient-badge:nth-child(2) { width: 48px; height: 48px; top: 8px;   right: -16px; }
.hero-ingredient-badge:nth-child(3) { width: 44px; height: 44px; bottom: 40px; left: -20px; }
.hero-ingredient-badge:nth-child(4) { width: 44px; height: 44px; bottom: 40px; right: -20px; }
.hero-ingredient-badge:nth-child(5) { width: 40px; height: 40px; top: 50%;  left: -28px; transform: translateY(-50%); }
.hero-ingredient-badge:nth-child(6) { width: 40px; height: 40px; top: 50%;  right: -28px; transform: translateY(-50%); }
.hero-ingredient-badge:nth-child(7) { width: 40px; height: 40px; bottom: 4px; left: 20px; }
.hero-ingredient-badge:nth-child(8) { width: 40px; height: 40px; bottom: 4px; right: 20px; }

@keyframes ingredientAppear { 0% { transform: scale(0) rotate(-30deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }

/* Elemento que "vuela" hacia el producto al elegir */
.fly-ingredient {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    box-shadow: 0 6px 22px rgba(1, 151, 217, 0.3);
    border: 2px solid var(--yf-blue);
}

.fly-ingredient img { width: 80%; height: 80%; object-fit: contain; }
.fly-ingredient .fly-emoji { font-size: 28px; }
.fly-ingredient.flying { transform: scale(0.5); opacity: 0; }

.customize-options-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 18px 32px 16px;
    min-height: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: var(--celeste);
}

.option-grid {
    display: grid;
    gap: 20px;
    width: 100%;
    align-content: start;
}

.option-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.option-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.option-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Casillero con producto (blanco) */
.option-card {
    background: var(--white);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 156px;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.option-card:active { transform: scale(0.96); }

/* Opción seleccionada → resaltada en azul con check */
.option-card.selected {
    border-color: var(--yf-blue);
    background: var(--yf-blue-soft);
    box-shadow: 0 0 0 2px var(--yf-blue), var(--shadow);
}

.option-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--yf-blue);
    color: var(--white);
    font-size: 18px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(1, 151, 217, 0.4);
    animation: scaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.option-emoji { font-size: 54px; }

.option-img {
    width: 100%;
    max-height: 128px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(1, 60, 90, 0.10));
}

.option-name {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    color: var(--text);
}

/* Precio del extra en rosado (si se paga) */
.option-price { font-size: 17px; color: var(--yf-pink); font-weight: 800; }

.fruit-counter {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--yf-blue);
    padding: 8px 0 4px;
    flex-shrink: 0;
}

.customize-footer {
    flex-shrink: 0;
    padding: 18px 32px 36px;
    background: var(--white);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(1, 60, 90, 0.06);
}

.customize-summary {
    font-size: 18px;
    color: var(--text-soft);
    padding-bottom: 16px;
    min-height: 26px;
    text-align: center;
    line-height: 1.4;
}

.customize-actions { display: flex; gap: 16px; }

/* ======================================================
   CART SCREEN (Pantalla 4 · Resumen y pago)
   ====================================================== */
.cart-items-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
    min-height: 0;
    background: var(--celeste);
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 22px;
    color: var(--text-soft);
}

.cart-empty-icon { font-size: 84px; opacity: 0.35; }
.cart-empty p { font-size: 26px; }

.cart-items { display: flex; flex-direction: column; gap: 16px; }

.cart-item {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 20px;
    align-items: center;
}

.cart-item-emoji { font-size: 48px; flex-shrink: 0; }

.cart-item-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background:
        radial-gradient(70% 60% at 50% 40%, var(--celeste) 0%, var(--white) 80%);
    filter: drop-shadow(0 4px 10px rgba(1, 60, 90, 0.10));
}

.cart-item-details { flex: 1; min-width: 0; }

.cart-item-name {
    font-family: var(--font-display);
    font-size: 27px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}

.cart-item-config { font-size: 19px; color: var(--text-soft); margin-bottom: 4px; line-height: 1.3; }
.cart-item-addons { font-size: 17px; color: var(--yf-blue); font-weight: 600; }

.cart-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; flex-shrink: 0; }
.cart-item-price { font-size: 30px; font-weight: 800; color: var(--text); }

.cart-item-qty { display: flex; align-items: center; gap: 14px; }

.qty-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--celeste-deep);
    background: var(--white);
    font-size: 26px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--yf-blue);
    transition: all 0.15s;
}

.qty-btn:active { background: var(--yf-blue-soft); transform: scale(0.9); }
.qty-btn.remove { border-color: #F0C2C2; color: var(--danger); }

.qty-value { font-size: 24px; font-weight: 800; min-width: 32px; text-align: center; color: var(--text); }

/* Footer del carrito con upsell + total + CTA de pago */
.cart-footer {
    flex-shrink: 0;
    padding: 20px 32px 38px;
    background: var(--white);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(1, 60, 90, 0.08);
}

/* Upsell sugerido (agua, toppings, barquillo) */
.cart-upsell { margin-bottom: 18px; }

.cart-upsell-title {
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 3 sugerencias fijas, lado a lado, sin scroll ni desborde */
.cart-upsell-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.upsell-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--celeste);
    border: 2px solid var(--celeste-deep);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 0;            /* permite que el texto se trunque en vez de desbordar */
}

.upsell-chip:active { transform: scale(0.97); border-color: var(--yf-blue); }

.upsell-chip img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 10px;
    background: var(--white);
    flex-shrink: 0;
}

.upsell-chip-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.upsell-chip-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.15;
    /* Nombre a máximo 2 líneas, sin romper el layout */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.upsell-chip-price { font-size: 16px; font-weight: 800; color: var(--yf-pink); }
.upsell-chip-add {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--yf-blue);
    color: var(--white);
    font-size: 24px;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.cart-promo-panel {
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--celeste);
}

.discount-code-row { display: flex; gap: 12px; }

.discount-code-input {
    flex: 1;
    border: 2px solid var(--celeste-deep);
    border-radius: var(--radius-sm);
    padding: 16px;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--white);
    color: var(--text);
}

.discount-code-btn {
    border: none;
    border-radius: var(--radius-sm);
    background: var(--yf-blue);
    color: var(--white);
    padding: 0 26px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
}

.discount-summary { display: flex; flex-direction: column; gap: 8px; font-size: 18px; }
.discount-line, .subtotal-line { display: flex; justify-content: space-between; gap: 16px; }
.discount-line { color: var(--ok-dark); font-weight: 800; }
.subtotal-line { color: var(--text-soft); }

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-top: 8px;
    border-top: 2px dashed var(--line);
}

.cart-total-label { font-size: 30px; font-weight: 700; color: var(--text); }
.cart-total-amount { font-size: 46px; font-weight: 800; color: var(--yf-pink); }

/* ======================================================
   PAYMENT SCREEN
   ====================================================== */
#screen-payment {
    background:
        radial-gradient(120% 80% at 50% 0%, #FFFFFF 0%, var(--celeste) 60%);
    justify-content: center;
    align-items: center;
}

.payment-content { text-align: center; color: var(--text); padding: 60px; max-width: 760px; }

.payment-check {
    width: 150px;
    height: 150px;
    background: var(--ok);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 78px;
    color: var(--white);
    margin: 0 auto 40px;
    box-shadow: 0 16px 40px rgba(47, 180, 131, 0.35);
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.payment-check.processing { background: var(--yf-blue); box-shadow: 0 16px 40px rgba(1, 151, 217, 0.35); }
.payment-check.error { background: var(--danger); box-shadow: 0 16px 40px rgba(228, 87, 46, 0.35); }

.payment-title { font-family: var(--font-display); font-size: 52px; font-weight: 800; margin-bottom: 18px; color: var(--yf-blue); }
.payment-order { font-size: 30px; color: var(--text-soft); margin-bottom: 12px; font-weight: 700; }
.payment-msg { font-size: 26px; color: var(--text-soft); margin-bottom: 52px; line-height: 1.4; }
.payment-timer { font-size: 20px; color: var(--muted); margin-bottom: 30px; }

/* Spinner de procesando cobro */
.payment-spinner {
    width: 64px; height: 64px;
    border: 6px solid var(--yf-blue-soft);
    border-top-color: var(--yf-blue);
    border-radius: 50%;
    margin: 0 auto 30px;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ======================================================
   BUTTONS
   ====================================================== */
.btn {
    border: none;
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 800;
    padding: 22px 40px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.15s;
    flex: 1;
    text-align: center;
}

.btn:active { transform: scale(0.97); }

/* CTA principal → rosado (regla del Brand Book) */
.btn-primary { background: var(--yf-pink); color: var(--white); box-shadow: 0 8px 22px rgba(236, 28, 138, 0.28); }
.btn-primary:active { background: var(--yf-pink-dark); }
.btn-primary:disabled { background: #D9E2E8; color: #9BAAB4; cursor: not-allowed; transform: none; box-shadow: none; }

/* Secundario → contorno azul */
.btn-outline { background: var(--white); color: var(--yf-blue); border: 2px solid var(--celeste-deep); }
.btn-outline:active { background: var(--yf-blue-soft); }

.btn-danger-outline { background: transparent; color: var(--danger); border: 2px solid #F0C2C2; }
.btn-danger-outline:active { background: #FCEDED; }

/* Pagar → ancho completo, rosado */
.btn-pay {
    background: var(--yf-pink);
    color: var(--white);
    font-size: 30px;
    padding: 26px;
    width: 100%;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-weight: 800;
    letter-spacing: 2px;
    transition: var(--transition);
    box-shadow: 0 10px 28px rgba(236, 28, 138, 0.32);
}

.btn-pay:active { background: var(--yf-pink-dark); transform: scale(0.98); }
.btn-pay:disabled { background: #D9E2E8; color: #9BAAB4; cursor: not-allowed; box-shadow: none; }

.btn-large { font-size: 28px; padding: 26px 64px; flex: 0 1 auto; }

/* ======================================================
   TOAST
   ====================================================== */
.toast {
    position: fixed;
    bottom: -120px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--yf-blue);
    color: var(--white);
    padding: 22px 48px;
    border-radius: var(--radius-pill);
    font-size: 24px;
    font-weight: 700;
    z-index: 100;
    transition: bottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    box-shadow: 0 12px 34px rgba(1, 60, 90, 0.3);
}

.toast.show { bottom: 140px; }

/* ======================================================
   ADMIN entry buttons (heredan look sobrio)
   ====================================================== */
body.hide-admin .admin-entry-btn,
body.hide-admin .header-admin-btn { display: none !important; }

.admin-entry-btn,
.header-admin-btn {
    border: 1px solid var(--celeste-deep);
    border-radius: var(--radius-sm);
    background: var(--celeste);
    color: var(--yf-blue);
    font-size: 17px;
    font-weight: 800;
    padding: 11px 18px;
    cursor: pointer;
    z-index: 6;
}

.admin-entry-btn { position: absolute; top: 26px; right: 26px; background: rgba(255,255,255,0.7); }
.header-admin-btn { margin-left: 12px; }

/* ======================================================
   ANIMATIONS
   ====================================================== */
@keyframes floatA { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(26px, -32px); } 66% { transform: translate(-18px, 16px); } }
@keyframes floatB { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-26px, -22px); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes pulseRing { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.8); opacity: 0.3; } }
@keyframes scaleIn { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes cartBounce { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }

/* ======================================================
   SCROLLBAR
   ====================================================== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--celeste-deep); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ======================================================
   UTILITIES
   ====================================================== */
.hidden { display: none !important; }

/* ======================================================
   TECLADO EN PANTALLA (código promocional)
   ====================================================== */
.osk-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: rgba(1, 60, 90, 0.45);
    backdrop-filter: blur(2px);
}

.osk-overlay.active { display: flex; }

.osk-panel {
    width: 100%;
    max-width: 1080px;
    background: var(--white);
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    box-shadow: var(--shadow-lg);
    padding: 24px 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: oskUp 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes oskUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.osk-display {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 2px solid var(--celeste-deep);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    min-height: 70px;
    justify-content: center;
    background: var(--celeste);
}

.osk-display-label {
    font-size: 15px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.osk-display-value { font-size: 34px; font-weight: 800; color: var(--text); min-height: 40px; letter-spacing: 0.06em; }

.osk-keys { display: flex; flex-direction: column; gap: 12px; }
.osk-row { display: flex; gap: 12px; justify-content: center; }

.osk-key {
    flex: 1;
    min-width: 0;
    height: 86px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text);
    font-size: 30px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    user-select: none;
}

.osk-key:active { background: var(--yf-blue); color: var(--white); transform: translateY(2px); }
.osk-key.osk-key-wide { flex: 1.6; font-size: 26px; }

.osk-actions { display: flex; gap: 14px; }

.osk-action {
    flex: 1;
    height: 80px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 22px;
    font-weight: 800;
    cursor: pointer;
    color: var(--white);
}

.osk-action:active { transform: translateY(2px); }
.osk-action.osk-clear { background: var(--muted); }
.osk-action.osk-cancel { background: var(--text-soft); }
.osk-action.osk-apply { background: var(--yf-pink); }
