/* SAFFRON · Template Menu Digital (versi Indonesia)
   Warna dan font setiap tema ada di bawah. Ganti kode warna (hex) untuk mengubah warna tema. */

:root,
[data-theme="market"] {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --ink: #1d2b24;
  --muted: #5f6b63;
  --line: rgba(29, 43, 36, 0.11);
  --accent: #1f5a42;        /* buttons, active tab */
  --accent-ink: #ffffff;
  --highlight: #e7b53c;     /* "popular" and "new" badges */
  --display: "Young Serif", Georgia, serif;
}
[data-theme="espresso"] {
  --bg: #17110d;
  --surface: #221a14;
  --ink: #f3e9dc;
  --muted: #b9a993;
  --line: rgba(243, 233, 220, 0.12);
  --accent: #d6a15f;
  --accent-ink: #17110d;
  --highlight: #d6a15f;
  --display: "DM Serif Display", Georgia, serif;
}
[data-theme="citrus"] {
  --bg: #fffaf2;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --line: rgba(26, 26, 26, 0.12);
  --accent: #ff6a13;
  --accent-ink: #ffffff;
  --highlight: #ffd23f;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}
p { margin: 0; }
h1, h2, h3 { margin: 0; }
.wrap { width: min(720px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* ===== Header ===== */
.top { padding: 40px 0 20px; }
.top h1 { font-family: var(--display); font-weight: 400; font-size: clamp(36px, 9vw, 52px); line-height: 1.02; letter-spacing: -0.01em; }
[data-theme="citrus"] .top h1 { font-weight: 800; letter-spacing: -0.03em; }
.top.has-cover { padding-top: 16px; }
.cover { margin: 0 0 22px; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; background: var(--surface); }
.cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; display: block; }
.tagline { margin-top: 6px; color: var(--muted); font-size: 17px; }
.status { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, #9aa3a0); }
.status.open { --dot: #2fbf71; }
.status.closed { --dot: #e5534b; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; background: var(--surface); }
.pill:hover { border-color: var(--accent); }

/* ===== Tabs ===== */
.tabs { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.tabs-row { display: flex; align-items: center; gap: 8px; }
.tabs-list { flex: 1; display: flex; gap: 6px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.tabs-list::-webkit-scrollbar { display: none; }
.tab { flex-shrink: 0; padding: 8px 14px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap; }
.tab[aria-current="true"] { background: var(--accent); color: var(--accent-ink); }
.search-btn { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.search-row { padding-bottom: 12px; }
.search-row input { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; }
.search-row input:focus { outline: none; border-color: var(--accent); }
.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.filters:empty { display: none; }
.chip { flex-shrink: 0; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }

/* ===== Menu ===== */
.cat { padding-top: 28px; scroll-margin-top: 120px; }
.cat h2 { font-family: var(--display); font-weight: 400; font-size: 30px; margin-bottom: 8px; }
[data-theme="citrus"] .cat h2 { font-weight: 800; letter-spacing: -0.02em; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item h3 { font-size: 17px; font-weight: 700; line-height: 1.3; }
.item .desc { margin-top: 4px; color: var(--muted); font-size: 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--muted); }
.badge.hot { background: var(--highlight); color: #1a1a1a; }
.badge.spicy { background: #fde1dc; color: #b3261e; }
[data-theme="espresso"] .badge.spicy { background: #4a2420; color: #ffb4a8; }
.price { margin-top: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.thumb { width: 92px; height: 92px; border-radius: 14px; object-fit: cover; background: var(--surface); }
.add { min-width: 74px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--accent); background: transparent; color: var(--accent); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.add:hover { background: var(--accent); color: var(--accent-ink); }
.stepper { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); padding: 3px; }
.stepper button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: inherit; font-size: 18px; font-weight: 700; cursor: pointer; }
.stepper span { min-width: 18px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.empty { padding: 32px 0; color: var(--muted); text-align: center; }

/* ===== Footer ===== */
.foot { margin-top: 40px; padding: 28px 0 120px; border-top: 1px solid var(--line); }
.foot h2 { font-family: var(--display); font-weight: 400; font-size: 24px; margin-bottom: 12px; }
[data-theme="citrus"] .foot h2 { font-weight: 800; }
.hours { list-style: none; margin: 0 0 16px; padding: 0; max-width: 340px; }
.hours li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.hours li.today { font-weight: 700; }
.foot .muted { margin-top: 6px; }

/* ===== Cart bar & sheet ===== */
.cart-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 20; width: min(680px, 100% - 24px); display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 16px; border: 0; background: var(--accent); color: var(--accent-ink); font: inherit; font-size: 15px; cursor: pointer; box-shadow: 0 12px 30px rgba(0,0,0,.22); }
.cart-bar[hidden] { display: none; }
.cart-bar b { font-size: 16px; }
.sheet { width: min(560px, 100%); max-height: 88vh; margin: auto auto 0; padding: 0; border: 0; border-radius: 22px 22px 0 0; background: var(--bg); color: var(--ink); }
.sheet::backdrop { background: rgba(0,0,0,.45); }
@media (min-width: 700px) { .sheet { margin: auto; border-radius: 22px; } }
.sheet-inner { display: grid; gap: 14px; padding: 22px 20px 24px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { font-family: var(--display); font-weight: 400; font-size: 28px; }
[data-theme="citrus"] .sheet-head h2 { font-weight: 800; }
.x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.lines { list-style: none; margin: 0; padding: 0; }
.lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lines .ln { font-weight: 600; }
.lines .lp { font-variant-numeric: tabular-nums; font-weight: 600; }
.sum { display: flex; justify-content: space-between; font-size: 18px; }
.sheet label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.sheet input, .sheet textarea { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; }
.sheet input:focus, .sheet textarea:focus { outline: none; border-color: var(--accent); }
.send { padding: 15px; border-radius: 14px; border: 0; background: #25d366; color: #06341b; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; }
.error { color: #d93b30; font-size: 14px; font-weight: 600; }
.error:empty { display: none; }

/* ===== Demo theme switcher ===== */
.theme-switch { position: fixed; right: 14px; top: 14px; z-index: 30; display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0,0,0,.14); }
.theme-switch button { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.theme-switch [data-theme-set="market"] { background: conic-gradient(#1f5a42 0 50%, #e7b53c 0); }
.theme-switch [data-theme-set="espresso"] { background: conic-gradient(#17110d 0 50%, #d6a15f 0); }
.theme-switch [data-theme-set="citrus"] { background: conic-gradient(#ff6a13 0 50%, #ffd23f 0); }
.theme-switch button[aria-pressed="true"] { border-color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
