/* BBQ Express — shared design tokens and primitives (dark grill + warm creamery) */
:root {
  --bg: #0c0c0d; --bg2: #141416; --panel: #1b1b1e; --panel2: #232327; --line: #2d2d33;
  --text: #f4f1ea; --muted: #a9a39a; --dim: #7a756e;
  --orange: #f0641e; --orange2: #ff8a3d; --orange-ink: #1a0b03;
  --green: #35c56f; --amber: #f5b53b; --red: #e5484d; --blue: #4ea3ff;
  --cream: #fbf1e1; --cream2: #f5e4c8; --brown: #4a2a16; --brown2: #2f1a0d; --pink: #f49aa3; --pink2: #ffd3d6;
  --r: 16px; --r2: 12px; --shadow: 0 10px 30px rgba(0,0,0,.45);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Anton", "Oswald", Impact, "Arial Narrow", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.45;
  min-height: 100dvh; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--orange2); text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 700; }
.display { font-family: var(--display); font-weight: 400; letter-spacing: .02em; text-transform: uppercase; line-height: 1; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 13px; }
.orange { color: var(--orange2); }
.row { display: flex; align-items: center; gap: 10px; } .grow { flex: 1; min-width: 0; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.hide { display: none !important; }
.sr { position: absolute; left: -9999px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 999px;
  background: var(--panel2); color: var(--text); font-weight: 600; border: 1px solid var(--line); transition: transform .08s, background .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--orange2), var(--orange)); color: #fff; border-color: transparent;
  box-shadow: 0 6px 18px rgba(240,100,30,.35); }
.btn.ghost { background: transparent; }
.btn.danger { background: rgba(229,72,77,.15); border-color: rgba(229,72,77,.4); color: #ff8e92; }
.btn.ok { background: rgba(53,197,111,.15); border-color: rgba(53,197,111,.4); color: #7ee2a5; }
.btn.big { padding: 16px 22px; font-size: 17px; width: 100%; }
.btn.sm { padding: 8px 12px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--panel2); border: 1px solid var(--line); color: var(--muted); }
.pill.open { color: #8df0b5; border-color: rgba(53,197,111,.4); background: rgba(53,197,111,.12); }
.pill.closed { color: #ffb1b4; border-color: rgba(229,72,77,.4); background: rgba(229,72,77,.12); }
.pill.warn { color: #ffd98a; border-color: rgba(245,181,59,.4); background: rgba(245,181,59,.12); }
.pill.orange { color: #fff; background: var(--orange); border-color: transparent; }
.pill.blue { color: #bcdcff; border-color: rgba(78,163,255,.4); background: rgba(78,163,255,.12); }

/* inputs */
.field { display: block; margin: 0 0 12px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.input, .select, .textarea { width: 100%; padding: 12px 14px; border-radius: var(--r2); background: var(--bg2); border: 1px solid var(--line);
  color: var(--text); outline: none; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--orange); }
.textarea { min-height: 70px; resize: vertical; }
.seg { display: flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { flex: 1; padding: 10px 12px; border-radius: 999px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--orange); color: #fff; }
.switch { position: relative; width: 46px; height: 26px; border-radius: 999px; background: var(--line); transition: background .15s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.on { background: var(--green); } .switch.on::after { left: 23px; }

/* cards & lists */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.list > * + * { border-top: 1px solid var(--line); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: #fff; color: #111; padding: 12px 18px;
  border-radius: 999px; font-weight: 600; opacity: 0; transition: .2s; z-index: 200; pointer-events: none; max-width: 92vw; text-align: center; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.bad { background: #ffd9db; color: #7a1216; }

/* bottom sheet / drawer */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 90; backdrop-filter: blur(2px); }
.scrim.show { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 92dvh; background: var(--panel); border-radius: 22px 22px 0 0;
  transform: translateY(105%); transition: transform .25s cubic-bezier(.2,.8,.2,1); z-index: 100; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 -10px 40px rgba(0,0,0,.6); }
.sheet.show { transform: translateY(0); }
.sheet .body { overflow: auto; padding: 0 16px 16px; }
.sheet .foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--panel); }
.sheet .handle { width: 44px; height: 5px; border-radius: 999px; background: var(--line); margin: 10px auto 6px; flex: none; }
@media (min-width: 760px) { .sheet { left: 50%; right: auto; width: 560px; transform: translate(-50%, 105%); border-radius: 22px 22px 0 0; }
  .sheet.show { transform: translate(-50%, 0); } }

/* option groups inside the configurator */
.opt-group { margin: 16px 0 6px; }
.opt-group h4 { margin: 0 0 8px; font-size: 14px; display: flex; justify-content: space-between; align-items: baseline; }
.opt-group h4 .need { font-size: 11px; color: var(--orange2); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); font-size: 14px; }
.opt.on { background: rgba(240,100,30,.18); border-color: var(--orange); color: #fff; }
.opt .plus { color: var(--orange2); font-size: 12px; font-weight: 700; }
.sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.size { padding: 10px 8px; border-radius: var(--r2); background: var(--bg2); border: 1px solid var(--line); text-align: center; }
.size b { display: block; font-size: 15px; } .size small { color: var(--muted); }
.size.on { border-color: var(--orange); background: rgba(240,100,30,.18); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--bg2); }
.qty button { width: 40px; height: 40px; font-size: 20px; color: var(--orange2); }
.qty b { min-width: 28px; text-align: center; }

/* creamery look (used by sections and cards that carry data-look="cream") */
[data-look="cream"] { --panel: #fff8ec; --panel2: #fdeedb; --bg2: #fff; --line: #efd9bd; --text: #3a2212; --muted: #8a6a52; --dim: #b39a86;
  --orange2: #e2641c; color: var(--text); }

/* aging colours for kitchen cards */
.age-ok { border-left: 5px solid var(--green); } .age-warn { border-left: 5px solid var(--amber); } .age-late { border-left: 5px solid var(--red); }

/* skeleton */
.sk { background: linear-gradient(90deg, var(--panel) 25%, var(--panel2) 50%, var(--panel) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r2); }
@keyframes sk { to { background-position: -200% 0; } }
@keyframes pop { 0% { transform: scale(.9); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.pop { animation: pop .3s; }
