:root {
  --brand: #E2570B;
  --brand-dark: #B8440A;
  --brand-tint: #FFF1E8;
  --ink: #241C15;
  --muted: #6B625A;
  --line: #ECE6E0;
  --bg: #F7F4F1;
  --card: #FFFFFF;
  --ok: #1F8A4C;
  --closed: #B3261E;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(36, 28, 21, .06), 0 4px 14px rgba(36, 28, 21, .06);
  --topbar-h: 56px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Poppins", var(--font);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
body.no-scroll { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.15; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 18px;
}
.brand-name { font-family: var(--display); font-weight: 700; font-size: 20px; }
.basket-btn {
  position: relative; border: 0; background: var(--brand-tint); color: var(--brand-dark);
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
}
.basket-count {
  position: absolute; top: -2px; right: -2px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 600;
  display: grid; place-items: center;
}
.basket-count[data-zero="true"] { display: none; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.18), transparent 60%),
    linear-gradient(135deg, var(--brand) 0%, #C2410C 100%);
  color: #fff;
  padding: 28px 16px 32px;
}
.hero-inner { max-width: 1120px; margin: 0 auto; }
.hero-kicker { margin: 0 0 2px; font-weight: 500; opacity: .9; }
.hero h1 { font-size: clamp(30px, 8vw, 48px); font-weight: 700; }
.hero-tagline { margin: 6px 0 16px; font-size: 17px; opacity: .95; }
.hero-meta {
  list-style: none; margin: 0 0 18px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.hero-meta li {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.16); border-radius: 999px;
  padding: 6px 12px; font-size: 13px; font-weight: 500;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.status-dot.open { background: #6EE7A0; }
.status-dot.closed { background: #FCA5A5; }
.mode-toggle {
  display: inline-flex; background: rgba(0,0,0,.18); border-radius: 999px; padding: 4px;
}
.mode-opt {
  border: 0; background: transparent; color: #fff;
  padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
}
.mode-opt.is-active { background: #fff; color: var(--brand-dark); }

/* ---------- Sections ---------- */
.section { max-width: 1120px; margin: 0 auto; padding: 24px 16px 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-head h2 { font-size: 21px; }
.carousel-ctrls { display: flex; gap: 8px; }
.round-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card);
  font-size: 22px; line-height: 1; display: grid; place-items: center;
}
.round-btn:disabled { opacity: .35; cursor: default; }

/* ---------- Popular carousel ---------- */
.carousel {
  display: grid; grid-auto-flow: column; grid-auto-columns: 72%;
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 16px 12px; margin: 0 -16px;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.carousel::-webkit-scrollbar { display: none; }
.pop-card {
  scroll-snap-align: start; scroll-margin-left: 16px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column;
}
.pop-card .thumb { aspect-ratio: 16 / 10; width: 100%; border-radius: 0; }
.pop-body { padding: 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pop-body h3 { font-size: 15px; font-weight: 600; font-family: var(--font); }
.pop-row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.price { font-weight: 600; }

/* ---------- Category nav ---------- */
.cat-nav {
  position: sticky; top: var(--topbar-h); z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 10px 0 0;
  margin-top: 12px;
}
.cat-search {
  max-width: 1120px; margin: 0 auto 8px; padding: 0 16px;
  position: relative; display: flex; align-items: center;
}
.cat-search svg { position: absolute; left: 30px; color: var(--muted); }
.cat-search input {
  width: 100%; height: 42px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
  padding: 0 16px 0 42px; font: inherit; font-size: 16px; color: var(--ink);
}
.cat-tabs {
  max-width: 1120px; margin: 0 auto;
  display: flex; gap: 4px; overflow-x: auto; padding: 0 12px;
  scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex: 0 0 auto; border: 0; background: transparent;
  padding: 10px 10px 12px; font-weight: 600; font-size: 14px; color: var(--muted);
  border-bottom: 3px solid transparent; white-space: nowrap;
}
.cat-tab.is-active { color: var(--ink); border-bottom-color: var(--brand); }

/* ---------- Layout ---------- */
.layout { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.menu-cat { padding-top: 22px; scroll-margin-top: calc(var(--topbar-h) + 110px); }
.menu-cat h2 { font-size: 20px; margin-bottom: 12px; }
.menu-cat .count { color: var(--muted); font-weight: 500; font-size: 14px; font-family: var(--font); margin-left: 6px; }
.menu-list { display: grid; gap: 10px; }
.empty { color: var(--muted); padding: 32px 0; text-align: center; }

/* ---------- Menu item card: image LH, text RH ---------- */
.item-card {
  display: grid; grid-template-columns: 96px 1fr; gap: 12px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 10px; align-items: stretch;
}
.item-card .thumb { width: 96px; height: 96px; }
.item-main { display: flex; flex-direction: column; min-width: 0; }
.item-main h3 { font-family: var(--font); font-size: 16px; font-weight: 600; }
.desc {
  margin: 4px 0 0; color: var(--muted); font-size: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.badges { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.badge { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 6px; font-family: var(--font); }
.badge.veg { background: #E7F6EC; color: var(--ok); }
.badge.spicy { background: #FDECEC; color: var(--closed); }
.badge.nuts { background: #F4ECDF; color: #7A5A1E; }
.cat-intro { margin: -4px 0 12px; color: var(--muted); font-size: 14px; }
.ctrl { display: inline-flex; align-items: center; gap: 8px; }
.price { white-space: nowrap; }
.pill { background: #fff; color: var(--brand-dark); border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; font-size: 12px; display: inline-grid; place-items: center; }

/* ---------- Option picker ---------- */
.picker {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  background: var(--card); border-radius: 18px 18px 0 0;
  max-height: 85vh; display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .25s ease;
  box-shadow: 0 -8px 30px rgba(0,0,0,.15);
  padding-bottom: env(safe-area-inset-bottom);
}
.picker[hidden] { display: none; }
.picker.is-open { transform: none; }
.picker .basket-head { align-items: flex-start; gap: 12px; }
.picker-desc { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.picker-hint { margin: 0; padding: 10px 16px; background: var(--bg); font-size: 13px; font-weight: 600; color: var(--muted); }
.opt-list { list-style: none; margin: 0; padding: 0 16px 12px; overflow-y: auto; }
.opt-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); min-height: 60px; }
.opt-name { font-weight: 600; }
.opt-price { color: var(--muted); font-size: 14px; }
@media (min-width: 1024px) {
  .picker { left: 50%; right: auto; bottom: auto; top: 50%; width: 440px; border-radius: var(--radius); transform: translate(-50%, -46%); opacity: 0; transition: opacity .15s, transform .15s; }
  .picker.is-open { transform: translate(-50%, -50%); opacity: 1; }
  .scrim:not([hidden]) { display: block !important; }
}

.thumb {
  border-radius: 10px; object-fit: cover; display: block;
  background: var(--brand-tint);
}
.thumb-ph {
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 26px; color: rgba(255,255,255,.95);
  letter-spacing: .5px;
}

/* ---------- Add / stepper ---------- */
.add-btn {
  border: 0; background: var(--brand); color: #fff;
  height: 36px; min-width: 36px; padding: 0 14px; border-radius: 999px;
  font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 4px;
}
.add-btn:active { transform: scale(.96); }
.stepper {
  display: inline-flex; align-items: center; height: 36px;
  border-radius: 999px; background: var(--brand-tint); color: var(--brand-dark);
}
.stepper button {
  border: 0; background: transparent; width: 36px; height: 36px; border-radius: 50%;
  font-size: 20px; font-weight: 600; color: inherit; display: grid; place-items: center;
}
.stepper span { min-width: 22px; text-align: center; font-weight: 600; }

/* ---------- Basket ---------- */
.basket-panel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--card); border-radius: 18px 18px 0 0;
  max-height: 85vh; display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .25s ease;
  box-shadow: 0 -8px 30px rgba(0,0,0,.15);
  padding-bottom: env(safe-area-inset-bottom);
}
.basket-panel.is-open { transform: none; }
.basket-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); }
.basket-head h2 { font-size: 19px; }
.sheet-close { border: 0; background: var(--bg); width: 34px; height: 34px; border-radius: 50%; font-size: 22px; line-height: 1; }
.basket-body { overflow-y: auto; padding: 8px 16px; flex: 1; }
.basket-line { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.basket-line .name { font-weight: 600; font-size: 15px; }
.basket-line .line-price { color: var(--muted); font-size: 14px; }
.basket-empty { text-align: center; color: var(--muted); padding: 28px 8px; }
.basket-foot { padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.sum-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.sum-row.total { color: var(--ink); font-weight: 700; font-size: 16px; margin: 8px 0 12px; }
.checkout-btn {
  width: 100%; height: 48px; border: 0; border-radius: 12px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 16px;
}
.checkout-btn:disabled { background: #D9D2CB; cursor: not-allowed; }
.note { font-size: 12px; color: var(--muted); margin: 8px 0 0; text-align: center; }

.basket-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
  height: 54px; border: 0; border-radius: 14px;
  background: var(--brand); color: #fff; font-weight: 700;
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  box-shadow: 0 8px 24px rgba(226, 87, 11, .35);
}
.basket-bar[hidden] { display: none; }
.bar-count { background: rgba(0,0,0,.2); border-radius: 8px; min-width: 28px; height: 28px; display: grid; place-items: center; font-size: 14px; }
.bar-label { flex: 1; text-align: left; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 45; }
.scrim[hidden] { display: none; }

.toast {
  position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500; transition: opacity .2s, transform .2s; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Contact footer ---------- */
.contact { background: var(--ink); color: #F4EEE8; padding: 32px 16px 24px; margin-top: 36px; }
.contact > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
.contact h2 { font-size: 21px; margin-bottom: 14px; }
.contact-grid { display: grid; gap: 10px; }
.contact-card {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  background: rgba(255,255,255,.07); border-radius: var(--radius); padding: 14px;
  min-height: 64px;
}
.contact-card:hover { background: rgba(255,255,255,.12); }
.contact-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.contact-label { display: block; font-size: 13px; opacity: .75; }
.contact-value { display: block; font-weight: 600; font-size: 16px; }
.hours { margin-top: 22px; }
.hours h3 { font-size: 16px; margin-bottom: 8px; }
.hours table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hours th { text-align: left; font-weight: 600; opacity: .7; padding: 4px 0; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.hours td { padding: 6px 0; border-top: 1px solid rgba(255,255,255,.08); }
.hours tr.today td { color: #FFB27A; font-weight: 600; }
.copy { font-size: 13px; opacity: .6; margin-top: 22px; }

/* ---------- Larger screens ---------- */
@media (min-width: 600px) {
  .carousel { grid-auto-columns: 42%; }
  .item-card { grid-template-columns: 120px 1fr; }
  .item-card .thumb { width: 120px; height: 120px; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .menu-list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .hero { padding: 48px 16px 52px; }
  .carousel { grid-auto-columns: calc((100% - 36px) / 4); margin: 0; padding: 4px 0 12px; }
  .layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
  .menu-list { grid-template-columns: 1fr; }
  .basket-panel {
    position: sticky; top: calc(var(--topbar-h) + 120px); left: auto; right: auto; bottom: auto;
    transform: none; transition: none; border-radius: var(--radius); box-shadow: var(--shadow);
    margin-top: 22px; max-height: calc(100vh - var(--topbar-h) - 140px);
  }
  .basket-panel .sheet-close, .basket-bar, .scrim { display: none !important; }
}
@media (min-width: 1200px) {
  .menu-list { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
