:root {
  /* House of Pizza: slate board, chalk white, the red "A" */
  --bg: #1d2022;
  --surface: #272b2e;
  --surface-2: #31363a;
  --line: #3d4347;
  --text: #f3eee6;
  --muted: #a8a299;
  --accent: #d8261e;
  --accent-ink: #ffffff;
  --ok: #4fb07c;
  --warn: #e0a43a;
  --font-display: 'Marcellus', Georgia, 'Times New Roman', serif;
  --font-label: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 10px;
  color-scheme: dark;
  /* layout: one centered column of menu rows, sticky category bar, cart as bottom sheet */
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; text-wrap: balance; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.label { font-family: var(--font-label); text-transform: uppercase; letter-spacing: .08em; }
.hidden { display: none !important; }

/* ---------- header ---------- */
.hero { padding: 24px 16px 12px; text-align: center; }
.hero img { width: min(340px, 80%); height: auto; margin: 0 auto; border-radius: 6px; }
.status-row { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 12px; font-size: 15px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-family: var(--font-label); text-transform: uppercase; letter-spacing: .06em; font-size: 14px; border: 1px solid var(--line); }
.pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.open { color: var(--ok); }
.pill.closed { color: var(--accent); }

/* ---------- category bar ---------- */
.catbar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.catbar .wrap { display: flex; gap: 6px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.catbar a { flex: none; text-decoration: none; color: var(--muted); padding: 6px 12px; border-radius: 999px; font-family: var(--font-label); text-transform: uppercase; letter-spacing: .06em; font-size: 15px; }
.catbar a.active, .catbar a:hover { color: var(--text); background: var(--surface-2); }

/* ---------- menu ---------- */
.cat { padding: 32px 0 8px; scroll-margin-top: 64px; }
.cat h2 { font-size: 30px; }
.cat h2 span { color: var(--accent); }
.cat .sub { margin: 2px 0 12px; font-family: var(--font-label); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-size: 14px; }
.half-note { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 14px; color: var(--text); background: var(--surface); border: 1px dashed var(--line); padding: 6px 12px; border-radius: 999px; }
.half-note::before { content: ''; width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(90deg, var(--accent) 50%, var(--muted) 50%); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }

.item { position: relative; display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 14px; transition: border-color .15s, transform .15s; }
.item:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.item .top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.item .name { font-family: var(--font-label); font-size: 22px; line-height: 1.1; letter-spacing: .03em; text-transform: uppercase; font-weight: 600; }
.item .plus { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 22px; line-height: 1; }
.item .desc { color: var(--muted); font-size: 15px; flex: 1; }
.item .prices { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--font-label); font-size: 15px; font-variant-numeric: tabular-nums; }
.item .prices span { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.item .prices b { color: #ff7a72; font-weight: 600; margin-left: 2px; }
.item .badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-family: var(--font-label); font-size: 13px; letter-spacing: .05em; text-transform: uppercase; padding: 1px 8px; border-radius: 4px; background: var(--surface-2); color: var(--text); }
.badge.red { background: color-mix(in srgb, var(--accent) 22%, transparent); color: #ff8a84; }
.item.soldout { opacity: .45; cursor: not-allowed; }
.item.soldout .plus { background: var(--surface-2); color: var(--muted); font-size: 12px; width: auto; padding: 0 10px; border-radius: 999px; font-family: var(--font-label); text-transform: uppercase; letter-spacing: .05em; }

/* info strip under the logo */
.info { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.info span { font-size: 14px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }

/* ---------- buttons & fields ---------- */
.btn { border: 0; border-radius: var(--radius); padding: 12px 18px; background: var(--surface-2); font-weight: 600; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn.ghost { background: none; border: 1px solid var(--line); }
.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field > span { font-size: 14px; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.field textarea { min-height: 64px; resize: vertical; }
.err { color: #ff8a84; font-size: 14px; margin: 6px 0; }

/* ---------- floating cart button ---------- */
.cartbtn { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 8; width: min(520px, calc(100% - 32px)); display: flex; justify-content: space-between; align-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.cartbtn .count { background: rgba(255,255,255,.2); border-radius: 999px; padding: 0 9px; margin-right: 8px; }
.spacer { height: 96px; }

/* ---------- bottom sheet ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--surface); width: min(620px, 100%); max-height: 92vh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 4px; }
.sheet-head h3 { font-size: 26px; }
.close { background: var(--surface-2); border: 0; width: 36px; height: 36px; border-radius: 50%; font-size: 20px; line-height: 1; flex: none; }
.sec { margin-top: 18px; }
.sec > .label { font-size: 15px; color: var(--muted); margin-bottom: 8px; display: block; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 8px 12px; display: inline-flex; gap: 8px; align-items: center; }
.choice[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--bg)); }
.choice small { color: var(--muted); font-variant-numeric: tabular-nums; }
.choice.removed { text-decoration: line-through; color: var(--muted); }
.choice:disabled { opacity: .5; cursor: default; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; }
.qty button { background: none; border: 0; width: 38px; height: 38px; font-size: 20px; }
.qty span { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; }
.add-row { display: flex; gap: 12px; align-items: center; margin-top: 22px; position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom)); background: var(--surface); padding: 12px 0 4px; }
.add-row .btn { flex: 1; }

/* ---------- cart ---------- */
.line { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line .t { font-weight: 600; }
.line .mods { font-size: 14px; color: var(--muted); }
.line .p { text-align: right; font-variant-numeric: tabular-nums; }
.line .ctl { display: flex; gap: 8px; align-items: center; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 0; font-size: 14px; }
.totals { margin: 14px 0; display: grid; gap: 4px; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-size: 20px; font-weight: 700; }

.done { text-align: center; padding: 10px 0; }
.done .num { font-family: var(--font-display); font-size: 44px; color: var(--accent); }
.wa { background: #1fa855; color: #fff; text-decoration: none; display: block; text-align: center; }

footer { text-align: center; color: var(--muted); font-size: 14px; padding: 24px 0; }
footer a { color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .sheet { animation: up .22s ease-out; }
  @keyframes up { from { transform: translateY(24px); } to { transform: none; } }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- account & tracking ---------- */
.hero { position: relative; }
.acct-btn { position: absolute; top: 16px; right: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-btn.in::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: middle; }
.olist { display: grid; gap: 8px; }
.orow { display: flex; justify-content: space-between; gap: 10px; text-align: left; width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.orow:hover { border-color: var(--accent); }
.orow .right { text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.stp { font-family: var(--font-label); text-transform: uppercase; letter-spacing: .05em; font-size: 12px; padding: 2px 8px; border-radius: 4px; background: var(--surface-2); }
.stp.new { background: var(--accent); color: #fff; }
.stp.preparing { background: var(--warn); color: #1d2022; }
.stp.out_for_delivery { background: #5aa0e6; color: #10202f; }
.stp.delivered { background: var(--ok); color: #0f2318; }
.steps { list-style: none; padding: 0; margin: 18px 0 8px; display: grid; gap: 0; }
.steps li { position: relative; padding: 0 0 18px 30px; color: var(--muted); font-size: 17px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ''; position: absolute; left: 7px; top: 18px; bottom: -2px; width: 2px; background: var(--line); }
.steps li:last-child::before { display: none; }
.steps .dot { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); }
.steps li.done { color: var(--text); }
.steps li.done .dot { background: var(--ok); border-color: var(--ok); }
.steps li.done::before { background: var(--ok); }
.steps li.now { color: var(--text); font-weight: 700; }
.steps li.now .dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); }
@media (max-width: 420px) { .hero { padding-top: 52px; } }

/* ---------- halves, pickup, footer ---------- */
.halfbox { border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px 12px; margin-top: 14px; }
.halfttl { font-family: var(--font-label); text-transform: uppercase; letter-spacing: .06em; font-size: 15px; color: var(--text); margin-top: 10px; }
.halfbox .sec { margin-top: 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pickup-box { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; display: grid; gap: 2px; }
.pickup-box a { color: #ff8a84; }
.loc-ok { color: var(--ok); }
footer { display: grid; gap: 4px; }
footer #foot-phone { display: grid; gap: 4px; }
footer .credit { margin-top: 10px; font-size: 12px; opacity: .7; }
