/* Koyla Charcoal Grill — mobile first, then tablet / desktop */
:root {
  --bg: #fbf8f3; --card: #ffffff; --ink: #1d1915; --muted: #6a625a; --line: #e9e2d8;
  --red: #c8281e; --red-dark: #a51f17; --dark: #191512; --gold: #e8a23a; --wa: #1fa855;
  --head: "Barlow Condensed", "Arial Narrow", sans-serif; --body: "Barlow", system-ui, sans-serif;
  --r: 12px; --pad: 16px; --max: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 132px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--body); overflow-x: clip; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 12px; }
.skip:focus { left: 8px; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: .01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; color: var(--muted); }
.center { text-align: center; }
body.locked { overflow: hidden; }
/* anything marked hidden stays hidden, even if a class gives it display:flex/grid */
[hidden] { display: none !important; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 10px; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.98); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.5); }
.btn-line { border: 1.5px solid var(--ink); }
.btn-wa { background: var(--wa); color: #fff; }
.btn.full { width: 100%; }
.btn.grow { flex: 1; }

/* top bar */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px var(--pad); background: var(--dark); color: #fff; }
.logo { text-decoration: none; font: 700 26px/1 var(--head); letter-spacing: .06em; display: flex; flex-direction: column; }
.logo small { font: 500 11px/1.3 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.top-links { display: none; }
.top-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn, .cart-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; color: #fff; cursor: pointer; }
.icon-btn:hover, .cart-btn:hover { background: rgba(255,255,255,.1); }
.icon-btn svg, .cart-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cart-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); font: 600 11px/18px var(--body); text-align: center; }

