@import url("https://fonts.googleapis.com/css2?family=Anton&family=Archivo:wght@400;500;600;700;800&display=swap");
:root {
  --bg: #f6f0e4;
  --card: #fffdf8;
  --ink: #1c1b19;
  --muted: #6f675c;
  --line: #e7dcc8;
  --accent: #c8232c;
  --accent-ink: #ffffff;
  --ok: #15803d;
  --warn: #b45309;
  --danger: #b91c1c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
  --maxw: 760px;
  --yellow: #f4c22b;
  --blue: #1d3f8f;
  --display: "Anton", "Archivo Narrow", Impact, "Arial Narrow", sans-serif;
  font-family: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16130e;
    --card: #221f18;
    --ink: #f2efe6;
    --muted: #a49d90;
    --line: #37332a;
    --accent: #ef4a52;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 20px 16px 120px; }

header.bar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
header.bar .row {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
}
.brand { font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); display: inline-block; }
.spacer { flex: 1; }

h1 { font-size: 1.6rem; letter-spacing: -.02em; margin: .2em 0 .1em; }
h2 { font-size: 1.15rem; letter-spacing: -.01em; margin: 1.4em 0 .5em; }
p.lead { color: var(--muted); margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin: 12px 0;
}
.card.tight { padding: 12px 14px; }

.list { display: flex; flex-direction: column; gap: 10px; }

.item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.item:last-child { border-bottom: 0; }
.item .grow { flex: 1; min-width: 0; }
.item-thumb {
  width: 64px; height: 64px; flex: none; border-radius: 10px;
  object-fit: cover; background: color-mix(in srgb, var(--muted) 16%, transparent);
}
.item .name { font-weight: 600; }
.item .desc { color: var(--muted); font-size: .9rem; }
.price { font-variant-numeric: tabular-nums; white-space: nowrap; }

.qty { display: inline-flex; align-items: center; gap: 8px; }
.qty button {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-size: 1rem; cursor: pointer;
}
.qty span { min-width: 1.4ch; text-align: center; font-variant-numeric: tabular-nums; }

button, .btn {
  font: inherit; cursor: pointer;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink);
  padding: 9px 14px;
}
button:hover, .btn:hover { border-color: var(--muted); }
button:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary, button.primary {
  background: var(--accent); color: var(--accent-ink); border-color: transparent;
  font-weight: 600;
}
.btn.primary:hover, button.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; }
.btn.block { display: block; width: 100%; text-align: center; }
.btn.sm { padding: 6px 10px; font-size: .88rem; border-radius: 8px; }

.row-in { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
[hidden] { display: none !important; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.field label { font-size: .85rem; color: var(--muted); font-weight: 600; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 1px; }
textarea { min-height: 68px; resize: vertical; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: var(--card); padding: 8px 14px; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  background: color-mix(in srgb, var(--muted) 16%, transparent); color: var(--muted);
}
.pill.new    { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.pill.accepted { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
.pill.ready  { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.pill.completed { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted); }
.pill.cancelled { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.pill.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(0,0,0,.08);
}
.cartbar .row {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 16px;
  display: flex; gap: 12px; align-items: center;
}

/* the hosted site gets Netlify's "Powered by Netlify" badge in the bottom-right
   corner (flagged in common.js); lift bottom bars and toasts clear of it */
.nf-badge .cartbar .row { padding-bottom: 76px; }
.nf-badge .wrap { padding-bottom: 190px; }
.nf-badge .toast-wrap { bottom: 150px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }

.toast-wrap { position: fixed; left: 0; right: 0; bottom: 84px; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 50; pointer-events: none; }
.toast {
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px;
  font-size: .9rem; box-shadow: var(--shadow); max-width: 90vw;
}
.toast.err { background: var(--danger); color: #fff; }

.orderline { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }

.kv { display: grid; grid-template-columns: 120px 1fr; gap: 4px 12px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.center { text-align: center; }
.stack > * + * { margin-top: 10px; }
.hidden { display: none !important; }

.tally {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin: 14px 2px 2px; font-size: .9rem; color: var(--muted);
}
.tally .n { font-weight: 700; color: var(--ink); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.tally .amt { font-weight: 700; color: var(--accent); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.tally .sep { opacity: .45; }

#newbanner {
  position: sticky; top: 8px; z-index: 15;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: 1.05rem; text-align: center;
  padding: 13px 16px; border-radius: 12px; margin: 12px 0;
  cursor: pointer; box-shadow: var(--shadow);
  animation: alert-pulse 1.1s ease-in-out infinite;
}
@keyframes alert-pulse { 0%,100% { opacity: 1; } 50% { opacity: .62; } }
@media (prefers-reduced-motion: reduce) { #newbanner { animation: none; } }
code.inline { background: color-mix(in srgb, var(--muted) 14%, transparent); padding: 1px 6px; border-radius: 6px; font-size: .88em; }


/* ---- Cafe Cartel brand ---- */
header.bar::before {
  content: ""; display: block; height: 6px;
  background: linear-gradient(90deg, var(--yellow) 0 50%, var(--blue) 50% 75%, var(--accent) 75% 100%);
}
.brand img { height: 36px; width: auto; display: block; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: .01em; text-transform: uppercase; }
h1 { font-size: 2.1rem; line-height: 1.05; }
h2 { font-size: 1.45rem; color: var(--ink); border-bottom: 2px solid var(--accent); padding-bottom: 4px; }
.card h2 { border-bottom: 0; }
.btn.primary, button.primary { letter-spacing: .02em; }
[hidden] { display: none !important; }

.catnav {
  position: sticky; top: 53px; z-index: 15; display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 0; margin: 0 0 4px; background: var(--bg); scrollbar-width: none;
}
.catnav::-webkit-scrollbar { display: none; }
.catnav a {
  flex: none; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink); font-weight: 600; font-size: .9rem; white-space: nowrap;
}
.catnav a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
h2[id^="cat-"] { scroll-margin-top: 110px; }
