/* ============================================================
   DELIVERY24 — App styles (vanilla, zero-dependency)
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--font-system);
  background:
    radial-gradient(1200px 600px at 50% -10%, #2a2d39 0%, transparent 60%),
    linear-gradient(180deg, #1a1c24 0%, #101218 100%);
  color: #fff;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ---------- Stage layout: phone(s) + side rail ---------- */
.stage {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   iPhone frame (custom CSS, no dependency)
   ============================================================ */
.phone {
  --pw: 390px;
  --ph: 844px;
  position: relative;
  width: calc(var(--pw) + 24px);
  height: calc(var(--ph) + 24px);
  border-radius: 60px;
  background: linear-gradient(155deg, #2b2d35, #0c0d10 60%);
  padding: 12px;
  box-shadow:
    0 0 0 2px #000,
    0 0 0 3px #3a3d47,
    0 40px 80px -20px rgba(0,0,0,.7),
    0 10px 30px rgba(0,0,0,.5);
  flex: 0 0 auto;
}
.phone__screen {
  position: relative;
  width: var(--pw);
  height: var(--ph);
  border-radius: 48px;
  overflow: hidden;
  background: var(--bg);
  color: var(--on);
  transition: background var(--dur-base) var(--ease-out);
}
.phone__notch {
  position: absolute;
  top: 11px; left: 50%; transform: translateX(-50%);
  width: 124px; height: 34px;
  background: #000;
  border-radius: 20px;
  z-index: 60;
}
.phone__notch::after {
  content: ""; position: absolute; right: 26px; top: 11px;
  width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #3a4a66, #0a0d14 70%);
}

/* iOS status bar */
.statusbar {
  display: none; /* barra de estado falsa (hora/cobertura/batería) oculta */
  position: absolute; top: 0; left: 0; right: 0; height: 54px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 30px 0; z-index: 55;
  font-size: 14px; font-weight: var(--w-semibold);
  color: var(--on);
  pointer-events: none;
}
.statusbar .sb-time { letter-spacing: .02em; }
.statusbar .sb-icons { display: flex; align-items: center; gap: 6px; }
.statusbar .sb-icons svg { display: block; }

/* ============================================================
   App scroll area + screens
   ============================================================ */
.app {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
}
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateX(16px);
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
  z-index: 1;
}
.screen.is-active { opacity: 1; visibility: visible; pointer-events: auto; transform: none; z-index: 2; }
.screen.is-back { transform: translateX(-16px); }

.scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-top: 54px; /* below status bar */
}
.scroll::-webkit-scrollbar { width: 0; height: 0; }
.scroll.no-statuspad { padding-top: 0; }

/* ============================================================
   Typography helpers
   ============================================================ */
