/* Box Lunch — mobile first */
:root {
  --bg: #FBF6EC;
  --paper: #FFFFFF;
  --ink: #23201B;
  --muted: #6B645A;
  --line: #E7DDCB;
  --accent: #D6452A;
  --accent-d: #B63820;
  --leaf: #2F6B4A;
  --leaf-bg: #E7F1EA;
  --sand: #F3EBDD;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(35, 32, 27, .06), 0 10px 28px rgba(35, 32, 27, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; font: 17px/1.5 var(--font); color: var(--ink); background: var(--bg);
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
}
body.vbody { padding-bottom: 32px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-d); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.7rem; margin-bottom: 14px; }
p { margin: 0 0 10px; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
.muted { color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 2px; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(251, 246, 236, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.top__in { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.15rem; }
.brand__mark { font-size: 1.4rem; }
.lang { display: inline-flex; background: var(--sand); border-radius: 999px; padding: 3px; }
.lang a { min-width: 44px; padding: 8px 12px; text-align: center; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: .85rem; }
.lang a[aria-current="true"] { background: var(--ink); color: #fff; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 22px; border: 2px solid transparent; border-radius: 14px; font: 700 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: transform .08s, background .15s; -webkit-appearance: none; appearance: none; }
.btn:active { transform: scale(.98); }
.btn--block { display: flex; width: 100%; }
.btn--big { min-height: 60px; font-size: 1.15rem; }
.btn--small { min-height: 44px; padding: 8px 14px; font-size: .9rem; }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(214, 69, 42, .28); }
.btn--primary:hover { background: var(--accent-d); }
.btn--primary[disabled] { opacity: .6; cursor: progress; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--leaf { background: var(--leaf-bg); color: var(--leaf); }
.linkbtn { background: none; border: 0; color: var(--accent-d); font: 600 .95rem var(--font); padding: 10px; min-height: 44px; cursor: pointer; text-decoration: underline; }

/* Hero */
.hero { padding: 26px 0 34px; background:
  radial-gradient(120% 70% at 100% 0%, #F8DCCB 0%, rgba(248, 220, 203, 0) 60%), var(--bg); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--leaf); margin-bottom: 8px; }
h1 { font-size: clamp(2.1rem, 9vw, 3rem); margin-bottom: 10px; }
.hero__sub { color: var(--muted); font-size: 1.1rem; margin-bottom: 20px; }
.pricecard { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px 18px 14px; box-shadow: 6px 6px 0 var(--ink); margin: 0 6px 22px 0; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-weight: 800; line-height: 1; }
.price__num { font-size: clamp(2.6rem, 15vw, 3.8rem); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.price__clp small { font-size: 1rem; margin-left: 6px; color: var(--muted); letter-spacing: .05em; }
.price__usd .price__num { color: var(--accent); }
.price__or { font-size: 1.8rem; color: var(--line); font-weight: 400; }
.pricecard--usd .price { flex-direction: row-reverse; justify-content: flex-end; }
.pricecard--usd .price__or { display: none; }
.pricecard--usd .price__clp .price__num { font-size: 1.6rem; color: var(--muted); }
.pricecard--usd .price__usd .price__num { font-size: clamp(2.6rem, 15vw, 3.8rem); }
.pricecard__per { margin: 10px 0 0; color: var(--muted); font-size: .95rem; }

/* Cómo funciona */
.how__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.how__list li { display: flex; gap: 14px; align-items: flex-start; }
.how__n { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; }
.how__list div { display: grid; }
.how__list strong { font-size: 1.05rem; }
.how__list span { color: var(--muted); }

/* Pedido */
.order { padding: 30px 0 10px; }
.step { border: 0; margin: 0 0 22px; padding: 20px 16px; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); min-inline-size: 0; }
.step legend { float: left; width: 100%; padding: 0; margin: 0 0 14px; font: 700 1.35rem var(--serif); display: flex; align-items: center; gap: 10px; }
.step legend + * { clear: both; }
.step__n { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font: 800 1rem var(--font); }
.label { font-weight: 700; margin: 14px 0 8px; font-size: .95rem; }
.box { border: 2px solid var(--line); border-radius: 16px; padding: 14px 12px 16px; margin-bottom: 12px; background: #FFFDF9; }
.box__head { display: flex; justify-content: space-between; align-items: center; min-height: 28px; }
.box__title { font-size: 1.15rem; }

/* Progreso del box */
.boxprog { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; }
.boxprog__bar { flex: 1; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.boxprog__bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .3s; }
.boxprog__txt { font-size: .85rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.box.is-complete { border-color: var(--leaf); }
.box.is-complete .boxprog__bar i { background: var(--leaf); }
.box.is-complete .boxprog__txt { color: var(--leaf); }

/* Cada sección del box (plato, fruta, barrita, mix) */
.pick { margin: 10px -6px 0; padding: 10px 6px; border: 2px solid transparent; border-radius: 14px; transition: background .2s, border-color .2s, opacity .2s; }
.pick__head { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.pick__n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--ink); font-size: .85rem; font-weight: 800; }
.pick__title { flex: 1; }
.pick__chosen { color: var(--leaf); font-size: .85rem; font-weight: 700; text-align: right; }
/* ya elegida: número → ✓ verde */
.pick.is-done .pick__n { background: var(--leaf); color: #fff; font-size: 0; }
.pick.is-done .pick__n::before { content: "✓"; font-size: .9rem; }
/* la que toca elegir ahora: resaltada */
.pick.is-current { background: #FFF3EC; border-color: var(--accent); }
.pick.is-current .pick__n { background: var(--accent); color: #fff; }
.pick.is-current .pick__title { color: var(--accent-d); }
/* las que vienen después: atenuadas (se pueden tocar igual) */
.pick.is-later { opacity: .55; }
/* faltó al intentar reservar */
.pick.is-missing { border-color: var(--accent-d); background: #FDE8E2; opacity: 1; animation: pick-shake .4s; }
@keyframes pick-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .pick.is-missing { animation: none; } }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice, .fruit, .chip, .slot { position: relative; display: block; cursor: pointer; }
.choice input, .fruit input, .chip input, .slot input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice__body { display: flex; flex-direction: column; height: 100%; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; transition: border-color .15s, box-shadow .15s; position: relative; }
.choice__img { aspect-ratio: 4/3; background: var(--sand); }
.choice__img img { width: 100%; height: 100%; object-fit: cover; }
.choice__t { font-weight: 800; padding: 10px 10px 0; font-size: 1.05rem; }
.choice__d { padding: 2px 10px 12px; color: var(--muted); font-size: .85rem; line-height: 1.3; }
.choice__tick { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--leaf); color: #fff; display: grid; place-items: center; font-weight: 800; transform: scale(0); transition: transform .15s; }
.choice input:checked + .choice__body { border-color: var(--leaf); box-shadow: 0 0 0 3px var(--leaf-bg); }
.choice input:checked + .choice__body .choice__tick { transform: scale(1); }
.choice input:focus-visible + .choice__body, .fruit input:focus-visible + .fruit__body, .chip input:focus-visible + .chip__body, .slot input:focus-visible + .slot__body { outline: 3px solid var(--leaf); outline-offset: 2px; }

.fruits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fruits--2 { grid-template-columns: repeat(2, 1fr); }
.fruit__body { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 92px; padding: 8px 4px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font-weight: 700; font-size: .9rem; text-align: center; transition: border-color .15s, background .15s; }
.fruit__body img { width: 48px; height: 48px; object-fit: contain; }
.fruit input:checked + .fruit__body { border-color: var(--leaf); background: var(--leaf-bg); color: var(--leaf); }

.chips--days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin: 0 -4px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.chip--day { flex: none; scroll-snap-align: start; }
.chip__body { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 74px; min-height: 92px; padding: 8px 6px; border: 2px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .15s, background .15s; }
.chip__top { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); }
.chip__big { font: 800 1.7rem/1.1 var(--font); }
.chip__sub { font-size: .8rem; color: var(--muted); }
.chip input:checked + .chip__body { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip input:checked + .chip__body .chip__top, .chip input:checked + .chip__body .chip__sub { color: #ddd; }

.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; min-height: 64px; }
.slots > .muted { grid-column: 1 / -1; }
.slot__body { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 68px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font-weight: 800; font-size: 1.1rem; transition: border-color .15s, background .15s; }
.slot__body small { font-weight: 600; font-size: .72rem; color: var(--muted); }
.slot input:checked + .slot__body { border-color: var(--accent); background: var(--accent); color: #fff; }
.slot input:checked + .slot__body small { color: #fff; }
.slot input:disabled { cursor: not-allowed; }
.slot input:disabled + .slot__body { background: var(--sand); color: #aaa; border-style: dashed; }

/* Tarjeta "Dónde retirar": borde verde y botón sólido para que se note */
.where { margin-top: 22px; padding: 16px; background: var(--leaf-bg); border: 2px solid var(--leaf); border-radius: 16px; box-shadow: var(--shadow); }
.where p { margin: 0; }
.where__eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--leaf); }
.where__name { margin-top: 6px !important; font: 800 1.35rem/1.2 var(--font); }
.where__addr { margin-top: 2px !important; font-size: 1rem; }
.where__note { margin-top: 8px !important; font-size: .88rem; color: var(--muted); }
.btn--map { margin-top: 14px; background: var(--leaf); color: #fff; }
.btn--map:hover { background: #255A3D; }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=tel], textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; font: 1rem/1.3 var(--font); /* 16px+: evita el zoom de iOS */
  color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 12px; -webkit-appearance: none; appearance: none;
}
textarea { resize: vertical; min-height: 76px; }
input:focus, textarea:focus { border-color: var(--leaf); outline: 3px solid var(--leaf-bg); }
input[aria-invalid="true"] { border-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 0; }
.hint { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
.hint--box { background: var(--sand); padding: 10px 12px; border-radius: 10px; margin: 0 0 12px; color: var(--ink); }
.hint--center { text-align: center; }
.err { color: var(--accent-d); font-weight: 700; font-size: .9rem; margin: 6px 0 0; }
.notice { background: var(--sand); padding: 12px 14px; border-radius: 12px; }

.summary { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 20px 18px; margin-bottom: 8px; }
.summary h3 { font-size: 1.3rem; margin-bottom: 10px; }
.summary dl { margin: 0 0 8px; }
.summary dl div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.summary dt, .summary dd { margin: 0; }
.summary dd { text-align: right; font-weight: 700; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0 6px; font-weight: 700; }
.summary__amt { display: flex; flex-direction: column; align-items: flex-end; }
.summary__amt strong { font-size: 2rem; line-height: 1; letter-spacing: -.02em; }
.summary__amt small { color: #cfc8ba; font-size: .95rem; }
.summary .hint { color: #cfc8ba; margin: 4px 0 14px; }
.summary .err { color: #ffb4a3; }

/* FAQ / pie */
.faq { padding: 26px 0 10px; }
details { background: var(--paper); border-radius: 14px; margin-bottom: 8px; box-shadow: var(--shadow); }
summary { cursor: pointer; padding: 15px 16px; font-weight: 700; min-height: 52px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.4rem; color: var(--accent); }
details[open] summary::after { content: '–'; }
details p { padding: 0 16px 14px; margin: 0; color: var(--muted); }
.foot { padding: 28px 0 10px; text-align: center; color: var(--muted); }
.foot p { margin: 0 0 6px; }
.foot__small { font-size: .85rem; }

/* Barra fija */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(35, 32, 27, .1); padding-bottom: env(safe-area-inset-bottom); transform: translateY(0); }
.bar__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.bar__sum { display: flex; flex-direction: column; line-height: 1.15; }
.bar__sum span { font-size: .8rem; color: var(--muted); }
.bar__sum strong { font-size: 1.35rem; }
.bar .btn { min-width: 140px; }

/* Voucher */
.vpage { padding-top: 18px; padding-bottom: 20px; }
.vstatus { text-align: center; font-weight: 800; padding: 10px; border-radius: 12px; background: var(--sand); }
.vstatus--picked_up { background: var(--leaf-bg); color: var(--leaf); }
.vstatus--cancelled, .vstatus--no_show { background: #FBE3DD; color: var(--accent-d); }
.ticket { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 16px; }
.ticket--off { opacity: .55; filter: grayscale(.6); }
.ticket__top { padding: 22px 18px 18px; text-align: center; background: var(--ink); color: #fff; }
.ticket__brand { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: #cfc8ba; margin-bottom: 14px; }
.ticket__show { margin-bottom: 6px; color: #e6dfd0; }
.ticket__code { font: 800 clamp(2.6rem, 14vw, 3.6rem)/1.1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; margin: 0; color: #FFD9CF; }
.ticket__cut { height: 20px; background:
  radial-gradient(circle at 0 50%, var(--bg) 10px, transparent 11px) left / 20px 20px repeat-y,
  radial-gradient(circle at 100% 50%, var(--bg) 10px, transparent 11px) right / 20px 20px repeat-y;
  background: radial-gradient(circle 10px at 0 50%, var(--bg) 98%, transparent) no-repeat left, radial-gradient(circle 10px at 100% 50%, var(--bg) 98%, transparent) no-repeat right;
  border-top: 2px dashed var(--line); margin-top: -10px; position: relative; top: 0; }
.ticket__body { padding: 8px 18px 18px; }
.kv { margin: 0; }
.kv > div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.kv dd { margin: 2px 0 0; font-weight: 600; }
.kv__big { font-size: 1.25rem; font-weight: 800 !important; }
.kv__total { border-bottom: 0 !important; }
.kv__total dd { font-size: 1.6rem; font-weight: 800; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 2px 0; font-weight: 500; }
.actions { display: grid; gap: 10px; margin-bottom: 14px; }

/* Pantallas medianas/grandes */
@media (min-width: 560px) {
  .grid2 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .step { padding: 24px 22px; }
  .chips--days { flex-wrap: wrap; overflow: visible; }
}
@media (min-width: 900px) {
  body { font-size: 18px; }
  .bar { display: none !important; }
  body { padding-bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .top, .actions, .hint, .bar { display: none !important; }
  body { background: #fff; }
}

/* Portada bloqueada: hasta tocar "Pedir ahora" solo se ve la portada, a pantalla completa */
.is-gated .order, .is-gated .faq, .is-gated .foot { display: none; }
.is-gated body { padding-bottom: 0; } /* el espacio para la barra inferior no hace falta en la portada */
/* portada = exactamente una pantalla, sin importar la altura de la barra superior (notch del iPhone) */
.is-gated body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.is-gated main { flex: 1; display: flex; flex-direction: column; }
.is-gated .hero { flex: 1; }
.hero__actions { display: grid; gap: 10px; }

/* Lista de pasos dentro de la ventana "Cómo funciona" */
#howDialog .modal__card { text-align: left; }
#howDialog .modal__title { margin: 0 0 16px; }
#howDialog .how__list { margin-bottom: 20px; }

/* Ventana "¿Agregar otro box?" */
.modal { width: min(420px, calc(100% - 32px)); margin: auto; padding: 0; border: 0; border-radius: 20px; background: var(--paper); color: var(--ink); box-shadow: 0 20px 60px rgba(35, 32, 27, .3); }
.modal::backdrop { background: rgba(35, 32, 27, .45); }
.modal__card { padding: 24px 20px 20px; text-align: center; }
.modal__icon { font-size: 2.4rem; line-height: 1; }
.modal__title { margin: 10px 0 6px; font: 700 1.4rem/1.2 var(--serif); }
.modal__text { margin: 0 0 18px; color: var(--muted); }
.modal__actions { display: grid; gap: 10px; }
@media (max-width: 560px) {
  .modal { width: 100%; max-width: none; margin: auto 0 0; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); }
}
