/* Pizza Studio flow — wizard, sticky action bar, upgrades & upsells, summary, WhatsApp handoff.
   Loaded after style.css and reuses its tokens (brand, brand-soft, paper, line, ink, muted). */
:root {
  --wa: #1faa59;
  --wa-dark: #178a48;
  --bar-h: 76px;
  --stage-h: clamp(230px, 36svh, 300px);
}

/* ── Layout: the pizza stays in view while you build ─────────────────── */
.studio { overflow: clip; }
@media (min-width: 761px) {
  .studio { align-items: start; background: linear-gradient(90deg, #e4f5ed 0 52.83%, #fff 52.83%); }
  .visual { position: sticky; top: 0; min-height: min(100vh, 860px); background: linear-gradient(180deg, #faf9f6 0, #e4f5ed 100%); }
  .pizza-stage { flex: 1; min-height: 360px; }
  .builder-controls { min-height: min(100vh, 860px); }
  .step-panel { flex: none; min-height: 0; }
}
.pizza-stage .orbit-label {
  top: auto; bottom: 14px; left: 50%; width: auto; transform: translateX(-50%); white-space: nowrap;
  padding: 7px 14px; border-radius: 30px; background: #ffffff9e; backdrop-filter: blur(6px); color: #86775a; font-weight: 600;
}
#scene canvas { touch-action: pan-y; }
.pizza-caption h2 { min-height: 1.2em; }

@media (max-width: 760px) {
  body { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }
  .studio { display: block; }
  .visual { display: contents; }
  .visual-top, .visual-foot { display: none; }
  .pizza-stage {
    position: sticky; top: 0; z-index: 6;
    height: var(--stage-h); min-height: 0; flex: none;
    background: radial-gradient(ellipse at 50% 42%, #faf9f7 0, #e4f5ed 72%, #daeee5 100%);
    border-bottom: 1px solid #d8ece3;
  }
  .pizza-stage:after { display: none; }
  .pizza-stage .orbit-label { bottom: 8px; font-size: 11px; padding: 5px 11px; }
  .pizza-caption { background: #f8f6f1; padding: 12px 20px 14px; }
  .pizza-caption h2 { font-size: 20px; margin-bottom: 4px; }
  body.typing .pizza-stage { position: relative; }
  body.typing .action-bar { display: none; }
  body.typing { padding-bottom: 0; }
  #toast { bottom: calc(var(--bar-h) + 14px + env(safe-area-inset-bottom)); }
}

/* ── Heading + progress (each tab's underline is a progress segment) ── */
.builder-heading { gap: 12px; }
.step-count { font-size: 12px; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 6px 11px; border-radius: 20px; white-space: nowrap; }
.steps { border-bottom: 0; margin: 18px 0 22px; }
.steps button { min-height: 46px; padding-bottom: 14px; }
.steps button:after,
.steps button[aria-selected=true]:after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; width: auto; height: 4px; border-radius: 4px;
  background: #e9f0ed; transition: background .3s;
}
.steps button[aria-selected=true]:after, .steps button[data-done=true]:after { background: var(--brand); }
.steps button[data-done=true] { color: var(--ink); }
.steps button[data-done=true] b { background: #def6eb; color: var(--brand); font-weight: 700; }

/* ── Step 1: bases ─────────────────────────────────────────────────── */
.base-card { transition: border-color .2s, background .2s, box-shadow .2s; }
.base-card i { display: none; }
.base-card.selected i { display: grid; width: 20px; height: 20px; font-size: 11px; top: 8px; right: 8px; }

/* ── Step 2: toppings ──────────────────────────────────────────────── */
.section-title > span#topping-count { color: var(--brand); font-weight: 700; letter-spacing: 0; font-size: 12px; }
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 -4px 14px; padding: 2px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; min-height: 40px; padding: 0 16px; border-radius: 40px; background: #f8f6f1; color: #666055; font-size: 14px; font-weight: 600; transition: background .2s, color .2s; }
.chips button[aria-pressed=true] { background: var(--brand); color: #fff; }
.tp-group .group-title { margin: 16px 0 8px; }
.tp-group:first-child .group-title { margin-top: 4px; }
.topping-groups { display: block; }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 8px; }
.tp {
  position: relative; display: flex; align-items: center; min-height: 58px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.tp.selected { border-color: var(--brand); background: #fcfbfa; box-shadow: 0 0 0 1px var(--brand); }
.tp-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 8px 10px 8px 8px; background: none; text-align: left; }
.tp-icon { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #f9f7f4; }
.tp-icon svg { width: 32px; height: 32px; }
.tp.selected .tp-icon { background: #f3f0ea; }
.tp-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tp-text strong { font-size: 13px; font-weight: 650; line-height: 1.2; overflow-wrap: anywhere; hyphens: auto; }
.tp-text small { font-size: 12px; color: var(--muted); font-weight: 600; }
.tp.selected .tp-text small { color: var(--brand); }
.tp-grid { padding-top: 6px; }
.tap-hint { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: 12px; color: var(--muted); margin: 14px 0 6px; }

/* ── Step 3: upgrades, upsells ─────────────────────────────────────── */
.group-title { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: #968e7f; margin: 24px 0 10px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.group-title small { letter-spacing: 0; text-transform: none; font-weight: 500; color: #aba69b; font-size: 12px; }
.upgrade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.upgrade {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left;
  padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; min-height: 128px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.up-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #f9f7f4; margin-bottom: 6px; }
.up-icon svg { width: 36px; height: 36px; }
.upgrade strong { font-size: 14px; line-height: 1.25; }
.upgrade small { font-size: 12px; color: var(--muted); }
.up-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; width: 100%; padding-top: 10px; gap: 6px; }
.up-price { font-size: 14px; font-weight: 700; }
.up-state { font-size: 12px; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 20px; padding: 5px 10px; white-space: nowrap; }
.upgrade[aria-pressed=true] { border-color: var(--brand); background: #faf9f7; box-shadow: 0 0 0 1px var(--brand); }
.upgrade[aria-pressed=true] .up-state { background: var(--brand); color: #fff; }
.upgrade.included, .upgrade:disabled { opacity: 1; cursor: default; background: #f5fbf7; border-color: #cfe9d9; }
.upgrade.included .up-state { background: #e3f4ea; color: #1f7a45; }
.upgrade .tag, .upsell .tag {
  position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 700; letter-spacing: .4px;
  background: #fff3d6; color: #9a5b00; border-radius: 20px; padding: 3px 8px;
}
.upsell-grid {
  display: grid; grid-auto-flow: column; grid-auto-columns: 34%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -4px; padding: 2px 4px 8px; scrollbar-width: none; overscroll-behavior-x: contain;
}
.upsell-grid::-webkit-scrollbar { display: none; }
@media (max-width: 760px) { .upsell-grid { grid-auto-columns: 40%; } }
.upsell { scroll-snap-align: start; position: relative; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.upsell.has { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.upsell-add { display: flex; flex-direction: column; width: 100%; background: none; text-align: left; padding: 0 0 12px; }
.upsell-img { position: relative; display: block; width: 100%; }
.upsell-img img { display: block; width: 100%; aspect-ratio: 1.15; object-fit: cover; }
.upsell .tag { top: auto; bottom: 8px; left: 8px; right: auto; background: #ffffffe6; color: var(--brand); }
.upsell-add strong { font-size: 13px; padding: 9px 10px 0; line-height: 1.25; }
.upsell-add .plus { margin: 4px 10px 0; font-size: 14px; font-weight: 700; color: var(--brand); }
.upsell-count, .upsell-minus { display: none; }
.upsell.has .upsell-count {
  display: grid; place-items: center; position: absolute; top: 8px; right: 8px; min-width: 28px; height: 28px; padding: 0 6px;
  border-radius: 14px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; pointer-events: none;
}
.upsell.has .upsell-minus {
  display: grid; place-items: center; position: absolute; top: 6px; left: 6px; width: 38px; height: 38px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 10px #1c1a172e; font-size: 20px; color: var(--ink);
}
.note-label { margin-top: 24px; }

/* ── Summary ───────────────────────────────────────────────────────── */
.summary { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: #fdfdfc; }
.summary-pizza { display: flex; align-items: center; gap: 12px; }
.summary-pizza img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.summary-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.summary-name strong { font-size: 15px; line-height: 1.3; }
.summary-name span { font-size: 12px; color: var(--muted); }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; flex: none; }
.stepper button { width: 42px; height: 42px; background: none; font-size: 20px; color: var(--brand); }
.stepper span { min-width: 20px; text-align: center; font-weight: 700; }
.summary-lines { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px dashed #d6e5de; display: grid; gap: 7px; font-size: 14px; }
.summary-lines li { display: flex; justify-content: space-between; gap: 12px; color: #635e55; }
.summary-lines li.sub { color: var(--ink); font-weight: 600; }
.summary-lines li.head { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: #a59e90; margin-top: 6px; font-weight: 700; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; font-weight: 600; }
.summary-total strong { font-size: 26px; font-family: var(--font-display); letter-spacing: -.8px; }

/* ── Customer details ──────────────────────────────────────────────── */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #f7f5f0; border-radius: 14px; padding: 4px; margin-bottom: 14px; }
.segmented label { position: relative; display: block; margin: 0; }
.segmented input { position: absolute; inset: 0; opacity: 0; margin: 0; }
.segmented span { display: flex; justify-content: center; align-items: center; min-height: 46px; border-radius: 11px; font-size: 15px; font-weight: 600; color: #777164; cursor: pointer; transition: background .2s, box-shadow .2s; }
.segmented input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 2px 8px #1f3b2e1f; }
.segmented input:focus-visible + span { outline: 3px solid #88e8bb; outline-offset: 2px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.details label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 12px; }
.details small { display: block; font-weight: 400; color: var(--muted); margin-top: 6px; font-size: 12px; }
.details input:not([type=radio]), .details textarea, #checkout-form input:not([type=radio]), #checkout-form textarea { margin-top: 6px; min-height: 48px; font-size: 16px; }
@media (max-width: 420px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

/* ── Buttons ───────────────────────────────────────────────────────── */
.whatsapp-big {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 58px;
  border-radius: 16px; background: var(--wa); color: #fff; font-size: 17px; font-weight: 700; margin: 8px 0 4px;
  box-shadow: 0 12px 26px -12px #1faa59aa; transition: background .2s;
}
.whatsapp-big:hover { background: var(--wa-dark); }
.add-another {
  display: block; width: 100%; min-height: 50px; background: none; color: var(--brand); font-weight: 650; font-size: 14px;
  border: 1.5px dashed #bce8d3; border-radius: 14px; margin: 10px 0;
}
.add-another:hover { background: #fcfbfa; }

/* ── Sticky action bar ─────────────────────────────────────────────── */
.action-bar {
  position: sticky; bottom: 0; z-index: 8; display: flex; align-items: center; gap: 10px;
  margin-top: auto; padding: 14px 0 18px; background: #fffffff2; backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
.action-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.action-info span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.action-info strong { font-family: var(--font-display); font-size: 24px; letter-spacing: -.8px; display: inline-block; transform-origin: left center; line-height: 1.15; }
.action-info small { font-size: 11px; color: var(--brand); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-primary { min-height: 54px; min-width: 168px; justify-content: center; gap: 10px; padding: 0 22px; border-radius: 14px; font-size: 15px; font-weight: 700; box-shadow: 0 10px 22px -10px #17915a99; flex: none; }
.bar-primary span { font-size: 15px; }
.bar-primary span[aria-hidden] { font-size: 18px; }
.bar-primary.whatsapp { background: var(--wa); box-shadow: 0 10px 22px -10px #1faa59aa; }
.bar-primary.whatsapp:hover { background: var(--wa-dark); }
@media (max-width: 760px) {
  .action-bar {
    position: fixed; left: 0; right: 0; bottom: 0; margin: 0; z-index: 30;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 30px -14px #1c1a1740;
  }
   .bar-primary { min-width: 0; padding: 0 18px; }
  .action-info strong { font-size: 22px; }
}
@media (max-width: 360px) { .bar-primary.whatsapp span:not([aria-hidden]) { font-size: 14px; } .bar-primary { padding: 0 12px; } }

/* ── Effects ───────────────────────────────────────────────────────── */
.fly-icon { position: fixed; z-index: 60; pointer-events: none; width: 44px; height: 44px; margin: -22px 0 0 -22px; filter: drop-shadow(0 6px 10px #1f3b2e33); }
.fly-icon svg { width: 44px; height: 44px; display: block; }
.bag { transform-origin: center; }

/* ── "Almost there" dialog ─────────────────────────────────────────── */
.sent { text-align: center; width: min(430px, 94vw); padding: 34px 26px 24px; }
.sent .close { position: absolute; top: 14px; right: 14px; z-index: 2; }
.sent-check { position: relative; z-index: 1; width: 78px; height: 78px; margin: 4px auto 16px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; font-size: 40px; box-shadow: 0 14px 30px -10px #1faa59; }
.sent h2 { font-family: var(--font-display); font-size: 28px; letter-spacing: -.8px; margin: 0 0 8px; }
.sent p { color: var(--muted); line-height: 1.55; margin: 0 0 18px; font-size: 15px; }
.sent p strong { color: var(--ink); }
.sent-card { background: #faf9f6; border-radius: 14px; padding: 14px; margin-bottom: 14px; display: grid; gap: 2px; }
.sent-card span, .sent-card small { font-size: 12px; color: var(--muted); }
.sent-card strong { font-family: var(--font-display); font-size: 26px; letter-spacing: -.8px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: 90px; left: 50%; width: 8px; height: 14px; border-radius: 2px; }

@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }

/* ── Menu: real Donatello menu, one section per category ───────────── */
.menu-heading { margin-bottom: 10px; }
.menu-filters {
  position: sticky; top: 0; z-index: 7; display: flex; gap: 6px; overflow-x: auto; flex-wrap: nowrap;
  margin: 0 -5.2vw; padding: 10px 5.2vw; background: #f3efe7eb; backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; scrollbar-width: none;
}
.menu-filters::-webkit-scrollbar { display: none; }
.menu-filters button { flex: none; min-height: 40px; padding: 0 16px; border-radius: 40px; font-size: 14px; font-weight: 600; background: #f3f1ed; color: #666055; }
.menu-filters button.selected { background: var(--ink); color: #fff; }
.menu-sections { display: grid; gap: 34px; padding-top: 14px; }
.menu-block { scroll-margin-top: 72px; }
.menu-block-title { font-family: var(--font-display); font-size: 21px; font-weight: 800; letter-spacing: -.6px; margin: 0 0 14px; }
.menu-grid { gap: 16px; }
.menu-card { display: flex; flex-direction: column; }
.menu-card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.menu-card-content { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px; }
.menu-card h3 { margin: 0; font-size: 15px; line-height: 1.3; }
.menu-card p { margin: 0; min-height: 0; font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.menu-card-bottom { margin-top: auto; padding-top: 8px; }
.menu-card-bottom button { min-height: 40px; padding: 0 14px; border-radius: 10px; font-weight: 650; }
.studio-card { border-color: #cbefde; background: linear-gradient(180deg, #faf9f6, #fff 60%); }
/* Four round pizza photos in a 2×2 grid, the same 4:3 height as the other menu photos.
   The rows get a definite size (minmax(0,1fr)) so each photo is a true circle sized by
   its row — without it phones let the photos grow to their natural height (ovals over the text). */
.studio-card-pics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 10px; aspect-ratio: 4 / 3; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #faf9f7, #e4f5ed); }
.studio-card-pics img { width: auto; max-width: 100%; height: 100%; min-height: 0; aspect-ratio: 1 / 1; place-self: center; border-radius: 50%; object-fit: cover; box-shadow: 0 6px 14px -6px #3f705966; }
.studio-card .menu-card-bottom button { background: var(--brand); color: #fff; }
@media (max-width: 760px) {
  .menu-filters { margin: 0 -4vw; padding: 10px 4vw; }
  .menu-sections { gap: 28px; }
  .menu-grid { gap: 12px; }
  .menu-card-content { padding: 12px; }
  .menu-card h3 { font-size: 14px; }
  .menu-card-bottom { flex-wrap: wrap; gap: 8px; }
  .menu-card-bottom button { flex: 1 0 auto; }
}

/* ── Customize sheet (menu items), same structure as the website's add-ons sheet ── */
dialog.sheet { padding: 0; width: min(560px, 100vw); max-height: 92dvh; overflow: hidden; display: none; flex-direction: column; }
dialog.sheet[open] { display: flex; }
.sheet-head { display: flex; gap: 14px; align-items: center; padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.sheet-head img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; flex: none; }
.sheet-head > div { flex: 1; min-width: 0; }
.sheet-head .eyebrow { font-size: 10px; margin: 0 0 4px; }
.sheet-head h2 { margin: 0; font-family: var(--font-display); font-size: 20px; letter-spacing: -.5px; line-height: 1.2; }
.sheet-head p:not(.eyebrow) { margin: 4px 0 0; font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* flex-basis auto + min-height 0 (not `flex: 1`): with a 0% basis, iOS Safari sized this scroll area
   from an indefinite height and gave it NO height — the sheet showed only its head and button, the
   toppings were there but invisible. Auto basis = the content's height, capped by the dialog's
   max-height, then it scrolls. */
.sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 14px 4px; background: var(--paper); overscroll-behavior: contain; }
.sheet-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 14px 6px; margin-bottom: 12px; }
.sheet-card-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.sheet-card-head h3 { font-size: 17px; font-weight: 750; }
.sheet-card-head span { font-size: 12px; color: var(--muted); }
.sheet-card .group-title { margin: 14px 0 4px; }
.sheet-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid #f4f2ee; }
.sheet-row.selected .row-text strong { color: var(--brand); }
.row-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #f9f7f4; flex: none; }
.row-icon svg { width: 32px; height: 32px; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-text strong { font-size: 15px; font-weight: 650; }
.row-text small { font-size: 13px; color: var(--muted); }
.sheet-row .stepper button { width: 38px; height: 38px; }
.sheet-row .stepper button:disabled { opacity: .35; }
.sheet-radio { display: flex; justify-content: space-between; align-items: center; min-height: 50px; border-top: 1px solid #f4f2ee; font-weight: 600; cursor: pointer; margin: 0 !important; font-size: 15px !important; }
.sheet-radio input { width: 20px; height: 20px; accent-color: var(--brand); }
.sheet-foot { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.sheet-foot .primary { min-height: 54px; border-radius: 14px; font-size: 16px; font-weight: 700; }
@media (max-width: 760px) {
  dialog.sheet { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 26px 26px 0 0; max-height: 92dvh; }
}

/* ── Masterpiece: short name + topping icons ───────────────────────── */
.mp-toppings { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 8px; }
.mp-toppings:empty { display: none; }
.mp-chip { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px #3f705922; }
.mp-chip svg { width: 23px; height: 23px; }
.mp-chip b { position: absolute; right: -6px; bottom: -4px; font-size: 10px; font-weight: 800; color: #fff; background: var(--brand); border-radius: 8px; padding: 1px 4px; line-height: 1.3; }

/* ── Between pizzas: edit banner, "same as last", edit in the order ── */
.edit-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: #fff6e0; color: #6b4a00; font-size: 13px; }
.edit-banner button { min-height: 36px; padding: 0 14px; border-radius: 10px; background: #fff; color: #6b4a00; font-weight: 700; font-size: 13px; box-shadow: 0 0 0 1px #f0d9a0 inset; }
.copy-last {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; margin: -6px 0 14px; padding: 11px 14px;
  border-radius: 12px; border: 1.5px dashed #bce8d3; background: #fcfbfa; text-align: left; color: var(--brand);
}
.copy-last span { font-size: 14px; font-weight: 700; }
.copy-last small { font-size: 12px; color: var(--muted); }
.cart-row-bottom { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.cart-edit { min-height: 32px; padding: 0 12px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700; }

/* Customer-first refinements: fewer competing actions, clear touch targets and review before send. */
:root { --wa: #147a42; --wa-dark: #0c6132; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 50; padding: 14px 20px; background: var(--ink); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }
header .bag { min-height: 46px; }
.review-hint { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 0 0 14px; }
#details-submit { min-height: 52px; justify-content: space-between; font-size: 16px; }
.form-error { color: #b42334; font-size: 14px; line-height: 1.5; margin: 12px 0; }
.form-error:empty { display: none; }
input[aria-invalid=true] { border-color: #b42334; }
.back-order { color: var(--brand); background: var(--brand-soft); padding: 12px 16px; border-radius: 9px; min-height: 44px; margin-bottom: 18px; font-weight: 600; font-size: 14px; }
.cart-actions button { width: 40px; height: 42px; font-size: 20px; }
.cart-edit { min-height: 40px; font-size: 14px; }
.close { width: 44px; height: 44px; flex-shrink: 0; }
.cart-row-info p { line-height: 1.45; }
.cart-row-info h3 { font-size: 16px; }
.cart-row-info strong { font-size: 15px; }
.cart-row img { width: 58px; height: 58px; }
.menu-search { max-width: 600px; margin: 20px 0 4px; }
.menu-search label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.menu-search > div { display: flex; align-items: center; background: white; border: 1px solid #dedad2; border-radius: 12px; padding-right: 6px; }
.menu-search input { background: transparent; border: 0 !important; font-size: 16px !important; min-height: 50px; }
.menu-search button { min-height: 40px; padding: 8px 14px; border-radius: 8px; color: var(--brand); background: var(--brand-soft); font-size: 14px; }
#search-status { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 7px 0; }
#search-status:empty { margin: 0; }
.floating-cart { display: none; }
.menu-card h3 { font-size: 16px; }
.menu-card p { font-size: 14px; }
.tp-text strong { font-size: 14px; }
#bar-primary { font-size: 15px; }
@media(min-width: 761px) {
 .visual, .builder-controls { min-height: min(76vh, 740px); }
 .pizza-stage { min-height: 300px; }
 .visual { top: 0; }
}
@media(max-width: 760px) {
 :root { --stage-h: clamp(170px, 27svh, 225px); }
 .intro { padding-top: 23px; padding-bottom: 22px; }
 .intro h1 { font-size: clamp(28px, 8vw, 36px); }
 .pizza-caption { padding: 10px 18px; }
 .pizza-caption .eyebrow { display: none; }
 .pizza-caption h2 { font-size: 18px; }
 .pizza-caption p { line-height: 1.4; }
 .builder-controls { padding: 18px 16px 0; }
 .steps { margin-top: 12px; margin-bottom: 17px; }
 .steps button { font-size: 14px; }
 .tp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .tp-main { min-height: 68px; padding: 8px; gap: 6px; }
 .tp-icon { width: 32px; height: 32px; }
 .tp-text strong { font-size: 14px; line-height: 1.2; }
 .tp-text small { font-size: 13px; }
 .action-bar { gap: 9px; }
 .bar-primary { padding: 12px 14px; min-width: 0; }
 #bar-name { font-size: 12px; max-width: 125px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 body.browsing-menu .action-bar { display: none; }
 body.browsing-menu .floating-cart:not([hidden]) { display: flex; justify-content: space-between; align-items: center; position: fixed; bottom: calc(12px + env(safe-area-inset-bottom)); left: 4%; right: 4%; z-index: 9; background: var(--brand); color: white; padding: 16px 19px; min-height: 58px; border-radius: 14px; box-shadow: 0 8px 25px #2f7d5940; font-size: 16px; }
 .floating-cart b { display: inline-grid; place-items: center; margin-left: 8px; min-width: 25px; height: 25px; background: #ffffff30; border-radius: 8px; font-size: 13px; }
 body.typing .floating-cart { display: none !important; }
 #cart-dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 24px 24px 0 0; max-height: 92dvh; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
 .cart-actions { gap: 6px; }
 .cart-row img { width: 45px; height: 45px; }
 .cart-row-info h3 { font-size: 14px; }
 .cart-actions button { width: 34px; }
 input:not([type=checkbox],[type=radio]),textarea,select { font-size: 16px !important; }
 footer { padding-bottom: 40px; }
}
@media(max-width: 350px) {
 .steps button { font-size: 12px; }
 .steps button b { margin-right: 3px; }
 .bar-primary { font-size: 14px !important; padding: 10px; }
 .tp-icon { display: none; }
}

/* ── Mobile UX pass: undo toast, removable chips, surprise, reorder, touch sizes ── */
#toast.has-action { pointer-events: auto; display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 18px; }
.toast-action { min-height: 38px; padding: 0 14px; border-radius: 8px; background: #ffffff1f; color: #cafbe4; font-weight: 800; font-size: 14px; }
.mp-chip { border: 0; cursor: pointer; transition: transform .15s; }
.mp-chip:active { transform: scale(.9); }
.mp-chip i { position: absolute; top: -5px; right: -5px; width: 15px; height: 15px; border-radius: 50%; background: #777164; color: #fff; font-style: normal; font-size: 11px; line-height: 15px; text-align: center; }
.mp-chip::after { content: ''; position: absolute; inset: -7px; } /* 44px touch target */
.chips button, .menu-filters button { min-height: 44px; }
.chips .surprise { background: linear-gradient(135deg, #fff3d6, #f5f2ec); color: #8a4b00; }
.copy-last.reorder { border-style: solid; border-color: #bfe3cc; background: #f2fbf5; color: #177a45; }

/* ═══════════════════════════════════════════════════════════════════════
   Premium "Your order" layer — one thumb, clear hierarchy, instant feedback.
   Buttons · steps · selection cards · steppers · sticky bar · fields.
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  --tint: #fbfaf7;
  --tint-2: #f5f2ed;
  --card-r: 18px;
  --ring: 0 0 0 4px #17915a24;
  --soft-shadow: 0 14px 28px -18px #25684966;
  --spring: cubic-bezier(.3, 1.4, .5, 1);
}

/* Buttons: one strong primary, quiet secondaries */
.primary, .bar-primary {
  min-height: 54px; border-radius: 16px; background: var(--brand); color: #fff; font-weight: 700;
  box-shadow: 0 10px 22px -10px #17915aaa, inset 0 1px 0 #ffffff26;
  transition: transform .12s ease, box-shadow .2s, background .2s, filter .2s;
}
.primary:hover, .bar-primary:hover { background: var(--brand-dark); }
.primary:active, .bar-primary:active, .whatsapp-big:active, .add-another:active { transform: scale(.97); filter: brightness(.96); }
.whatsapp-big { min-height: 56px; border-radius: 16px; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  background: transparent; color: #777164; font-size: 13px; font-weight: 650; transition: background .2s, transform .12s;
}
.btn-ghost:hover { background: #f8f6f1; }
.btn-ghost:active { transform: scale(.96); }
.add-another { min-height: 52px; border: 0; border-radius: 16px; background: var(--tint); color: var(--brand); font-weight: 700; }
.add-another:hover { background: var(--tint-2); }

/* Heading */
.builder-heading { align-items: center; }
.builder-heading .btn-ghost { text-decoration: none; }
#builder-title { font-family: var(--font-display); font-size: 18px; font-weight: 800; letter-spacing: -.4px; }

/* Step indicator: circles joined by a thin line; done = ✓, active = filled, next = grey */
.steps { display: flex; gap: 0; border: 0; margin: 16px 0 22px; }
.steps button {
  flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px;
  min-height: 60px; padding: 0; background: none; color: #b0aa9f; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.steps button b {
  position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; margin: 0; border-radius: 50%;
  background: #f6f3ed; color: #b0aa9f; font-size: 13px; font-weight: 800;
  transition: background .25s, color .25s, box-shadow .25s, transform .3s var(--spring);
}
.steps button::after, .steps button[aria-selected=true]::after {
  content: ''; position: absolute; top: 14px; bottom: auto; left: calc(50% + 21px); right: calc(-50% + 21px); width: auto; height: 2px;
  border-radius: 2px; background: #e7f0ec; transition: background .35s;
}
.steps button[data-done=true]::after { background: var(--brand); }
.steps button:last-child::after { display: none; }
.steps button[aria-selected=true] { color: var(--ink); font-weight: 800; }
.steps button[aria-selected=true] b { background: var(--brand); color: #fff; box-shadow: 0 0 0 5px #17915a1f; transform: scale(1.06); }
.steps button[data-done=true] { color: #666055; }
.steps button[data-done=true] b { background: var(--tint-2); color: var(--brand); }
.steps button:focus-visible { outline: none; }
.steps button:focus-visible b { outline: 3px solid #88e8bb; outline-offset: 3px; }

/* Base cards: picture → name → description → price; selected = border, tint, ✓, lift */
.base-grid { gap: 12px; }
.base-grid .base-card {
  position: relative; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 0; padding: 14px;
  border: 1.5px solid var(--line); border-radius: var(--card-r); background: #fff; text-align: left;
  transition: border-color .2s, background .2s, box-shadow .25s, transform .3s var(--spring);
}
.base-grid .base-card img { width: 64px; height: 64px; margin: 0; border-radius: 50%; object-fit: cover; box-shadow: 0 6px 14px -8px #25684980; }
.base-grid .base-card > span { display: flex; flex-direction: column; gap: 3px; width: 100%; }
.base-grid .base-card strong { font-size: 15px; line-height: 1.25; }
.base-grid .base-card small { margin: 0; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.base-grid .base-card b { margin-top: 6px; font-size: 16px; font-weight: 800; }
.base-grid .base-card i {
  display: grid; place-items: center; position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 1.5px solid #d6e6df; color: transparent; font-size: 12px; font-style: normal; transition: all .25s var(--spring);
}
.base-grid .base-card.selected { border-color: var(--brand); background: var(--tint); box-shadow: 0 0 0 1px var(--brand), var(--soft-shadow); transform: scale(1.02); }
.base-grid .base-card.selected i { background: var(--brand); border-color: var(--brand); color: #fff; }
.base-grid .base-card:active { transform: scale(.98); }

/* Topping cards: picture + name + price on top, pill stepper underneath */
.tp-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding-top: 4px; }
.tp {
  flex-direction: column; align-items: stretch; min-height: 0; padding: 0; border: 1.5px solid var(--line); border-radius: var(--card-r); background: #fff;
  transition: border-color .2s, background .2s, box-shadow .25s, transform .3s var(--spring);
}
.tp.selected { border-color: var(--brand); background: var(--tint); box-shadow: 0 0 0 1px var(--brand), var(--soft-shadow); transform: scale(1.02); }
.tp-main { position: relative; width: 100%; min-height: 64px; display: flex; align-items: center; gap: 10px; padding: 12px 10px 8px 12px; background: none; text-align: left; }
.tp-main:disabled { opacity: 1; cursor: default; }
.tp-icon { width: 42px; height: 42px; background: #f9f7f4; }
.tp-icon svg { width: 34px; height: 34px; }
.tp.selected .tp-icon { background: #fff; }
.tp-text strong { font-size: 14px; line-height: 1.2; overflow-wrap: normal; word-break: normal; hyphens: manual; }
.tp-text small { font-size: 13px; }
.tp-check {
  position: absolute; top: 7px; left: 40px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; box-shadow: 0 0 0 2px #fff;
  background: var(--brand); color: #fff; font-size: 11px; font-style: normal; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .3s var(--spring);
}
.tp.selected .tp-check { opacity: 1; transform: scale(1); }
.tp-stepper { margin: 0 10px 10px; }

/* Stepper [ − 2 + ] — pill, big hit areas, disabled at 0 */
.stepper {
  display: flex; align-items: center; justify-content: space-between; gap: 4px; height: 48px; padding: 3px;
  border: 0; border-radius: 999px; background: #f7f5f0;
}
.stepper button {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--brand);
  font-size: 21px; font-weight: 700; box-shadow: 0 2px 6px -2px #25684940; transition: transform .12s, background .2s, color .2s, opacity .2s;
}
.stepper button:active:not(:disabled) { transform: scale(.88); }
.stepper button:disabled { opacity: .35; background: transparent; box-shadow: none; cursor: not-allowed; }
.stepper span { min-width: 26px; text-align: center; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; display: inline-block; }
.tp.selected .tp-stepper { background: #fff; box-shadow: inset 0 0 0 1px #daf5e8; }
.tp.selected .tp-stepper [data-add]:not(:disabled) { background: var(--brand); color: #fff; }
.summary .stepper { height: 46px; }

/* Other cards follow the same radius */
.upgrade, .upsell, .summary, .sheet-card { border-radius: var(--card-r); }

/* Sticky bar: glass, big live price, secondary left, primary right */
.action-bar {
  gap: 12px; padding: 12px 0 16px; border-top: 1px solid #fff;
  background: #ffffffb8; -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: 0 -14px 30px -24px #25684966;
}
.bar-secondary {
  flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
  background: #f7f5f0; color: #666055; font-size: 20px; font-weight: 700; transition: transform .12s, background .2s;
}
.bar-secondary:hover { background: #e6f2ec; }
.bar-secondary:active { transform: scale(.92); }
.action-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
#bar-name { max-width: none; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bar-total { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -1px; line-height: 1.05; color: var(--ink); }
.bar-primary { flex: none; min-width: 0; min-height: 54px; padding: 0 20px; gap: 8px; }
.bar-cart {
  position: absolute; top: -46px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600;
  white-space: nowrap; box-shadow: 0 8px 20px -8px #0007;
}
.bar-cart b { color: #cafbe4; }
@media (max-width: 760px) {
  :root { --bar-h: 96px; }
  .action-bar {
    position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 10px;
    border: 1px solid #ffffffc0; border-radius: 24px; box-shadow: 0 18px 40px -16px #1b493466, 0 2px 8px #1b493414;
  }
  .bar-primary { padding: 0 16px; }
  #bar-total { font-size: 24px; }
  .tp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-main { gap: 8px; padding: 11px 8px 8px 10px; }
  .tp-icon { width: 38px; height: 38px; }
  .tp-icon svg { width: 30px; height: 30px; }
  .tp-check { left: 34px; }
  .tp-text strong { font-size: 13.5px; }
}
.bar-primary .short { display: none; }
@media (max-width: 480px) { .bar-primary .long { display: none; } .bar-primary .short { display: inline; } }
@media (max-width: 350px) { .bar-secondary { width: 46px; } .bar-primary { padding: 0 12px; } }

/* Fields: tall, soft, clear focus */
.details input:not([type=radio]), .details textarea, #checkout-form input:not([type=radio]), #checkout-form textarea, #pizza-note {
  min-height: 52px; padding: 14px 16px; border: 1.5px solid #eae6df; border-radius: 14px; background: #fdfdfc; font-size: 16px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.details textarea, #checkout-form textarea, #pizza-note { min-height: 88px; line-height: 1.45; }
.details input:focus, .details textarea:focus, #checkout-form input:focus, #checkout-form textarea:focus, #pizza-note:focus {
  outline: none; border-color: var(--brand); background: #fff; box-shadow: var(--ring);
}
input::placeholder, textarea::placeholder { color: #b1aca2; }
input[aria-invalid=true] { box-shadow: 0 0 0 4px #b4233420; }
.details label, #checkout-form > label, .note-label { font-size: 13px; font-weight: 700; color: #555047; }
.segmented { border-radius: 16px; }
.segmented span { min-height: 50px; border-radius: 13px; }

@media (prefers-reduced-motion: reduce) {
  .base-grid .base-card.selected, .tp.selected, .steps button[aria-selected=true] b { transform: none; }
}
/* Delivery checkout: a real order, one address decision, one submit. */
#cart-dialog:has(#checkout-form-wrap:not([hidden])) { width: min(620px,96vw); }
.checkout-title h3 { font-family: Manrope,sans-serif; font-size: 26px; line-height: 1.2; margin: 7px 0 10px; }
.checkout-title p { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0 0 20px; }
.checkout-kicker { font-size: 11px; letter-spacing: 1.4px; font-weight: 700; color: var(--purple); }
.delivery-fields { margin: 20px 0; }
.field-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
#delivery-zone { margin: 0 0 18px; min-height: 52px; background: #fff; border-color: #ccc3d8; font-size: 16px; }
.address-box { padding: 18px; border: 1px solid #dfd4f0; background: #faf7ff; border-radius: 16px; }
.address-box h4 { margin: 0 0 14px; font-size: 16px; }
.location-button { display: block; width: 100%; min-height: 52px; padding: 12px; border-radius: 10px; border: 1px solid var(--purple); background: #fff; color: var(--purple); font-weight: 650; font-size: 16px; }
.location-status { color: #655575; font-size: 13px; line-height: 1.5; margin: 10px 0; }
.location-status:empty { display: none; }
#location-pin { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 10px; }
#location-pin a { color: var(--purple); font-size: 13px; text-decoration: underline; }
#remove-location { background: transparent; color: #766779; text-decoration: underline; font-size: 12px; padding: 10px 0; }
.address-or { display: block; text-align: center; color: #8c8298; font-size: 12px; margin: 16px 0; }
.address-box label { display: block; font-size: 14px; font-weight: 550; margin-bottom: 8px; }
.address-box small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 7px; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-row label { font-size: 14px; font-weight: 550; }
.contact-row input { margin-top: 8px; min-height: 50px; }
.order-note-details { margin: 22px 0; }
.order-note-details summary { cursor: pointer; min-height: 38px; font-size: 14px; font-weight: 550; }
.order-note-details summary span { color: var(--muted); font-weight: 400; font-size: 12px; }
.checkout-summary { background: #f7f4fb; padding: 18px; border-radius: 12px; }
.checkout-summary>div { display: flex; justify-content: space-between; gap: 20px; font-size: 15px; margin: 5px 0; }
.checkout-summary .checkout-total { border-top: 1px solid #dfd6e9; padding-top: 13px; margin-top: 13px; font-size: 20px; }
.payment-note { color: var(--muted); font-size: 13px; text-align: center; margin: 13px 0; }
#place-order { min-height: 58px; font-weight: 700; font-size: 17px; border-radius: 12px; }
.checkout-reassurance { font-size: 13px; line-height: 1.6; text-align: center; color: var(--muted); margin: 12px 8px 0; }
.optional-chat { display: block; color: var(--purple); padding: 14px; font-size: 14px; text-decoration: underline; margin: 3px 0 12px; }
@media(max-width:760px){#cart-dialog:has(#checkout-form-wrap:not([hidden])){width:100%}.checkout-title h3{font-size:25px}.contact-row{grid-template-columns:1fr}.address-box{padding:15px}.checkout-summary>div{font-size:14px}}
