/* laCafe design system: warm palette, one typeface (Plus Jakarta Sans), a small set of reusable components */
:root {
  --primary: #F5A85C;
  --primary-hover: #EC9440;
  --accent: #E08733;
  --ink: #17181A;
  --body: #6E7075;
  --muted: #A0A2A7;
  --surface: #F5F5F6;
  --border: #EFEFF1;
  --bg: #FFFFFF;
  --page: #FCFBFA;

  --orange-bg: #FFF1E0; --orange-fg: #C4761B;
  --red-bg: #FDE9E5;    --red-fg: #C43E2B;
  --green-bg: #E6F5EC;  --green-fg: #1C8A47;
  --grey-bg: #F2F2F3;   --grey-fg: #6E7075;

  --r-card: 20px;
  --r-control: 14px;
  --r-small: 12px;
  --r-pill: 999px;
  --shadow: 0 1px 2px rgba(23, 24, 26, .04), 0 8px 24px rgba(23, 24, 26, .06);
  --header-h: 76px;
  --gutter: 24px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 72px); }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
body.modal-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
h1, h2, h3, p { margin: 0; }
svg { width: 18px; height: 18px; flex-shrink: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.app { flex: 1; }
.page { padding-top: 24px; padding-bottom: 56px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--body); }
.small { font-size: 13px; }
.center { text-align: center; display: flex; justify-content: center; }
.err { color: var(--red-fg); }
.err:empty { display: none; }
.accent { color: var(--accent); }
.ok { color: var(--green-fg); }
.narrow { max-width: 720px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: var(--r-control); background: var(--primary); color: #fff; font-weight: 700; font-size: 14px;
  transition: background .15s, transform .1s, opacity .15s; white-space: nowrap;
}
.btn:hover { background: var(--primary-hover); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; background: var(--primary); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn.lg { height: 52px; font-size: 15px; }
.btn.block { width: 100%; }
.btn.outline { background: #fff; color: var(--accent); border: 1.5px solid var(--primary); }
.btn.outline:hover { background: var(--orange-bg); }
.btn.outline.danger { color: var(--red-fg); border-color: #F2C4BB; }
.btn.outline.danger:hover { background: var(--red-bg); }
.btn.soft { background: var(--surface); color: var(--ink); }
.btn.soft:hover { background: var(--border); }
.btn.busy { pointer-events: none; opacity: .7; }
.btn svg { width: 16px; height: 16px; }
.link { color: var(--ink); font-weight: 600; font-size: 13px; }
.link:hover { color: var(--accent); }
.link.accent { color: var(--accent); }
.link.muted { color: var(--muted); font-weight: 500; }

.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: var(--r-small); background: var(--surface);
  display: inline-grid; place-items: center; color: var(--ink); transition: background .15s;
}
.icon-btn:hover { background: var(--border); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 10px; }
.icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); border: 2px solid var(--surface); }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap;
}
.tag svg { width: 12px; height: 12px; }
.tag.soft { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; }
.tag.orange { background: var(--orange-bg); color: var(--orange-fg); }
.tag.red { background: var(--red-bg); color: var(--red-fg); }
.tag.green { background: var(--green-bg); color: var(--green-fg); }
.tag.grey { background: var(--grey-bg); color: var(--grey-fg); }

