/* PandaPOS QR menu — mobile first. --accent comes from the business theme colour. */
:root {
  --accent: #F4511E;
  --bg: #f6f6f4; --surface: #ffffff; --surface-2: #f1f1ee; --text: #17181a; --muted: #6b6f76; --line: #e6e6e1;
  --ok: #15803d; --danger: #c81e1e; --radius: 18px; --shadow: 0 10px 30px rgb(17 18 20 / .10);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
html[data-theme="dark"] { --bg: #0f1012; --surface: #191b1e; --surface-2: #22252a; --text: #f3f4f6; --muted: #9aa0a9; --line: #2b2f35; --shadow: 0 10px 30px rgb(0 0 0 / .45); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: 118px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; }
[hidden] { display: none !important; }

/* Boot */
.boot { min-height: 100dvh; display: grid; place-content: center; gap: 16px; text-align: center; padding: 24px; }
.boot__logo { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; }
.boot__bar { width: 160px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 0 auto; }
.boot__bar i { display: block; width: 40%; height: 100%; background: var(--accent); border-radius: 4px; animation: boot 1s ease-in-out infinite alternate; }
@keyframes boot { from { transform: translateX(-30%); } to { transform: translateX(180%); } }
.noscript, .empty-page { max-width: 520px; margin: 0 auto; padding: 18vh 24px; text-align: center; }
.empty-page__icon { font-size: 3.4rem; }

/* Hero */
.hero { position: relative; min-height: 230px; display: flex; align-items: flex-end; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000)); background-size: cover; background-position: center; color: #fff; }
.hero--landing { min-height: 300px; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / .78) 0%, rgb(0 0 0 / .25) 55%, rgb(0 0 0 / .15) 100%); }
.hero__body { position: relative; width: 100%; max-width: 760px; margin: 0 auto; padding: 22px 18px 20px; display: grid; gap: 6px; }
.hero__logo { width: 72px; height: 72px; border-radius: 22px; object-fit: cover; background: #fff; border: 3px solid rgb(255 255 255 / .9); box-shadow: 0 8px 24px rgb(0 0 0 / .35); margin-bottom: 6px; }
.hero h1 { margin: 0; font-size: clamp(1.5rem, 6vw, 2.1rem); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.hero p { margin: 0; opacity: .92; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: rgb(255 255 255 / .16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; }
.pill--open i, .pill--closed i { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgb(74 222 128 / .25); }
.pill--closed i { background: #f87171; box-shadow: 0 0 0 3px rgb(248 113 113 / .25); }
.hero__actions { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; display: flex; gap: 8px; z-index: 2; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgb(0 0 0 / .38); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 18px; }

.notice { margin: 14px 14px 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); font-size: 14px; }

/* Sticky navigation */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.nav__inner { max-width: 760px; margin: 0 auto; padding: 10px 14px 0; }
.search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: inherit; font: inherit; }
.search span { opacity: .6; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px 12px; margin: 0 -14px; scrollbar-width: none; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; scroll-snap-align: start; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Sections and cards */
main.menu { max-width: 760px; margin: 0 auto; padding: 6px 14px calc(150px + var(--safe-b)); }
.section { padding-top: 18px; }
.section h2 { margin: 0 0 4px; font-size: 1.2rem; letter-spacing: -.01em; }
.section > p { margin: 0 0 10px; color: var(--muted); font-size: 13.5px; }
.cards { display: grid; gap: 10px; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; width: 100%; text-align: left; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .12s ease, box-shadow .12s ease; }
.card:active { transform: scale(.985); }
@media (hover: hover) { .card:hover { box-shadow: var(--shadow); } }
.card__body { display: grid; gap: 4px; align-content: start; min-width: 0; }
.card__name { font-weight: 700; font-size: 15.5px; line-height: 1.25; }
.card__desc { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.tag { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tag--fav { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.tag--out { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.card__price { font-weight: 800; font-size: 15.5px; margin-top: 4px; }
.card__price small { font-weight: 600; color: var(--muted); font-size: 12px; }
.card__media { position: relative; width: 104px; height: 104px; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__add { position: absolute; right: 6px; bottom: 6px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 22px; line-height: 1; box-shadow: 0 6px 16px rgb(0 0 0 / .25); }
.card__add--plain { position: static; align-self: end; }
.card.is-out { opacity: .55; }
.badge-count { position: absolute; left: 6px; top: 6px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: #111; color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 26px 16px calc(26px + var(--safe-b)); }
.foot strong { color: var(--text); }

/* Floating bars */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 14px calc(12px + var(--safe-b)); pointer-events: none; }
.dock__inner { max-width: 760px; margin: 0 auto; display: flex; gap: 10px; align-items: center; pointer-events: auto; }
.cartbar { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 56px; padding: 0 18px; border-radius: 18px; background: var(--accent); color: #fff; font-weight: 700; box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 45%, transparent); animation: pop .25s ease; }
.cartbar__count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: rgb(255 255 255 / .22); font-size: 13px; margin-right: 8px; }
.fab { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
@keyframes pop { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Sheets */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / .55); opacity: 0; transition: opacity .2s; }
.scrim.is-open { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 760px; margin: 0 auto; max-height: 92dvh; display: flex; flex-direction: column; background: var(--surface); border-radius: 26px 26px 0 0; transform: translateY(102%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 -20px 50px rgb(0 0 0 / .3); }
.sheet.is-open { transform: none; }
@media (prefers-reduced-motion: reduce) { .sheet, .scrim, .card, .cartbar { transition: none; animation: none; } }
.sheet__grab { width: 44px; height: 5px; border-radius: 5px; background: var(--line); margin: 10px auto 0; flex: 0 0 auto; }
.sheet__close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgb(0 0 0 / .45); color: #fff; font-size: 18px; }
.sheet__scroll { overflow-y: auto; overscroll-behavior: contain; padding: 0 18px 18px; }
.sheet__hero { margin: 10px -18px 0; height: 240px; background: var(--surface-2); }
.sheet__hero img { width: 100%; height: 100%; object-fit: cover; }
.sheet h3 { margin: 16px 0 4px; font-size: 1.35rem; letter-spacing: -.01em; padding-right: 44px; }
.sheet__desc { color: var(--muted); margin: 0 0 8px; white-space: pre-line; }
.sheet__foot { flex: 0 0 auto; display: flex; gap: 10px; align-items: center; padding: 12px 18px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--surface); }
.group { margin-top: 18px; }
.group__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.group__head strong { font-size: 15px; }
.group__rule { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.group__rule.is-required { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.group.is-invalid .group__rule { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--line); margin-bottom: 8px; text-align: left; transition: border-color .12s, background .12s; }
.opt.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.opt.is-off { opacity: .45; }
.opt__mark { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; font-size: 13px; color: #fff; }
.opt--radio .opt__mark { border-radius: 50%; }
.opt.is-on .opt__mark { background: var(--accent); border-color: var(--accent); }
.opt__name { flex: 1; min-width: 0; font-weight: 600; }
.opt__price { color: var(--muted); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.note { width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: none; color: inherit; font: inherit; resize: none; }
.note:focus { outline: 0; border-color: var(--accent); }
.stepper { display: inline-flex; align-items: center; gap: 4px; height: 52px; padding: 0 6px; border-radius: 16px; background: var(--surface-2); }
.stepper button { width: 40px; height: 40px; border-radius: 12px; font-size: 22px; font-weight: 700; display: grid; place-items: center; }
.stepper button:active { background: var(--line); }
.stepper span { min-width: 26px; text-align: center; font-weight: 800; }
.stepper--small { height: 38px; border-radius: 12px; }
.stepper--small button { width: 30px; height: 30px; font-size: 18px; }
.btn { flex: 1; height: 52px; border-radius: 16px; background: var(--accent); color: #fff; font-weight: 800; font-size: 15.5px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; }
.btn[disabled] { opacity: .5; }
.btn--ghost { background: var(--surface-2); color: var(--text); }
.btn--block { width: 100%; flex: none; }

/* Cart */
.line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line__name { font-weight: 700; }
.line__opts { color: var(--muted); font-size: 13px; }
.line__price { font-weight: 800; text-align: right; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 4px; font-size: 1.15rem; font-weight: 800; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }

/* Ticket (QR) */
.ticket { text-align: center; padding-top: 6px; }
.ticket__qr { width: min(74vw, 300px); margin: 12px auto 10px; padding: 14px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.ticket__qr svg { display: block; width: 100%; height: auto; }
.ticket__code { font: 800 2rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; }
.ticket__sub { color: var(--muted); margin: 8px 0 0; }
.ticket__timer { display: inline-block; margin-top: 10px; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: 13px; }

/* Info and waiter */
.info-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.info-row > span:first-child { font-size: 20px; width: 28px; text-align: center; }
.hours { width: 100%; border-collapse: collapse; font-size: 14px; }
.hours td { padding: 5px 0; }
.hours td:last-child { text-align: right; color: var(--muted); }
.hours tr.is-today td { font-weight: 800; color: var(--text); }
.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.reason { padding: 18px 12px; border-radius: 16px; border: 1.5px solid var(--line); font-weight: 700; display: grid; gap: 6px; justify-items: center; }
.reason span { font-size: 28px; }
.reason.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); z-index: 60; transform: translate(-50%, 20px); opacity: 0; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 14px; background: #111; color: #fff; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); transition: opacity .2s, transform .2s; pointer-events: none; text-align: center; }
.toast.is-open { opacity: 1; transform: translate(-50%, 0); }

/* Landing */
.landing { max-width: 760px; margin: 0 auto; padding: 22px 16px; }
.landing h2 { margin: 0 0 12px; }
.branches { display: grid; gap: 10px; }
.branch { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; }
.branch__text { flex: 1; display: grid; }
.branch__text small { color: var(--muted); }
.branch__go { font-size: 24px; color: var(--muted); }