.display {
  font-family: var(--display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-spacing);
  text-transform: var(--display-transform);
  line-height: 1.04;
  color: var(--on);
}
.eyebrow {
  font-size: var(--text-xs); font-weight: var(--w-bold);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand-ink);
}
.muted { color: var(--on-muted); }
.faint { color: var(--on-faint); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: var(--w-bold); font-size: var(--text-base);
  border-radius: var(--radius-pill);
  padding: 14px 22px; line-height: 1;
  transition: transform var(--dur-fast) var(--ease-out), filter var(--dur-fast), background var(--dur-fast);
  white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn--brand { background: var(--brand); color: var(--brand-on); }
.btn--brand:hover { filter: brightness(1.06); }
.btn--ghost { background: var(--surface-2); color: var(--on); }
.btn--outline { border: 1.5px solid var(--line-strong); color: var(--on); }
.btn--block { display: flex; width: 100%; }
.btn--lg { padding: 17px 24px; font-size: var(--text-md); }
.btn--sm { padding: 9px 14px; font-size: var(--text-sm); }

/* ============================================================
   Generic surfaces
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.pad { padding: var(--space-5); }
.row { display: flex; align-items: center; gap: var(--space-3); }
.between { display: flex; align-items: center; justify-content: space-between; }
.stack { display: flex; flex-direction: column; }

/* ============================================================
   Photo placeholder (swap for real food photos later)
   ============================================================ */
.photo {
  position: relative; overflow: hidden;
  background-size: cover; background-position: center;
  background-color: var(--surface-2);
  isolation: isolate;
}
.photo--gen {
  background: var(--ph-grad, linear-gradient(135deg, #F8B7CE, #F25C8A));
}
.photo--gen::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(120% 80% at 25% 18%, rgba(255,255,255,.34), transparent 55%),
    radial-gradient(90% 70% at 85% 95%, rgba(0,0,0,.32), transparent 60%);
  mix-blend-mode: soft-light;
}
.photo__tag {
  position: absolute; left: 10px; bottom: 9px; z-index: 3;
  font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.78);
  background: rgba(0,0,0,.28); backdrop-filter: blur(3px);
  padding: 3px 7px; border-radius: 6px;
}

/* ============================================================
   App top header (per screen)
   ============================================================ */
.appbar {
  position: relative; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 18px 10px;
}
.appbar--float { position: absolute; top: 54px; left: 0; right: 0; }
.iconbtn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--on); flex: 0 0 auto;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-fast);
}
.iconbtn:active { transform: scale(.92); }
.iconbtn--glass { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.28); color: #fff; backdrop-filter: blur(8px); box-shadow: none; }

/* ============================================================
   Bottom tab bar
   ============================================================ */
.tabbar {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 8px 14px calc(8px + 18px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--on-faint); font-size: 10px; font-weight: var(--w-semibold);
  padding: 5px 0; transition: color var(--dur-fast);
}
.tab svg { width: 24px; height: 24px; }
.tab.is-active { color: var(--brand-ink); }
.tab .tab-dot { display: none; }

/* Cart badge on tab */
.tab__wrap { position: relative; }
.tab__badge {
  position: absolute; top: -4px; right: -9px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--brand); color: var(--brand-on);
  font-size: 10px; font-weight: 800; display: grid; place-items: center;
  border: 2px solid var(--surface);
}

/* ============================================================
   Segmented control (Domicilio / Recogida)
   ============================================================ */
.segment {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface-2); border-radius: var(--radius-pill);
  padding: 4px; position: relative;
}
.segment__thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px); border-radius: var(--radius-pill);
  background: var(--surface); box-shadow: var(--shadow-card);
  transition: transform var(--dur-base) var(--ease-spring);
  z-index: 0;
}
.segment[data-i="1"] .segment__thumb { transform: translateX(100%); }
.segment button {
  position: relative; z-index: 1; padding: 11px 8px;
  font-size: var(--text-sm); font-weight: var(--w-bold); color: var(--on-muted);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: color var(--dur-base);
}
.segment button.is-on { color: var(--on); }

/* ============================================================
   Search field
   ============================================================ */
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border-radius: var(--radius-pill);
  padding: 12px 16px; color: var(--on-muted);
  border: 1px solid transparent;
}
.search input {
  flex: 1; border: none; background: none; outline: none;
  color: var(--on); font-size: var(--text-base);
}
.search input::placeholder { color: var(--on-faint); }

/* ============================================================
   Category chips
   ============================================================ */
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 2px 18px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--on);
  font-size: var(--text-sm); font-weight: var(--w-semibold);
  border: 1px solid transparent; white-space: nowrap;
  transition: all var(--dur-fast);
}
.chip.is-active { background: var(--brand); color: var(--brand-on); }

/* round category tiles on home */
.cats { display: flex; gap: 16px; overflow-x: auto; padding: 4px 18px 4px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: 0 0 auto; width: 72px; text-align: center; }
.cat__img { width: 72px; height: 72px; border-radius: 22px; box-shadow: var(--shadow-card); }
.cat__name { margin-top: 7px; font-size: var(--text-xs); font-weight: var(--w-semibold); color: var(--on); }

/* ============================================================
   Section header
   ============================================================ */