/* ---------- Demo mode warning ---------- */
.demo-banner { background: #FFF4E5; border-bottom: 1px solid #F6D6AE; color: #7A4A12; font-size: 13px; }
.demo-banner.back { background: var(--green-bg); border-color: #BFE3CC; color: var(--green-fg); }
.demo-inner { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.demo-inner p { flex: 1; min-width: 0; }
.demo-ico { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.demo-banner.back .demo-ico { background: var(--green-fg); }
.demo-banner .btn { flex-shrink: 0; background: #fff; }
.foot-base a { color: var(--body); text-decoration: underline; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.hdr { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; white-space: nowrap; }
.logo-dot { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFC48A, var(--primary) 55%, var(--accent)); flex-shrink: 0; }
.hdr-ctx { display: flex; gap: 10px; flex: 1; min-width: 0; }
.ctx-pill, .kitchen-pill {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: var(--r-control);
  background: var(--surface); min-width: 0; text-align: left;
}
.ctx-pill { width: 300px; max-width: 100%; transition: background .15s; }
.ctx-pill:hover:not(:disabled) { background: var(--border); }
.ctx-pill small, .kitchen-pill small { display: block; font-size: 11px; color: var(--body); line-height: 1.2; }
.ctx-pill b, .kitchen-pill b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
.ctx-pill .chev svg { width: 16px; height: 16px; color: var(--muted); }
.ctx-ico svg { width: 18px; height: 18px; }
.kitchen-pill { background: var(--primary); color: #fff; flex-shrink: 0; }
.kitchen-pill small { color: rgba(255, 255, 255, .9); }
.kitchen-pill.closed { background: var(--grey-bg); color: var(--ink); }
.kitchen-pill.closed small { color: var(--body); }
.xs-show { display: none; }
.m-only { display: none; }
.hdr-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.search-row { padding-bottom: 14px; }
.search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 6px 0 16px; background: var(--surface); border-radius: var(--r-control); }
.search > svg { color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 15px; height: 100%; }
.search .icon-btn { background: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; height: 300px; border-radius: var(--r-card); overflow: hidden; background: #2A1C12; color: #fff; isolation: isolate; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(20, 12, 6, .78) 0%, rgba(20, 12, 6, .35) 55%, rgba(20, 12, 6, .1) 100%), linear-gradient(0deg, rgba(20, 12, 6, .55), transparent 55%); }
.hero.no-img { background: radial-gradient(120% 140% at 85% 20%, #8A4B1E 0%, #3A2414 45%, #1E140C 100%); }
.hero-emoji { position: absolute; right: 4%; top: 50%; transform: translateY(-50%) rotate(-8deg); font-size: 88px; letter-spacing: 6px; opacity: .9; z-index: -2; white-space: nowrap; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .35)); }
.hero-note {
  position: absolute; top: 20px; left: 20px; max-width: 420px; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  border-radius: 16px; background: rgba(30, 20, 12, .55); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(10px);
}
.hero-note-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .12); flex-shrink: 0; }
.hero-note strong { font-size: 14px; }
.hero-note p { font-size: 12px; color: rgba(255, 255, 255, .8); margin-top: 2px; }
.hero-note-x { color: rgba(255, 255, 255, .7); padding: 2px; }
.hero-note-x svg { width: 16px; height: 16px; }
.hero-text { position: absolute; left: 32px; bottom: 30px; right: 32px; }
.hero-text h1 { font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.hero-text p { margin-top: 6px; font-size: 14px; color: rgba(255, 255, 255, .85); }

/* ---------- Category chips ---------- */
.cats { position: sticky; top: var(--header-h); z-index: 30; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); margin: 0 calc(-1 * var(--gutter)); padding: 18px var(--gutter) 14px; }
.cats-inner { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; justify-content: safe center; }
.cats-inner::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; height: 38px; padding: 0 16px; border-radius: var(--r-small); background: var(--surface); font-weight: 600; font-size: 13px; transition: background .15s, color .15s; }
.chip:hover { background: var(--border); }
.chip.active { background: var(--primary); color: #fff; }

/* ---------- Menu + sticky cart ---------- */
.menu-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; margin-top: 10px; }
.menu-section { padding-top: 18px; }
.section-title { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.section-title h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.section-title small { color: var(--muted); font-size: 13px; }
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.pcard { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.pcard:hover { box-shadow: var(--shadow); }
.pcard-media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; text-align: left; }
.pcard-media .tag, .modal-media .tag { position: absolute; top: 12px; left: 12px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.pcard-media .tag.green { color: var(--green-fg); }
.pcard-media .tag.red { color: var(--red-fg); }
.media { position: relative; width: 100%; height: 100%; background: linear-gradient(135deg, #FFF4E8, #FDE6CF); overflow: hidden; }
.media::before { content: attr(data-emoji); position: absolute; inset: 0; display: grid; place-items: center; font-size: 56px; }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media.thumb { width: 48px; height: 48px; border-radius: 10px; flex-shrink: 0; }
.media.thumb::before { font-size: 24px; }
.fav { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--muted); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); transition: color .15s, transform .15s; }
.fav svg { width: 16px; height: 16px; }
.fav.on { color: #E5484D; }
.fav:active { transform: scale(.9); }
.pcard-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 14px; flex: 1; }
.pcard-title { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.pcard-title h3 { font-size: 15px; font-weight: 700; }
.pcard-title small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.pcard-desc { color: var(--body); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; min-height: 46px; }
.price { font-size: 16px; font-weight: 800; }

.stepper { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: var(--surface); border-radius: var(--r-small); }
.stepper button { width: 30px; height: 30px; border-radius: 9px; background: #fff; display: grid; place-items: center; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.stepper button:hover { color: var(--accent); }
.stepper button svg { width: 14px; height: 14px; }
.stepper span { min-width: 26px; text-align: center; font-weight: 700; }
.stepper.sm button { width: 26px; height: 26px; border-radius: 8px; }
.stepper.sm span { min-width: 22px; font-size: 13px; }
.stepper.lg { padding: 4px; }
.stepper.lg button { width: 40px; height: 40px; border-radius: 10px; }
.stepper.lg span { min-width: 34px; font-size: 16px; }

.cart-side { position: sticky; top: calc(var(--header-h) + 84px); }
.cart-card { background: #fff; border: 1px solid var(--border); border-radius: var(--r-card); padding: 20px; box-shadow: var(--shadow); }
.cart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cart-head h2 { font-size: 17px; font-weight: 700; }
.cart-empty { display: grid; justify-items: center; gap: 10px; padding: 24px 0 8px; text-align: center; color: var(--body); }
.cart-empty span { width: 52px; height: 52px; border-radius: 50%; background: var(--orange-bg); color: var(--accent); display: grid; place-items: center; }
.cart-empty svg { width: 22px; height: 22px; }
.cart-lines { list-style: none; margin: 0; padding: 0; max-height: calc(100vh - 420px); min-height: 60px; overflow: auto; }
.cart-lines li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-lines li:last-child { border-bottom: 0; }
.cart-lines strong { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-lines small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-price { display: block; font-size: 13px; margin-top: 2px; min-height: 18px; }
.cart-sub { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--border); color: var(--body); }
.cart-sub strong { font-size: 20px; color: var(--ink); font-weight: 800; }
.cart-card .err { margin-bottom: 10px; }
.cart-hint { text-align: center; color: var(--muted); font-size: 12px; margin-top: 10px; }

/* ---------- Mobile cart bar ---------- */
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(0deg, #fff 70%, rgba(255, 255, 255, 0)); display: none; }
.cart-bar-btn { display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 18px 0 10px; border-radius: 16px; background: var(--primary); color: #fff; font-weight: 700; box-shadow: 0 10px 24px rgba(236, 148, 64, .35); }
.cart-bar-n { display: grid; place-items: center; min-width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .25); }

/* ---------- Dish dialog ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(23, 24, 26, .45); animation: fade .2s; }
.modal-panel { position: relative; width: min(520px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: #fff; border-radius: 24px; overflow: hidden; animation: rise .25s cubic-bezier(.2, .8, .2, 1); }
.modal-media { position: relative; aspect-ratio: 16 / 9; flex-shrink: 0; }
.modal-media .media::before { font-size: 90px; }
.modal-media .fav { right: 56px; top: 12px; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.modal-x svg { width: 16px; height: 16px; }
.modal-body { padding: 20px 22px; overflow: auto; }
.modal-title { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 4px; }
.modal-title h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.mod-group { margin-top: 20px; }
.mod-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.mod-head h3 { font-size: 15px; font-weight: 700; }
.mod-head small { color: var(--muted); font-size: 12px; }
.mod-head small.req { color: var(--accent); font-weight: 600; }
.mod-list { display: grid; gap: 8px; }
.mod { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--r-control); text-align: left; transition: border-color .15s, background .15s; }
.mod:hover { border-color: #F8D0A8; }
.mod.on { border-color: var(--primary); background: #FFFAF4; }
.mod-box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #D5D6DA; display: grid; place-items: center; color: transparent; flex-shrink: 0; }
.mod.radio .mod-box { border-radius: 50%; }
.mod.on .mod-box { background: var(--primary); border-color: var(--primary); color: #fff; }
.mod-box svg { width: 12px; height: 12px; }
.modal-foot { display: flex; gap: 12px; align-items: center; padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* ---------- Cards, fields, tiles (checkout, account) ---------- */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; flex: 1; }
.page-head.flat { flex-wrap: wrap; }
.page-head.flat .btn { margin-left: auto; }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--r-card); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .summary h2 { font-size: 17px; font-weight: 700; }
.sub-head { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 10px; }
.sub-head h3 { font-size: 14px; font-weight: 700; }

.fields { display: grid; gap: 10px; margin-top: 10px; }
.fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fields.three { grid-template-columns: 2fr 1.4fr 1fr; }
.field { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 56px; padding: 8px 14px; background: var(--surface); border-radius: var(--r-control); border: 1.5px solid transparent; transition: border-color .15s, background .15s; }
.field:focus-within { border-color: var(--primary); background: #fff; }
.field > span { font-size: 12px; color: var(--body); line-height: 1.2; }
.field input, .field textarea { border: 0; background: none; outline: none; padding: 2px 0 0; font-size: 14px; font-weight: 500; width: 100%; min-width: 0; }
.field input::placeholder { color: var(--muted); font-weight: 400; }
.field.static { background: var(--surface); }
.field-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 2px; }
.field-row b { font-weight: 600; }
.field-row .link { margin-left: auto; }
.field.with-btn { padding-right: 110px; }
.field.with-btn .btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.note-field { flex-direction: row; align-items: center; gap: 10px; margin-top: 14px; min-height: 50px; }
.note-field svg { color: var(--muted); }
.otp-box { margin-top: 12px; padding: 14px; border-radius: var(--r-control); background: var(--orange-bg); display: grid; gap: 10px; }
.otp-box .field { background: #fff; }
.otp-box .link { justify-self: start; }
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-control); background: var(--orange-bg); color: var(--orange-fg); font-size: 13px; }
.notice.warn { background: var(--red-bg); color: var(--red-fg); margin-bottom: 16px; }
.notice.ok { background: var(--green-bg); color: var(--green-fg); margin-bottom: 16px; }
.notice svg { margin-top: 1px; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tiles.stack { grid-template-columns: 1fr; }
.tile { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 64px; border: 1.5px solid var(--border); border-radius: var(--r-control); background: #fff; transition: border-color .15s; }
.tile:hover { border-color: #F8D0A8; }
.tile.selected { border-color: var(--primary); }
.tile.disabled { opacity: .5; }
.tile-hit { position: absolute; inset: 0; border-radius: inherit; }
.tile-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--body); flex-shrink: 0; }
.tile.selected .tile-ico { background: var(--orange-bg); color: var(--accent); }
.tile strong { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.tile small { display: block; color: var(--body); font-size: 12px; margin-top: 1px; }
.tile .icon-btn { position: relative; z-index: 1; }

.pay-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-chip { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: var(--r-control); border: 1.5px solid var(--border); font-weight: 600; font-size: 13px; }
.pay-chip.on { border-color: var(--primary); color: var(--accent); background: #FFFAF4; }
.pay-chip:disabled { color: var(--muted); }
.pay-chip small { font-size: 11px; background: var(--surface); padding: 2px 6px; border-radius: 6px; }

.addr-form { margin-top: 14px; }
.addr-labels { display: flex; gap: 8px; }
.filter-radio input { position: absolute; opacity: 0; pointer-events: none; }
.filter-radio span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 10px; background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; }
.filter-radio input:checked + span { background: var(--ink); color: #fff; }
.filter-radio input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.locate { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.locate small { display: inline-flex; align-items: center; gap: 4px; }
.locate small svg { width: 14px; height: 14px; color: var(--green-fg); }
.manual-loc { margin-top: 10px; }
.manual-loc summary { cursor: pointer; display: inline-block; }
.form-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }

/* ---------- Checkout ---------- */
.details { display: grid; gap: 10px; margin-top: 12px; }
.detail-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-control); background: var(--surface); }
.detail-row small { display: block; color: var(--body); font-size: 12px; }
.detail-row small.err { color: var(--red-fg); margin-top: 2px; }
.detail-row strong { display: block; font-size: 14px; font-weight: 600; }
.detail-row .tile-ico { background: #fff; }
.add-row { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 16px; border: 1.5px dashed #F2C08E; border-radius: var(--r-control); color: var(--accent); font-weight: 700; background: #FFFAF4; }
.add-row:hover { background: var(--orange-bg); }
.step-hint { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-control); background: var(--surface); color: var(--body); font-size: 13px; }
.next-btn { justify-content: center; }
.co-bar .next-btn { justify-content: space-between; }
.co-bar .next-btn b:empty { display: none; }
.co-bar .next-btn svg { display: none; }
.focus-page { max-width: 640px; }
.focus-page .page-head { flex-wrap: nowrap; }
.co-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.co-side { position: sticky; top: calc(var(--header-h) + 20px); }
.co-lines { list-style: none; margin: 0; padding: 0; }
.co-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.co-line strong { display: block; font-size: 14px; font-weight: 600; }
.co-line small { display: block; color: var(--muted); font-size: 12px; }
.co-line-total { min-width: 72px; text-align: right; font-size: 14px; }
.summary h2 { margin-bottom: 12px; }
.totals { margin: 0; display: grid; gap: 10px; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; }
.totals dt { color: var(--body); }
.totals dd { margin: 0; font-weight: 600; text-align: right; }
.totals .total { padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--border); align-items: baseline; }
.totals .total dt { color: var(--ink); font-weight: 700; }
.totals .total dd { font-size: 22px; font-weight: 800; }
.totals .eta dt { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--body); }
.totals .eta svg { width: 14px; height: 14px; }
.totals.sm { gap: 8px; font-size: 13px; }
.totals.sm .total dd { font-size: 16px; }
.summary .btn { margin-top: 16px; }
.summary .err { margin-top: 12px; font-size: 13px; }
.fine { text-align: center; color: var(--muted); font-size: 12px; margin-top: 10px; }
.co-bar { display: none; }

/* ---------- Account layout ---------- */
.account-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.side { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 12px; }
.side-profile { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r-card); background: #fff; }
.side-profile strong { display: block; font-size: 14px; }
.side-profile small { display: block; color: var(--body); font-size: 12px; }
.side-profile .edit { color: var(--accent); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 700; color: var(--body); flex-shrink: 0; }
.avatar.sm { width: 36px; height: 36px; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; background: var(--orange-bg); color: var(--accent); }
.side-menu { display: grid; gap: 4px; padding: 8px; border: 1px solid var(--border); border-radius: var(--r-card); background: #fff; }
.side-row { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 12px; border-radius: var(--r-control); font-weight: 600; font-size: 14px; text-align: left; width: 100%; transition: background .15s; }
.side-row:hover { background: var(--surface); }
.side-row.active { background: var(--primary); color: #fff; }
.side-row .chev { color: var(--muted); }
.side-row.active .chev { color: #fff; }
.side-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.side-ico svg { width: 16px; height: 16px; }
.side-ico.orders { background: var(--orange-bg); color: var(--accent); }
.side-ico.favourites { background: var(--red-bg); color: #E5484D; }
.side-ico.addresses { background: var(--green-bg); color: var(--green-fg); }
.side-ico.notifications { background: #E8F0FE; color: #3B6FD8; }
.side-ico.help { background: #F0EBFD; color: #7A5AF0; }
.side-ico.logout { background: var(--red-bg); color: var(--red-fg); }
.side-row.active .side-ico { background: rgba(255, 255, 255, .25); color: #fff; }
.count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--primary); color: #fff; font-size: 12px; display: grid; place-items: center; }
.side-row.active .count { background: #fff; color: var(--accent); }
.profile-top { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.profile-top strong { display: block; font-size: 16px; }

/* Order history */
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter { height: 32px; padding: 0 12px; border-radius: 10px; background: var(--surface); font-size: 13px; font-weight: 600; }
.filter.on { background: var(--ink); color: #fff; }
.order-list { display: grid; gap: 12px; }
.order-row { display: flex; gap: 16px; justify-content: space-between; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--r-card); background: #fff; }
.or-main { min-width: 0; display: grid; gap: 8px; }
.or-id strong { display: block; font-size: 15px; }
.or-id small { color: var(--muted); font-size: 12px; }
.or-thumbs { display: flex; gap: 6px; align-items: center; }
.or-thumbs .media.thumb { width: 40px; height: 40px; }
.or-thumbs .more { font-size: 12px; color: var(--body); font-weight: 600; }
.or-items { font-size: 13px; font-weight: 500; }
.or-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.or-total { display: grid; justify-items: end; gap: 4px; }
.or-total strong { font-size: 16px; font-weight: 800; }
.or-btns { display: flex; gap: 8px; }

/* Order info */
.od { padding: 22px; }
.od-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.od-head h1 { font-size: 20px; font-weight: 800; }
.od-status { padding: 18px 0; border-bottom: 1px solid var(--border); display: grid; gap: 14px; }
.od-status-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.od-status-top span { display: inline-flex; align-items: center; gap: 6px; }
.od-status-top svg { width: 16px; height: 16px; }
.od-kind { font-weight: 700; }
.od-kind svg { color: var(--green-fg); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 8px; }
.timeline li { display: grid; grid-template-columns: 14px 1fr; column-gap: 6px; row-gap: 2px; align-content: start; }
.timeline .bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--border); margin-bottom: 8px; }
.timeline .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--border); margin-top: 2px; }
.timeline strong { font-size: 13px; font-weight: 600; color: var(--muted); line-height: 1.3; }
.timeline small { grid-column: 2; font-size: 11px; color: var(--muted); min-height: 14px; }
.timeline li.done .bar { background: #F8CFA6; }
.timeline li.done .dot { background: #F8CFA6; box-shadow: inset 0 0 0 4px #F8CFA6; }
.timeline li.done .dot, .timeline li.current .dot { background: #fff; box-shadow: inset 0 0 0 4px var(--primary); }
.timeline li.done strong, .timeline li.current strong { color: var(--ink); }
.timeline li.current .bar { background: var(--primary); }
.timeline li.current .dot { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: inset 0 0 0 4px var(--primary), 0 0 0 5px rgba(245, 168, 92, .25); } }
.od-rider { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.od-rider small { display: block; font-size: 12px; }
.od-rider strong { display: block; }
.od-lines { list-style: none; margin: 0; padding: 4px 0; }
.od-lines li { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.od-lines strong { display: block; font-size: 14px; font-weight: 600; }
.od-lines small { display: block; font-size: 12px; }
.od-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.mini-card { padding: 16px; border-radius: 16px; background: var(--page); border: 1px solid var(--border); display: grid; gap: 10px; align-content: start; }
.mini-card h3 { font-size: 14px; font-weight: 700; }
.od-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.od-actions:empty { display: none; }

.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.notes li { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r-control); }
.notes li.unread { background: #FFFAF4; border-color: #F8D9B8; }
.notes p { font-size: 13px; margin: 2px 0; }
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--border); border-radius: var(--r-control); padding: 0 16px; background: #fff; }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; font-weight: 600; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq p { padding-bottom: 16px; color: var(--body); }
.credits { margin-top: 16px; }

/* ---------- Empty, loading ---------- */
.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 56px 16px; color: var(--body); }
.empty.small { padding: 32px 16px; }
.empty-ico { font-size: 40px; width: 84px; height: 84px; border-radius: 50%; background: var(--orange-bg); display: grid; place-items: center; }
.empty.small .empty-ico { width: 64px; height: 64px; font-size: 30px; }
.empty h2 { font-size: 18px; color: var(--ink); }
.empty .btn { margin-top: 8px; }
.loading { display: grid; justify-items: center; gap: 14px; padding: 120px 0; color: var(--body); }
.spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--orange-bg); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--page); border-top: 1px solid var(--border); margin-top: 24px; }
.site-footer:empty { display: none; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 32px; padding-top: 36px; padding-bottom: 28px; }
.foot-brand { display: grid; gap: 10px; align-content: start; max-width: 360px; }
.foot-brand p { font-size: 13px; }
.foot-links { display: grid; gap: 8px; align-content: start; font-size: 13px; }
.foot-links strong { font-size: 13px; margin-bottom: 2px; }
.foot-links a { color: var(--body); }
.foot-links a:hover { color: var(--accent); }
.foot-contact { display: grid; gap: 6px; justify-items: end; text-align: right; align-content: start; font-size: 13px; }
.foot-phone { font-size: 20px; font-weight: 800; }
.foot-base { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.foot-base b { color: var(--accent); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 80; transform: translate(-50%, 20px); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: var(--r-control); background: var(--ink); color: #fff; font-weight: 600; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.has-cart-bar .toast, [data-page="checkout"] .toast, .modal-open .toast { bottom: 100px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctx-pill { width: 240px; }
  .menu-layout { grid-template-columns: minmax(0, 1fr) 310px; }
}

@media (max-width: 900px) {
  :root { --gutter: 16px; --header-h: 112px; }
  .hdr { display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'logo actions' 'ctx ctx'; gap: 8px 12px; height: auto; padding-top: 10px; padding-bottom: 10px; }
  .hdr .logo { grid-area: logo; }
  .hdr-actions { grid-area: actions; }
  .hdr-ctx { grid-area: ctx; }
  .ctx-pill { flex: 1; width: auto; height: 44px; }
  .kitchen-pill { height: 44px; padding: 0 12px; }
  .hide-sm { display: none; }

  .menu-layout { grid-template-columns: 1fr; }
  .cart-side { display: none; }
  .cart-bar { display: block; }
  .has-cart-bar .app { padding-bottom: 80px; }

  .co-layout { grid-template-columns: 1fr; }
  .co-side { position: static; }
  /* one main button on phones: the bottom bar */
  .co-side .place-btn, .co-side .next-btn, .co-side .fine { display: none; }

  /* app-like screens on phones: no footer; inner pages keep a slim header (back button and title are on the page) */
  .site-footer { display: none; }
  .m-only { display: inline-grid; }
  .page-head.flat { flex-wrap: nowrap; }
  .page-head.flat:has(.filters) { flex-wrap: wrap; }
  .page-head.flat .filters { width: 100%; }
  body:not([data-page="home"]) .hdr { grid-template-areas: 'logo actions'; }
  body:not([data-page="home"]) .hdr-ctx { display: none; }
  .co-bar { display: grid; gap: 6px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--border); }
  .co-bar small { text-align: center; color: var(--body); font-size: 12px; }
  .co-bar small:empty { display: none; }
  .co-bar .btn { justify-content: space-between; }
  [data-page="checkout"] .app { padding-bottom: 96px; }

  .account-layout { grid-template-columns: 1fr; }
  .account-layout .side { display: none; position: static; }
  .account-layout.is-home .side { display: grid; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .page { padding-top: 14px; }
  .demo-inner { align-items: flex-start; font-size: 12px; gap: 10px; }
  .demo-inner .btn { height: 30px; padding: 0 10px; font-size: 12px; }
  .hero { height: 200px; border-radius: 18px; }
  .hero-note { display: none; }
  .hero-text { left: 18px; right: 18px; bottom: 18px; }
  .hero-text h1 { font-size: 22px; }
  .hero-text p { font-size: 12px; }
  .hero-emoji { font-size: 56px; top: 34%; }
  .cats { padding: 12px var(--gutter) 10px; }
  .cats-inner { justify-content: flex-start; }
  .section-title h2 { font-size: 18px; }
  .pgrid { gap: 10px; }
  .pcard { border-radius: 16px; }
  .pcard-media { aspect-ratio: 1 / .82; }
  .pcard-body { padding: 10px 10px 10px; }
  .pcard-title { flex-direction: column; gap: 0; }
  .pcard-title h3 { font-size: 13.5px; }
  .pcard-desc { display: none; }
  .pcard-foot { padding-top: 8px; min-height: 38px; flex-wrap: wrap; }
  .price { font-size: 14px; }
  .pcard .btn.sm { height: 30px; padding: 0 12px; }
  .pcard-media .tag { top: 8px; left: 8px; height: 20px; padding: 0 7px; font-size: 9.5px; }
  .fav { top: 6px; right: 6px; width: 28px; height: 28px; }
  .kitchen-pill small { display: none; }
  .xs-hide { display: none; }
  .xs-show { display: inline; }
  .ctx-pill small { font-size: 10px; }

  .modal { padding: 0; place-items: end stretch; }
  .modal-panel { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
  @keyframes sheet { from { transform: translateY(100%); } }

  .page-head h1 { font-size: 22px; }
  .card { padding: 16px; border-radius: 18px; }
  .fields.two, .fields.three, .tiles, .od-cards { grid-template-columns: 1fr; }
  .co-line { flex-wrap: wrap; }
  .co-line .grow { min-width: calc(100% - 64px); }
  .co-line .stepper { margin-left: 60px; }
  .co-line-total { margin-left: auto; }
  .order-row { flex-direction: column; }
  .or-side { flex-direction: row; align-items: center; }
  .or-total { justify-items: start; }
  .od { padding: 16px; }
  /* vertical timeline on phones */
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline li { position: relative; grid-template-columns: 14px 1fr auto; column-gap: 12px; align-items: center; padding-bottom: 14px; }
  .timeline li:last-child { padding-bottom: 0; }
  .timeline .bar { position: absolute; left: 5px; top: 18px; bottom: -2px; width: 4px; height: auto; margin: 0; }
  .timeline li:last-child .bar { display: none; }
  .timeline .dot { margin-top: 0; }
  .timeline strong { font-size: 13px; }
  .timeline small { grid-column: 3; font-size: 12px; min-height: 0; }
  .od-actions .btn { flex: 1; }
  .foot { grid-template-columns: 1fr; gap: 20px; }
  .foot-contact { justify-items: start; text-align: left; }
}
