/* Maple Street Kitchen — demo site */
:root {
  --bg: #faf6ef;
  --ink: #241a12;
  --muted: #8a7663;
  --brand: #c2571b;
  --brand-dark: #96400f;
  --card: #ffffff;
  --line: #e9ddcc;
  --green: #2e7d4f;
  --red: #c0392b;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(60, 35, 10, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .serif { font-family: 'Fraunces', Georgia, serif; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

/* header */
#site-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 246, 239, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.head-in { display: flex; align-items: center; gap: 24px; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: 'Fraunces', Georgia, serif; font-size: 1.25rem; font-weight: 700; }
.brand-mark { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 1.2rem; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 8px; font-size: 0.95rem; }
.nav a.on, .nav a:hover { color: var(--ink); background: #f0e7d7; }
.cart-btn { position: relative; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 16px; cursor: pointer; font-size: 0.95rem; }
.cart-badge { position: absolute; top: -8px; right: -6px; background: var(--brand); color: #fff; font-size: 0.72rem; min-width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; padding: 0 5px; }

/* hero */
.hero { background: linear-gradient(135deg, #2b1d12 0%, #4a2c15 60%, #6b3d1a 100%); color: #fdf6ec; padding: 72px 0 64px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: 0 0 12px; line-height: 1.05; }
.hero p { font-size: 1.15rem; opacity: 0.88; max-width: 560px; margin: 0 0 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; border: none; cursor: pointer; text-decoration: none; font-size: 1rem; font-weight: 600; padding: 13px 26px; border-radius: 999px; background: var(--brand); color: #fff; transition: transform 0.08s, background 0.15s; }
.btn:hover { background: var(--brand-dark); }
.btn.big { width: 100%; padding: 15px; font-size: 1.05rem; }
.btn.ghost { background: transparent; border: 1.5px solid rgba(255,255,255,.5); color: #fff; }
.btn.ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn.plain { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity: 0.55; cursor: default; }

/* sections */
.section { padding: 44px 0; }
.section h2 { font-size: 1.9rem; margin: 0 0 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin-top: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card img { width: 100%; height: 160px; object-fit: cover; display: block; background: #ead9c2; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.08rem; }
.card-body p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.45; flex: 1; }
.card-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.price { font-weight: 700; font-size: 1.05rem; }
.add { border: none; background: var(--brand); color: #fff; border-radius: 999px; padding: 8px 18px; font-weight: 600; cursor: pointer; }
.add:hover { background: var(--brand-dark); }

/* mode toggle */
.modebar { display: flex; gap: 8px; align-items: center; margin: 18px 0 4px; flex-wrap: wrap; }
.seg { display: inline-flex; background: #efe5d3; border-radius: 999px; padding: 4px; }
.seg button { border: none; background: transparent; padding: 9px 22px; border-radius: 999px; font-weight: 600; cursor: pointer; color: var(--muted); font-size: 0.95rem; }
.seg button.on { background: var(--ink); color: #fff; }
.mode-note { font-size: 0.85rem; color: var(--muted); }

/* categories */
.catnav { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; position: sticky; top: 65px; background: var(--bg); z-index: 20; }
.catnav button { white-space: nowrap; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 16px; cursor: pointer; font-size: 0.9rem; }
.catnav button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* overlays / sheets */
.overlay { position: fixed; inset: 0; background: rgba(30, 18, 8, 0.5); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .overlay { align-items: center; } }
.sheet { background: var(--bg); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; animation: up 0.22s ease-out; }
@media (min-width: 640px) { .sheet { border-radius: 20px; } }
@keyframes up { from { transform: translateY(30px); opacity: 0.6; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.sheet-head h3 { margin: 0; font-size: 1.4rem; }
.x { border: none; background: #efe5d3; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.sheet-body { padding: 10px 20px; }
.sheet-foot { padding: 14px 20px 22px; border-top: 1px solid var(--line); }
.cline { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.line-mods { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.qtyrow { display: flex; gap: 8px; margin-top: 8px; }
.qtyrow button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 1rem; }
.trow { display: flex; justify-content: space-between; padding: 7px 0; font-size: 0.97rem; }
.trow.total { font-weight: 700; font-size: 1.12rem; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }

/* forms */
.field { margin: 12px 0; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 1rem; background: var(--card); }
.tiprow { display: flex; gap: 8px; margin: 8px 0; }
.tipbtn { flex: 1; border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 4px; cursor: pointer; font-weight: 600; font-size: 0.92rem; }
.tipbtn.on { border-color: var(--brand); background: #fdf1e4; color: var(--brand-dark); }
.tipbtn small { display: block; font-weight: 400; color: var(--muted); font-size: 0.8rem; }

/* confirmation */
.confirm { text-align: center; padding: 48px 20px; }
.confirm .bigcheck { width: 76px; height: 76px; border-radius: 50%; background: var(--green); color: #fff; font-size: 2.2rem; display: grid; place-items: center; margin: 0 auto 18px; }
.ordnum { display: inline-block; background: #efe5d3; border-radius: 8px; padding: 6px 14px; font-weight: 700; letter-spacing: 0.06em; margin: 10px 0; }

/* table page */
.tablehero { background: #2b1d12; color: #fdf6ec; padding: 40px 0; }
.tablehero h1 { margin: 0 0 6px; font-size: 2.2rem; }

/* dispatch */
.dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; }
.stat b { font-size: 1.7rem; display: block; }
.stat span { color: var(--muted); font-size: 0.85rem; }
.ocard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.ocard .oh { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.pill { font-size: 0.78rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.05em; }
.pill.new { background: #fdeeda; color: #a05a10; }
.pill.preparing { background: #dbeafe; color: #1d4ed8; }
.pill.ready { background: #dcfce7; color: #166534; }
.ostatus { display: flex; gap: 8px; margin-top: 12px; }
.ostatus button { flex: 1; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 10px; cursor: pointer; font-weight: 600; }
.ostatus button.cur { background: var(--ink); color: #fff; border-color: var(--ink); }
.oitems { margin: 8px 0; color: var(--muted); font-size: 0.92rem; }
.otime { font-size: 0.82rem; color: var(--muted); }

/* footer */
#site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 26px 0; }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.9rem; }

/* item modal */
.modopt { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.modopt label { display: flex; gap: 10px; align-items: center; cursor: pointer; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px; z-index: 200; font-size: 0.92rem; animation: up 0.2s; }
.spinner { width: 46px; height: 46px; border: 4px solid var(--line); border-top-color: var(--brand); border-radius: 50%; margin: 26px auto; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