.sec { padding: 0 18px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 18px 12px; }
.sec-head h3 { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-spacing); text-transform: var(--display-transform); font-size: var(--text-xl); color: var(--on); }
.sec-head a { font-size: var(--text-sm); font-weight: var(--w-bold); color: var(--brand-ink); }

/* ============================================================
   Promo banner carousel
   ============================================================ */
.promos { display: flex; gap: 14px; overflow-x: auto; padding: 4px 18px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.promos::-webkit-scrollbar { display: none; }
.promo {
  scroll-snap-align: start; flex: 0 0 86%;
  border-radius: var(--radius-lg); overflow: hidden;
  position: relative; min-height: 158px; display: flex;
  box-shadow: var(--shadow-card);
}
.promo__body { position: relative; z-index: 2; padding: 18px; display: flex; flex-direction: column; justify-content: center; max-width: 70%; }
.promo__kicker { font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.promo h4 { font-family: var(--display); color: #fff; font-size: var(--text-2xl); line-height: 1.02; margin: 6px 0 8px; letter-spacing: -.01em; }
.promo p { color: rgba(255,255,255,.9); font-size: var(--text-sm); font-weight: 500; }
.promo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(0,0,0,.55), rgba(0,0,0,.05) 70%); z-index: 1; }

/* ============================================================
   Restaurant cards (selector de restaurante)
   ============================================================ */
.resto { overflow: hidden; }
.resto__hero { height: 132px; position: relative; }
.resto__logo {
  position: absolute; left: 16px; bottom: -22px; z-index: 4;
  width: 58px; height: 58px; border-radius: 16px;
  display: grid; place-items: center; font-weight: 800;
  box-shadow: var(--shadow-card); border: 2px solid var(--surface);
}
.resto__fav { position: absolute; top: 12px; right: 12px; z-index: 4; }
.resto__badge {
  position: absolute; top: 12px; left: 12px; z-index: 4;
  background: rgba(0,0,0,.45); backdrop-filter: blur(4px); color: #fff;
  font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
}
.resto__body { padding: 30px 16px 16px; }
.resto__meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: var(--text-sm); color: var(--on-muted); font-weight: 500; margin-top: 4px; }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--on-faint); }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--text-xs); font-weight: 700; padding: 4px 9px; border-radius: 999px;
}
.pill--rating { background: var(--surface-2); color: var(--on); }
.pill--gold { background: var(--gold-soft); color: var(--gold); }
.pill--ok { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-ink); }

/* closed state */
.resto.is-closed .resto__hero { filter: grayscale(.6) brightness(.7); }

/* ============================================================
   Menu — product cards (two styles via [data-cardstyle])
   ============================================================ */
.menu-list { padding: 0 18px 8px; display: flex; flex-direction: column; gap: 14px; }

/* photo-dominant (default) */
.prod {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card);
  position: relative;
}
.prod__photo { height: 150px; position: relative; }
.prod__body { padding: 13px 15px 15px; }
.prod__name { font-weight: var(--w-bold); font-size: var(--text-md); color: var(--on); letter-spacing: -.01em; }
.prod__desc { font-size: var(--text-sm); color: var(--on-muted); margin-top: 4px; line-height: 1.4; }
.prod__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.prod__price { font-weight: var(--w-bold); font-size: var(--text-lg); color: var(--on); }
.prod__price s { font-size: var(--text-sm); color: var(--on-faint); font-weight: 500; margin-right: 6px; }
.addbtn {
  width: 40px; height: 40px; border-radius: 13px;
  background: var(--brand); color: var(--brand-on);
  display: grid; place-items: center; box-shadow: var(--shadow-card);
  transition: transform var(--dur-fast) var(--ease-spring);
}
.addbtn:active { transform: scale(.85); }
.tagline-row { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.minitag { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--on-muted); letter-spacing: .02em; }
.minitag--hot { background: var(--brand-soft); color: var(--brand-ink); }