/* hero */
.hero { position: relative; min-height: 440px; display: flex; align-items: flex-end; color: #fff; background: var(--dark); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(25,21,18,.15) 20%, rgba(25,21,18,.88) 85%); }
.hero-text { position: relative; z-index: 1; padding: 24px var(--pad) 28px; width: 100%; max-width: var(--max); margin: 0 auto; }
.status { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 14px; font-weight: 500; background: rgba(0,0,0,.45); padding: 5px 10px; border-radius: 99px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: #3ccf6e; }
.status.closed i { background: #f0a23a; }
.hero h1 { font-size: 40px; text-transform: uppercase; max-width: 14ch; }
.hero-sub { margin: 10px 0 20px; font-size: 17px; color: rgba(255,255,255,.88); max-width: 40ch; }
.hero-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.facts { list-style: none; margin: 0; padding: 14px var(--pad); display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: #fff; border-bottom: 1px solid var(--line); }
.facts li { display: grid; text-align: center; }
.facts b { font: 700 17px/1.2 var(--head); }
.facts span { font-size: 12px; color: var(--muted); }

/* sections */
.block { padding: 32px var(--pad); max-width: var(--max); margin: 0 auto; }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 16px; }
.block-head h2, .about h2, .visit h2 { font-size: 32px; text-transform: uppercase; }
.block-head p { margin: 0; font-size: 14px; color: var(--muted); }

/* deals: swipe row on phones */
.deals { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad) 6px; scrollbar-width: none; }
.deals::-webkit-scrollbar { display: none; }
.deal { scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.deal img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.deal-body { padding: 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.deal-note { font-size: 12px; font-weight: 600; color: var(--red); text-transform: uppercase; letter-spacing: .05em; }
.deal h3 { font-size: 22px; }
.deal p { margin: 0; font-size: 14px; color: var(--muted); flex: 1; }
.deal-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.price { font-weight: 600; font-size: 17px; }
.price s { font-weight: 400; font-size: 14px; color: var(--muted); margin-left: 6px; }

/* menu */
.search { display: flex; align-items: center; gap: 8px; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.search input { border: 0; outline: 0; background: none; min-height: 46px; width: 100%; font-size: 16px; }
.search:focus-within { border-color: var(--ink); }
.cats { position: sticky; top: 64px; z-index: 20; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--pad) * -1) 8px; padding: 10px var(--pad); background: var(--bg); border-bottom: 1px solid var(--line); }
.cats::-webkit-scrollbar { display: none; }
.cats a { flex: none; text-decoration: none; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: 15px; font-weight: 500; white-space: nowrap; }
.cats a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.menu-cat { padding-top: 14px; }
.menu-cat h3 { font-size: 24px; text-transform: uppercase; margin: 6px 0 4px; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.item:last-child { border-bottom: 0; }
.item-name { font-weight: 600; font-size: 17px; margin: 0; }
.item-tag { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--red); background: #fdeceb; padding: 2px 7px; border-radius: 4px; vertical-align: 2px; }
.item-desc { margin: 4px 0 8px; font-size: 14px; color: var(--muted); }
.item-price { font-weight: 600; }
.item-pic { position: relative; }
.item-pic img { width: 104px; height: 104px; object-fit: cover; border-radius: 10px; background: var(--line); }
.add { position: absolute; right: -4px; bottom: -6px; min-width: 44px; height: 36px; padding: 0 12px; border-radius: 8px; background: #fff; color: var(--red); font-weight: 600; font-size: 15px; border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.add:hover { border-color: var(--red); }
.empty-search { padding: 24px 0; color: var(--muted); }

/* about */
.about { background: var(--dark); color: #fff; }
.about img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.about > div { padding: 28px var(--pad) 36px; }
.about p { color: rgba(255,255,255,.8); margin: 12px 0; }
.about .btn { margin-top: 8px; background: #fff; color: var(--ink); }

/* visit */
.visit h2 { margin-bottom: 16px; }
.info { margin: 0; display: grid; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.info div { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.info div:last-child { border-bottom: 0; }
.info dt { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.info dd { margin: 2px 0 0; }
.visit-btns { display: grid; gap: 10px; margin-top: 16px; }

.foot { padding: 28px var(--pad) 110px; text-align: center; border-top: 1px solid var(--line); font-size: 14px; }
.foot p { margin: 4px 0; }
.credit { color: var(--muted); font-size: 12px; }

/* bottom cart bar */
.cart-bar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 54px; padding: 0 18px; border-radius: 12px; background: var(--red); color: #fff; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.cart-bar[hidden] { display: none; }
.cart-bar b { font-weight: 600; }

/* sheets (bottom sheet on phones, centred dialog on desktop) */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-bg { position: absolute; inset: 0; background: rgba(20,16,13,.55); animation: fade .2s ease; }
.sheet-panel { position: relative; width: 100%; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); border-radius: 18px 18px 0 0; animation: up .28s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom); }
.x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: #fff; font-size: 26px; line-height: 1; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.is-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.is-body { padding: 18px var(--pad) 20px; }
.is-body h3 { font-size: 28px; text-transform: uppercase; }
.is-body .muted { margin: 6px 0 14px; }
.opt { border: 0; margin: 0 0 14px; padding: 0; }
.opt legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.choices { display: grid; gap: 8px; }
.choice { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; text-align: left; }
.choice[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.note-field { display: grid; gap: 6px; margin-bottom: 16px; font-weight: 600; }
.note-field small { font-weight: 400; color: var(--muted); }
.note-field input, .field input, .field select { min-height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 16px; width: 100%; font-weight: 400; }
.is-foot { display: flex; gap: 10px; position: sticky; bottom: 0; background: var(--bg); padding-top: 8px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.qty button { width: 44px; height: 46px; font-size: 20px; }
.qty span { min-width: 24px; text-align: center; font-weight: 600; }

.cart-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 16px var(--pad); background: var(--bg); border-bottom: 1px solid var(--line); }
.cart-head h3 { font-size: 26px; text-transform: uppercase; }
.cart-head .x { position: static; }
#cartItems { padding: 0 var(--pad); }
.ci { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ci-name { font-weight: 600; }
.ci-meta { font-size: 13px; color: var(--muted); }
.ci .qty { grid-column: 1; justify-self: start; margin-top: 6px; }
.ci .qty button { width: 38px; height: 36px; font-size: 18px; }
.ci-price { grid-column: 2; grid-row: 1; font-weight: 600; }
.cart-empty { padding: 32px 0; text-align: center; color: var(--muted); }
#checkout { padding: 16px var(--pad) 20px; display: grid; gap: 12px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: #ede6dc; border-radius: 10px; padding: 4px; }
.seg button { min-height: 42px; border-radius: 8px; font-weight: 600; }
.seg button[aria-checked="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.field { display: grid; gap: 5px; font-size: 14px; font-weight: 600; }
.field input.bad { border-color: var(--red); }
.totals { display: grid; gap: 4px; padding: 8px 0; font-size: 15px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-size: 18px; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 4px; }
.form-err { margin: 0; color: var(--red); font-size: 14px; min-height: 0; }
.form-err:empty { display: none; }

.toast { position: fixed; left: 50%; bottom: 84px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; transition: opacity .2s, transform .2s; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* gentle fade-in while scrolling */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .45s ease, transform .45s ease; }
.reveal.in { opacity: 1; transform: none; }

@keyframes up { from { transform: translateY(40px); opacity: .6; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- tablet ---------- */
@media (min-width: 720px) {
  :root { --pad: 28px; }
  .hero { min-height: 520px; }
  .hero h1 { font-size: 60px; }
  .hero-btns { display: flex; }
  .facts { padding: 18px var(--pad); }
  .facts b { font-size: 20px; }
  .facts span { font-size: 14px; }
  .deals { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; overflow: visible; margin: 0; padding: 0; }
  .block-head h2, .about h2, .visit h2 { font-size: 40px; }
  .search { width: 300px; }
  .cats { top: 64px; }
  #menuList { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .menu-cat { break-inside: avoid; }
  .about { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
  .about img { height: 100%; max-height: 520px; aspect-ratio: auto; }
  .about > div { padding: 48px var(--pad); max-width: 520px; }
  .visit-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
  .visit-btns { margin-top: 0; }
  .sheet { align-items: center; padding: 24px; }
  .sheet-panel { max-width: 460px; border-radius: 16px; max-height: 88dvh; }
  .sheet-panel.tall { max-width: 480px; }
  .cart-bar { left: auto; right: 24px; bottom: 24px; width: 380px; }
  .toast { bottom: 32px; }
}

/* ---------- desktop ---------- */
@media (min-width: 1024px) {
  .top { padding: 12px max(var(--pad), calc((100vw - var(--max)) / 2)); }
  .top-links { display: flex; gap: 4px; }
  .top-links a { text-decoration: none; padding: 10px 14px; border-radius: 8px; font-weight: 500; }
  .top-links a:hover { background: rgba(255,255,255,.1); }
  .hero { min-height: 600px; }
  .hero h1 { font-size: 76px; }
  .hero-sub { font-size: 19px; }
  .facts { grid-template-columns: repeat(3, auto); justify-content: center; gap: 72px; }
  .block { padding: 56px var(--pad); }
  .cats { top: 68px; }
  .item { grid-template-columns: minmax(0, 1fr) 120px; }
  .item-pic img { width: 120px; height: 120px; }
  .item:hover .item-name { color: var(--red); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .sheet-bg, .sheet-panel { animation: none; }
}