/* allergens */
.allergens { display: flex; gap: 5px; margin-top: 9px; }
.allg {
  width: 21px; height: 21px; border-radius: 7px; display: grid; place-items: center;
  font-size: 9px; font-weight: 800; background: var(--surface-2); color: var(--on-muted);
  border: 1px solid var(--line);
}

/* compact list style */
[data-cardstyle="compact"] .prod { display: flex; flex-direction: row-reverse; }
[data-cardstyle="compact"] .prod__photo { width: 104px; height: auto; flex: 0 0 104px; align-self: stretch; }
[data-cardstyle="compact"] .prod__body { flex: 1; padding: 13px 14px; }
[data-cardstyle="compact"] .prod__photo .addbtn { display: none; }
[data-cardstyle="compact"] .prod .addbtn--corner { display: grid; }

.addbtn--corner { position: absolute; right: 12px; bottom: 12px; z-index: 3; }
[data-cardstyle="photo"] .addbtn--corner { display: none; }

/* category sticky tabs in menu */
.menu-tabs {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

/* combos strip */
.combos { display: flex; gap: 14px; overflow-x: auto; padding: 4px 18px 8px; scrollbar-width: none; }
.combos::-webkit-scrollbar { display: none; }
.combo {
  flex: 0 0 200px; border-radius: var(--radius-md); overflow: hidden; position: relative;
  min-height: 120px; box-shadow: var(--shadow-card); display: flex; align-items: flex-end;
}
.combo__body { position: relative; z-index: 2; padding: 13px; }
.combo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.65), transparent 65%); z-index: 1; }
.combo h5 { color: #fff; font-weight: 800; font-size: var(--text-base); }
.combo .combo__price { color: #fff; font-weight: 800; margin-top: 3px; }
.combo .combo__price s { opacity: .7; font-weight: 500; font-size: 12px; margin-right: 5px; }

/* ============================================================
   Floating cart bar (above tab bar in menu)
   ============================================================ */
.cartbar {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 45;
  background: var(--brand); color: var(--brand-on);
  border-radius: var(--radius-pill); padding: 13px 18px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-pop);
  transform: translateY(140%); transition: transform var(--dur-base) var(--ease-spring);
}
.cartbar.is-shown { transform: none; }
.cartbar__count { background: rgba(255,255,255,.22); padding: 3px 9px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.cartbar__txt { font-weight: 800; }
.cartbar__price { font-weight: 800; }

/* ============================================================
   Cart / checkout
   ============================================================ */
.cart-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item__photo { width: 64px; height: 64px; border-radius: 12px; flex: 0 0 64px; }
.cart-item__name { font-weight: var(--w-bold); color: var(--on); font-size: var(--text-base); }
.cart-item__price { font-weight: var(--w-bold); color: var(--on); }
.stepper { display: inline-flex; align-items: center; gap: 0; background: var(--surface-2); border-radius: var(--radius-pill); }
.stepper button { width: 30px; height: 30px; display: grid; place-items: center; color: var(--brand-ink); font-weight: 800; }
.stepper span { min-width: 22px; text-align: center; font-weight: 800; font-size: 14px; color: var(--on); }

.field { display: block; margin-bottom: 12px; }
.field label { display: block; font-size: var(--text-sm); font-weight: var(--w-bold); color: var(--on); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--surface-2); border: 1.5px solid transparent;
  border-radius: var(--radius-sm); padding: 13px 14px; color: var(--on);
  font-size: var(--text-base); outline: none; transition: border-color var(--dur-fast);
}
.field input:focus, .field textarea:focus { border-color: var(--brand); }

.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.optcard {
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 13px;
  display: flex; align-items: center; gap: 10px; transition: all var(--dur-fast);
  background: var(--surface);
}
.optcard.is-on { border-color: var(--brand); background: var(--brand-soft); }
.optcard__radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); flex: 0 0 18px; display: grid; place-items: center; }
.optcard.is-on .optcard__radio { border-color: var(--brand); }
.optcard.is-on .optcard__radio::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }

/* tip chips */
.tips { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.tipchip { padding: 11px 6px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); text-align: center; font-weight: 700; font-size: 14px; color: var(--on); transition: all var(--dur-fast); }
.tipchip.is-on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }

/* map mock */
.map {
  height: 150px; border-radius: var(--radius-md); position: relative; overflow: hidden;
  background:
    linear-gradient(0deg, rgba(0,0,0,.04), rgba(0,0,0,.04)),
    repeating-linear-gradient(0deg, transparent 0 28px, color-mix(in srgb,var(--on) 7%, transparent) 28px 29px),
    repeating-linear-gradient(90deg, transparent 0 28px, color-mix(in srgb,var(--on) 7%, transparent) 28px 29px),
    var(--surface-2);
  border: 1px solid var(--line);
}
.map__road { position: absolute; background: color-mix(in srgb, var(--on) 12%, transparent); }
.map__pin {
  position: absolute; width: 30px; height: 30px; transform: translate(-50%,-100%);
  z-index: 4;
}
.map__pin svg { filter: drop-shadow(0 4px 6px rgba(0,0,0,.3)); }

/* summary line */
.sumline { display: flex; justify-content: space-between; padding: 7px 0; font-size: var(--text-base); color: var(--on-muted); }
.sumline.total { color: var(--on); font-weight: 800; font-size: var(--text-lg); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 13px; }
.sumline .free { color: var(--brand-ink); font-weight: 700; }

/* nocomision banner */
.nocom {
  display: flex; gap: 11px; align-items: center;
  background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
  border-radius: var(--radius-md); padding: 13px 15px;
}
.nocom svg { color: var(--gold); flex: 0 0 auto; }
.nocom b { color: var(--on); }
.nocom span { font-size: var(--text-sm); color: var(--on-muted); }

/* ============================================================
   Order tracking
   ============================================================ */
.track-map {
  height: 300px; position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(0deg, transparent 0 34px, color-mix(in srgb,var(--on) 6%, transparent) 34px 35px),
    repeating-linear-gradient(90deg, transparent 0 34px, color-mix(in srgb,var(--on) 6%, transparent) 34px 35px),
    var(--surface-2);
}
.track-route { position: absolute; inset: 0; z-index: 2; }
.courier {
  position: absolute; z-index: 5; width: 46px; height: 46px;
  transform: translate(-50%,-50%);
  transition: left 1s linear, top 1s linear;
}
.courier__badge {
  width: 46px; height: 46px; border-radius: 50%; background: var(--brand);
  display: grid; place-items: center; color: var(--brand-on);
  box-shadow: 0 6px 16px rgba(0,0,0,.3); border: 3px solid var(--surface);
}
.courier__pulse { position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; animation: pulse 2s var(--ease-out) infinite; }
@keyframes pulse { 0%{transform:scale(.8);opacity:.7} 100%{transform:scale(1.8);opacity:0} }
.mapdest, .maporigin {
  position: absolute; z-index: 4; transform: translate(-50%,-50%);
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); box-shadow: var(--shadow-card); border: 1px solid var(--line);
}

/* tracking sheet */
.tracksheet {
  position: relative; margin-top: -22px; z-index: 6;
  background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 8px 20px 20px; box-shadow: 0 -10px 30px rgba(0,0,0,.12);
}
.grabber { width: 38px; height: 4px; border-radius: 99px; background: var(--line-strong); margin: 8px auto 14px; }

/* status stepper */
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: 14px; }
.step__rail { display: flex; flex-direction: column; align-items: center; }
.step__dot {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 28px;
  display: grid; place-items: center; background: var(--surface-2);
  color: var(--on-faint); border: 2px solid var(--line); z-index: 1;
  transition: all var(--dur-base);
}
.step__line { width: 2px; flex: 1; background: var(--line); min-height: 26px; transition: background var(--dur-base); }
.step__txt { padding-bottom: 22px; }
.step__txt h5 { font-weight: var(--w-bold); color: var(--on); font-size: var(--text-base); }
.step__txt p { font-size: var(--text-sm); color: var(--on-muted); margin-top: 2px; }
.step.done .step__dot { background: var(--brand); border-color: var(--brand); color: var(--brand-on); }
.step.done .step__line { background: var(--brand); }
.step.current .step__dot { background: var(--surface); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 4px var(--brand-soft); }
.step.current .step__txt h5 { color: var(--brand-ink); }

/* tracking style B: ring */
.eta-ring { display: grid; place-items: center; padding: 10px 0 4px; }
.ring { position: relative; width: 150px; height: 150px; }
.ring svg { transform: rotate(-90deg); }
.ring__num { position: absolute; inset: 0; display: grid; place-items: center; flex-direction: column; text-align: center; }
.ring__num b { font-family: var(--display); font-size: 38px; color: var(--on); line-height: 1; }
.ring__num span { font-size: 11px; color: var(--on-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }

/* courier card */
.courier-card { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--surface-2); border-radius: var(--radius-md); }
.courier-card__avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; font-weight: 800; color: var(--brand-ink); }

/* ============================================================
   Account + BanBan Pass
   ============================================================ */
.pass {
  border-radius: var(--radius-lg); padding: 20px; position: relative; overflow: hidden;
  color: #fff; box-shadow: var(--shadow-pop);
  background: linear-gradient(135deg, #1a1c22, #0c0d10);
}
.pass--gold { background: linear-gradient(135deg, #6e5a16, #2a2410 70%); }
.pass::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, var(--gold-soft), transparent 70%); }
.pass__tier { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.pass__pts { font-family: var(--display); font-size: 42px; font-weight: 800; line-height: 1; margin: 6px 0 2px; }
.pass__bar { height: 7px; border-radius: 99px; background: rgba(255,255,255,.16); margin: 14px 0 8px; overflow: hidden; }
.pass__bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold), #f2d678); }
.pass__locals { display: flex; gap: 6px; margin-top: 14px; }
.pass__local { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: rgba(255,255,255,.12); }

.reward { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.reward__icon { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; color: var(--brand-ink); flex: 0 0 42px; }
.reward__cost { font-size: 12px; font-weight: 800; color: var(--gold); }

.listrow { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.listrow__icon { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--on-muted); flex: 0 0 40px; }
.listrow__chev { margin-left: auto; color: var(--on-faint); }

.order-hist { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.order-hist__photo { width: 52px; height: 52px; border-radius: 12px; flex: 0 0 52px; }

.profile-head { display: flex; align-items: center; gap: 14px; padding: 4px 0 4px; }
.avatar-lg { width: 60px; height: 60px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 24px; }

/* ============================================================
   Toast
   ============================================================ */
.toast-wrap { position: absolute; left: 0; right: 0; bottom: 92px; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  background: var(--on); color: var(--bg); font-weight: 700; font-size: 13px;
  padding: 11px 18px; border-radius: 999px; box-shadow: var(--shadow-pop);
  display: flex; align-items: center; gap: 9px;
  animation: toastin var(--dur-base) var(--ease-spring);
}
.toast svg { color: var(--brand-ink); }
@keyframes toastin { from { transform: translateY(16px); opacity: 0; } }

/* ============================================================
   Fly-to-cart dot
   ============================================================ */
.fly { position: absolute; z-index: 90; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); pointer-events: none; box-shadow: 0 4px 10px rgba(0,0,0,.3); }

/* ============================================================
   Theme switcher (in-app sheet)
   ============================================================ */
.brandsheet { display: flex; flex-direction: column; gap: 10px; }
.brandopt {
  display: flex; align-items: center; gap: 14px; padding: 13px; border-radius: var(--radius-md);
  border: 2px solid var(--line); transition: all var(--dur-fast); background: var(--surface);
}
.brandopt.is-on { border-color: var(--brand); }
.brandopt__sw { width: 46px; height: 46px; border-radius: 13px; flex: 0 0 46px; display: grid; place-items: center; font-weight: 800; color: #fff; }
.brandopt__name { font-weight: 800; color: var(--on); }
.brandopt__cuisine { font-size: 13px; color: var(--on-muted); }

/* ============================================================
   Bottom sheet (generic)
   ============================================================ */
.sheet-scrim { position: absolute; inset: 0; background: var(--scrim); z-index: 70; opacity: 0; pointer-events: none; transition: opacity var(--dur-base); }
.sheet-scrim.is-open { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 75;
  background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 10px 20px calc(20px + 12px); transform: translateY(100%);
  transition: transform var(--dur-base) var(--ease-spring); max-height: 86%; overflow-y: auto; scrollbar-width: none;
}
.sheet::-webkit-scrollbar { display: none; }
.sheet.is-open { transform: none; }

/* ============================================================
   Side rail (instructions panel beside phone)
   ============================================================ */
.rail { width: 300px; flex: 0 0 300px; color: #e8eaf0; padding-top: 8px; }
.rail__logo { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.rail__logo b { font-family: var(--font-system); font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.rail h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; line-height: 1.15; }
.rail p { font-size: 13.5px; line-height: 1.6; color: #aab0c0; margin-bottom: 14px; }
.rail__card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.rail__card h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: #C9A227; margin-bottom: 9px; font-weight: 700; }
.rail__nav { display: flex; flex-direction: column; gap: 2px; }
.rail__nav button { text-align: left; padding: 9px 12px; border-radius: 9px; color: #c4cad8; font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 10px; transition: background var(--dur-fast); }
.rail__nav button:hover { background: rgba(255,255,255,.06); }
.rail__nav button.is-on { background: rgba(255,255,255,.1); color: #fff; }
.rail__nav .num { width: 22px; height: 22px; border-radius: 7px; background: rgba(255,255,255,.1); display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.rail__brandrow { display: flex; gap: 8px; margin-top: 4px; }
.rail__brandchip { flex: 1; padding: 9px 6px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,.12); font-size: 11px; font-weight: 700; color: #fff; text-align: center; transition: all var(--dur-fast); cursor: pointer; }
.rail__brandchip.is-on { border-color: transparent; }
.rail__hint { font-size: 12px; color: #8a90a0; line-height: 1.5; }

@media (max-width: 1100px) { .rail { display: none; } }

/* ============================================================
   FIX viewport — la barra de acción (enviar pedido / checkout)
   queda SIEMPRE visible. El marco debe caber en la pantalla.
   ============================================================ */
/* Móvil: la app ocupa toda la pantalla (sin marco). La cartbar,
   anclada al fondo del .phone__screen, se pega al fondo real. */
@media (max-width: 760px) {
  body { padding: 0; align-items: stretch; min-height: 100dvh; }
  .stage { gap: 0; width: 100%; flex-wrap: nowrap; }
  .phone {
    width: 100vw; height: 100vh; height: 100dvh;
    border-radius: 0; padding: 0; box-shadow: none;
  }
  .phone__screen { width: 100%; height: 100%; border-radius: 0; }
  .phone__notch { display: none; }
}
/* Escritorio con ventana baja: escala el móvil para que quepa entero. */
@media (min-width: 761px) and (max-height: 940px) {
  body { align-items: flex-start; }
  .phone { transform: scale(.84); transform-origin: top center; }
}
@media (min-width: 761px) and (max-height: 800px) {
  .phone { transform: scale(.70); transform-origin: top center; }
}

/* ============================================================
   Comparison strip (Personalización side-by-side)
   ============================================================ */
.mini-phones { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; }
.miniphone {
  width: 240px; flex: 0 0 240px; border-radius: 30px; overflow: hidden;
  border: 8px solid #1a1c22; box-shadow: var(--shadow-pop); background: #000;
}

/* utility */
.hr { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.spacer-tab { height: 96px; }
.spacer-cta { height: 110px; }
