/* ==========================================================================
   Forkly customer app — foundation & shared components
   Brand colours, fonts and radii come from Admin → Appearance (CSS variables
   printed in the layout <head> by App\Support\Theme).
   ========================================================================== */
:root {
  --brand: #FF6B1A; --brand-600: #EB6218; --brand-700: #B8480C; --brand-50: #FFF4EC; --brand-100: #FFE3D1; --brand-contrast: #fff; --brand-rgb: 255,107,26;
  --ink: #1B1D28; --ink-2: #333645; --text: #262833; --muted: #737687; --faint: #A6A8B5;
  --line: #ECECF1; --line-2: #E0E1E8; --bg: #fff; --surface: #F6F6F9; --surface-2: #EEEEF3;
  --green: #14A44D; --green-50: #E8F7EE; --red: #E5484D; --red-50: #FDEDED; --amber: #E8A317; --amber-50: #FFF6E3; --blue: #2F6FEB; --blue-50: #EAF1FE; --violet: #7C5CFA; --violet-50: #F1EDFF;
  --font-heading: 'Plus Jakarta Sans', system-ui, sans-serif; --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --fs-base: 15px; --fw-heading: 800;
  --r: 16px; --r-sm: 10px; --r-lg: 22px; --btn-r: 999px;
  --sh-1: 0 1px 2px rgba(22, 24, 40, .06), 0 1px 1px rgba(22, 24, 40, .03);
  --sh-2: 0 10px 28px -14px rgba(22, 24, 40, .28), 0 2px 6px -2px rgba(22, 24, 40, .06);
  --sh-3: 0 30px 80px -24px rgba(22, 24, 40, .42);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --header-h: 62px; --nav-h: 64px; --container: 1280px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-padding-top: 120px; }
body { margin: 0; font-family: var(--font-body); font-size: var(--fs-base); line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); font-weight: var(--fw-heading); line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.022em; color: var(--ink); }
h1 { font-size: clamp(24px, 3.2vw, 36px); }
h2 { font-size: clamp(19px, 2.2vw, 24px); }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
::selection { background: var(--brand); color: var(--brand-contrast); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.icon { display: inline-block; vertical-align: -.2em; width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-xs { width: 14px; height: 14px; } .icon-sm { width: 17px; height: 17px; } .icon-lg { width: 24px; height: 24px; } .icon-xl { width: 32px; height: 32px; }
.fill-star { fill: #FFB020; stroke: #FFB020; }

/* ---------------------------------------------------------------- utilities */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack > * + * { margin-top: 14px; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.small { font-size: 13px; } .tiny { font-size: 12px; } .strong { font-weight: 700; } .bold { font-weight: 800; }
.center { text-align: center; } .right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.text-brand { color: var(--brand-700); } .text-green { color: var(--green); } .text-red { color: var(--red); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.divider-dot::before { content: '·'; margin: 0 6px; color: var(--faint); }
@media (max-width: 1023px) { .hide-mobile { display: none !important; } }
@media (min-width: 1024px) { .hide-desktop { display: none !important; } }

/* ---------------------------------------------------------------- buttons */
.btn { --b-bg: var(--surface); --b-fg: var(--ink); --b-bd: transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: var(--btn-r); background: var(--b-bg); color: var(--b-fg); border: 1.5px solid var(--b-bd); font-weight: 700; font-size: 14.5px; line-height: 1; white-space: nowrap; transition: background .18s, color .18s, border-color .18s, transform .12s, box-shadow .18s; user-select: none; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { --b-bg: var(--brand); --b-fg: var(--brand-contrast); box-shadow: 0 8px 20px -10px rgba(var(--brand-rgb), .75); }
.btn-primary:hover { background: var(--brand-600); }
.btn-dark { --b-bg: var(--ink); --b-fg: #fff; }
.btn-dark:hover { background: var(--ink-2); }
.btn-outline { --b-bg: #fff; --b-bd: var(--line-2); }
.btn-outline:hover { background: var(--surface); border-color: var(--faint); }
.btn-soft { --b-bg: var(--brand-50); --b-fg: var(--brand-700); }
.btn-soft:hover { background: var(--brand-100); }
.btn-ghost { --b-bg: transparent; }
.btn-danger { --b-bg: var(--red-50); --b-fg: var(--red); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; padding: 0; }
.btn-sm.btn-icon { width: 36px; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; box-shadow: none; }
.btn.is-loading { color: transparent !important; position: relative; pointer-events: none; }
.btn.is-loading::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-color: var(--b-fg) transparent var(--b-fg) transparent; animation: spin .7s linear infinite; }
.btn-split { justify-content: space-between; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: inline-grid; place-items: center; background: #fff; color: var(--ink); position: relative; transition: background .15s, transform .12s; flex: none; }
.icon-btn:hover { background: var(--surface); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.is-floating { box-shadow: var(--sh-2); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; }
.link { color: var(--brand-700); font-weight: 700; }
.link:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- chips, badges, tags */
.chip { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 650; font-size: 14px; white-space: nowrap; border: 1.5px solid transparent; transition: background .15s, color .15s, border-color .15s; }
.chip:hover { background: var(--surface-2); }
.chip .icon { width: 16px; height: 16px; }
.chip.is-active { background: var(--brand); color: var(--brand-contrast); }
.chip-outline { background: #fff; border-color: var(--line-2); }
.chip-outline.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 750; letter-spacing: .01em; white-space: nowrap; background: var(--surface); color: var(--ink-2); }
.badge .icon { width: 12px; height: 12px; stroke-width: 2.4; }
.badge-orange { background: var(--brand-50); color: var(--brand-700); }
.badge-green { background: var(--green-50); color: #0E7A39; }
.badge-red { background: var(--red-50); color: #B42328; }
.badge-blue { background: var(--blue-50); color: #1D4FC4; }
.badge-violet { background: var(--violet-50); color: #5B3CD6; }
.badge-amber { background: var(--amber-50); color: #9A6300; }
.badge-indigo { background: #EEF0FF; color: #3940C4; }
.badge-gray { background: var(--surface); color: var(--muted); }
.badge-solid { background: var(--brand); color: #fff; }
.badge-pill { border-radius: 999px; }

.rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 750; font-size: 13.5px; color: var(--ink); white-space: nowrap; }
.rating .icon { width: 15px; height: 15px; }
.rating small { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.stars { display: inline-flex; gap: 1px; }
.stars .icon { width: 14px; height: 14px; stroke: #E3E4EA; fill: #E3E4EA; }
.stars .icon.on { stroke: #FFB020; fill: #FFB020; }

/* ---------------------------------------------------------------- forms */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.label { font-size: 13.5px; font-weight: 700; color: var(--ink); display: flex; justify-content: space-between; gap: 8px; }
.label .opt { color: var(--faint); font-weight: 500; }
.help { font-size: 12.5px; color: var(--muted); }
.error { font-size: 12.5px; color: var(--red); font-weight: 600; }
.input, .select, .textarea { width: 100%; height: 50px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line-2); background: #fff; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; appearance: none; }
.textarea { height: auto; min-height: 96px; padding: 13px 16px; resize: vertical; line-height: 1.5; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23737687' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 42px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .14); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--red); }
.input-soft { background: var(--surface); border-color: transparent; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .input { padding-left: 46px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: span 2; } }

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); margin: 1px 0 0; flex: none; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 46px; height: 28px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .18); transition: transform .22s var(--ease); }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(18px); }

.segmented { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px; background: var(--surface); position: relative; }
.segmented label, .segmented button, .segmented a { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 18px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; transition: color .15s, background .2s, box-shadow .2s; white-space: nowrap; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked), .segmented .is-active { background: #fff; color: var(--ink); box-shadow: var(--sh-1), 0 2px 8px -4px rgba(22, 24, 40, .2); }
.segmented label:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.segmented .icon { width: 17px; height: 17px; }

.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--surface); border-radius: 999px; padding: 3px; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: #fff; box-shadow: var(--sh-1); transition: transform .1s, background .15s; }
.stepper button:hover { background: var(--brand-50); color: var(--brand-700); }
.stepper button:active { transform: scale(.9); }
.stepper button .icon { width: 16px; height: 16px; stroke-width: 2.6; }
.stepper output, .stepper span { min-width: 28px; text-align: center; font-weight: 800; font-size: 15px; }
.stepper-lg button { width: 42px; height: 42px; }
.stepper-lg output { min-width: 36px; font-size: 17px; }

.radio-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line-2); background: #fff; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; position: relative; }
.radio-card:hover { border-color: var(--faint); }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card .rc-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; position: relative; transition: border-color .15s; }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand); }
.radio-card:has(input:checked) .rc-dot { border-color: var(--brand); }
.radio-card:has(input:checked) .rc-dot::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--brand); }
.radio-card:has(input[type=checkbox]) .rc-dot { border-radius: 6px; }
.radio-card:has(input[type=checkbox]:checked) .rc-dot::after { inset: 0; border-radius: 4px; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/14px no-repeat; }
.radio-card .rc-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; flex: none; color: var(--ink); overflow: hidden; }
.radio-card .rc-ic img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.radio-card b { display: block; font-size: 14.5px; color: var(--ink); }
.radio-card small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }

/* ---------------------------------------------------------------- cards & alerts */
.card { background: #fff; border-radius: var(--r-lg); border: 1px solid var(--line); }
.card-pad { padding: 18px; }
@media (min-width: 768px) { .card-pad { padding: 22px 24px; } }
.card-title { font-size: 17px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.card-title .num { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; display: grid; place-items: center; flex: none; }
.soft-card { background: var(--surface); border-radius: var(--r); padding: 16px; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 14px; font-size: 14px; line-height: 1.45; background: var(--surface); color: var(--ink); }
.alert .icon { margin-top: 1px; }
.alert-success { background: var(--green-50); color: #0B5F2D; }
.alert-error { background: var(--red-50); color: #9B1C20; }
.alert-warning { background: var(--amber-50); color: #7A4E00; }
.alert-brand { background: var(--brand-50); color: var(--brand-700); }
.alert b { font-weight: 800; }

.empty { text-align: center; padding: 48px 20px; }
.empty .illustration { width: 190px; height: auto; margin: 0 auto 18px; }
.empty h3 { font-size: 19px; }
.empty p { color: var(--muted); max-width: 380px; margin: 0 auto 18px; }

/* ---------------------------------------------------------------- header */
.app-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.app-header.is-scrolled { border-color: var(--line); }
.app-header-inner { height: var(--header-h); display: flex; align-items: center; gap: 12px; }
.brand-logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-heading); font-weight: 850; font-size: 22px; letter-spacing: -.04em; color: var(--ink); flex: none; }
.brand-logo img { height: 34px; width: auto; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: var(--brand); display: grid; place-items: center; box-shadow: 0 6px 14px -6px rgba(var(--brand-rgb), .8); }
.brand-mark svg { width: 20px; height: 20px; }
.brand-logo .dot { color: var(--brand); }

.loc-btn { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px 10px 4px 4px; border-radius: 14px; text-align: left; transition: background .15s; }
.loc-btn:hover { background: var(--surface); }
.loc-btn .loc-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.loc-btn .loc-ic .icon { width: 19px; height: 19px; }
.loc-btn small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; line-height: 1.2; }
.loc-btn b { display: flex; align-items: center; gap: 3px; font-size: 15px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.loc-btn b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 44vw; }
.loc-btn b .icon { width: 16px; height: 16px; color: var(--brand); flex: none; }

.header-search { position: relative; flex: 1; max-width: 560px; }
.search-box { position: relative; }
.search-box > .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box input { width: 100%; height: 48px; border-radius: 999px; border: 1.5px solid transparent; background: var(--surface); padding: 0 44px 0 48px; font-size: 15px; outline: none; transition: background .15s, border-color .15s, box-shadow .15s; }
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .12); }
.search-box .search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff; border-radius: 18px; box-shadow: var(--sh-3); border: 1px solid var(--line); padding: 8px; z-index: 60; max-height: 70vh; overflow-y: auto; }
.suggest h6 { margin: 8px 10px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.suggest a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; }
.suggest a:hover, .suggest a.is-active { background: var(--surface); }
.suggest img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; background: var(--surface); flex: none; }
.suggest b { display: block; font-size: 14px; color: var(--ink); }
.suggest small { display: block; font-size: 12.5px; color: var(--muted); }
.suggest .suggest-all { justify-content: center; font-weight: 700; color: var(--brand-700); }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.header-link { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 14.5px; color: var(--ink); }
.header-link:hover { background: var(--surface); }
.cart-btn { display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 8px 0 16px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 750; font-size: 14.5px; transition: background .15s, transform .15s; }
.cart-btn:hover { background: var(--ink-2); }
.cart-btn .count { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: var(--brand); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.cart-btn.bump { animation: bump .45s var(--ease); }
@keyframes bump { 30% { transform: scale(1.08); } 60% { transform: scale(.97); } }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); display: grid; place-items: center; font-weight: 800; font-size: 14px; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 250px; background: #fff; border-radius: 18px; box-shadow: var(--sh-3); border: 1px solid var(--line); padding: 8px; opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .16s, transform .16s var(--ease); z-index: 70; }
.dropdown.is-open .dropdown-menu { opacity: 1; transform: none; pointer-events: auto; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; font-size: 14.5px; font-weight: 600; color: var(--ink); text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface); }
.dropdown-menu .icon { color: var(--muted); }
.dropdown-menu hr { margin: 6px 0; }
.dropdown-head { padding: 10px 12px; }
.dropdown-head b { display: block; color: var(--ink); }

@media (min-width: 1024px) {
  :root { --header-h: 76px; }
  .container { padding: 0 28px; }
  .app-header { border-bottom-color: var(--line); background: #fff; }
}

/* ---------------------------------------------------------------- bottom navigation (phones) */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); display: grid; grid-template-columns: repeat(4, 1fr); height: calc(var(--nav-h) + var(--safe-b)); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 650; color: var(--muted); position: relative; }
.bottom-nav a .icon { width: 23px; height: 23px; stroke-width: 1.9; }
.bottom-nav a.is-active { color: var(--brand); }
.bottom-nav a.is-active .icon { stroke-width: 2.3; }
.bottom-nav a .nav-badge { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
body.has-bottom-nav { padding-bottom: calc(var(--nav-h) + var(--safe-b)); }
@media (min-width: 1024px) { .bottom-nav { display: none; } body.has-bottom-nav { padding-bottom: 0; } }

/* Floating basket bar (phones) */
.basket-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 10px); z-index: 54; display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 8px 0 10px; border-radius: 18px; background: var(--brand); color: var(--brand-contrast); box-shadow: 0 18px 34px -14px rgba(var(--brand-rgb), .85); font-weight: 750; transform: translateY(0); transition: transform .3s var(--ease), opacity .3s; }
.basket-bar.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }
.basket-bar .bb-count { min-width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font-weight: 800; }
.basket-bar .bb-label { flex: 1; min-width: 0; line-height: 1.2; }
.basket-bar .bb-label small { display: block; font-size: 12px; opacity: .85; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.basket-bar .bb-total { padding: 0 10px; font-size: 16px; font-weight: 850; }
body.no-bottom-nav .basket-bar { bottom: calc(12px + var(--safe-b)); }
@media (min-width: 1024px) { .basket-bar { display: none; } }

/* ---------------------------------------------------------------- sections, rails */
.section { padding: 18px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 20px; }
.section-head p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }
.section-head .link { font-size: 14px; white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; }
@media (min-width: 1024px) { .section { padding: 26px 0; } .section-head h2 { font-size: 24px; } }

.rail { position: relative; }
.rail-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; padding: 4px 16px 10px; margin: -4px -16px -10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > * { scroll-snap-align: start; flex: none; }
.rail-nav { display: none; }
@media (min-width: 1024px) {
  .rail-track { margin: -4px -28px -10px; padding: 4px 28px 10px; scroll-padding: 0 28px; gap: 18px; }
  .rail-nav { display: flex; gap: 8px; }
  .rail-nav button { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; background: #fff; transition: background .15s, opacity .15s; }
  .rail-nav button:hover { background: var(--surface); }
  .rail-nav button[disabled] { opacity: .35; }
}

.chips-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px; margin: 0 -16px; }
.chips-scroll::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .chips-scroll { margin: 0; padding: 2px 0; flex-wrap: wrap; } }

/* ---------------------------------------------------------------- restaurant card */
.rcard { display: block; position: relative; border-radius: var(--r); transition: transform .2s var(--ease); }
.rcard:hover { transform: translateY(-2px); }
.rcard-media { position: relative; aspect-ratio: 16 / 9.4; border-radius: var(--r); overflow: hidden; background: var(--surface); isolation: isolate; }
.rcard-media > img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.rcard:hover .rcard-media > img { transform: scale(1.04); }
.rcard-media::after { content: ''; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(transparent, rgba(0, 0, 0, .22)); pointer-events: none; }
.rcard-promo { position: absolute; left: 10px; top: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 8px; background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 800; box-shadow: 0 6px 12px -6px rgba(var(--brand-rgb), .9); }
.rcard-promo .icon { width: 14px; height: 14px; stroke-width: 2.5; }
.rcard-fav { position: absolute; right: 10px; top: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .94); display: grid; place-items: center; color: var(--ink); transition: transform .15s, color .15s; }
.rcard-fav:hover { transform: scale(1.08); }
.rcard-fav .icon { width: 18px; height: 18px; }
.rcard-fav.is-saved { color: var(--red); }
.rcard-fav.is-saved .icon { fill: var(--red); }
.rcard-eta { position: absolute; right: 10px; bottom: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 999px; background: #fff; color: var(--ink); font-size: 12.5px; font-weight: 800; box-shadow: var(--sh-2); }
.rcard-eta .icon { width: 14px; height: 14px; color: var(--brand); stroke-width: 2.4; }
.rcard-logo { position: absolute; left: 10px; bottom: 10px; z-index: 2; width: 44px; height: 44px; border-radius: 12px; overflow: hidden; background: #fff; border: 2px solid #fff; box-shadow: var(--sh-2); }
.rcard-logo img { width: 100%; height: 100%; object-fit: cover; }
.rcard-closed { position: absolute; inset: 0; z-index: 3; background: rgba(20, 21, 30, .55); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; text-align: center; padding: 12px; backdrop-filter: grayscale(.6); }
.rcard-closed span { background: rgba(0, 0, 0, .45); padding: 7px 14px; border-radius: 999px; }
.rcard-body { padding: 10px 2px 2px; }
.rcard-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rcard-title h3 { margin: 0; font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcard-meta { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcard-meta .icon { width: 15px; height: 15px; vertical-align: -3px; margin-right: 3px; }
.rcard-free { color: var(--green); font-weight: 700; }
.rail .rcard { width: 78vw; max-width: 300px; }
@media (min-width: 768px) { .rail .rcard { width: 300px; } }
.grid-cards { display: grid; grid-template-columns: 1fr; gap: 22px 18px; }
@media (min-width: 640px) { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-cards { grid-template-columns: repeat(3, 1fr); gap: 30px 22px; } }
@media (min-width: 1280px) { .grid-cards.cols-4 { grid-template-columns: repeat(4, 1fr); } }

/* ---------------------------------------------------------------- dish card (rail) */
.dcard { width: 176px; display: block; position: relative; }
.dcard-media { position: relative; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: var(--surface); }
.dcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.dcard:hover .dcard-media img { transform: scale(1.05); }
.dcard-add { position: absolute; right: 8px; bottom: 8px; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--brand); display: grid; place-items: center; box-shadow: var(--sh-2); transition: transform .15s, background .15s, color .15s; }
.dcard-add:hover { background: var(--brand); color: #fff; transform: scale(1.06); }
.dcard-add .icon { width: 20px; height: 20px; stroke-width: 2.8; }
.dcard h4 { margin: 9px 0 1px; font-size: 14.5px; font-weight: 750; line-height: 1.3; }
.dcard p { margin: 0; font-size: 12.5px; color: var(--muted); }
.dcard .price { font-weight: 800; color: var(--ink); font-size: 14px; }
@media (min-width: 1024px) { .dcard { width: 200px; } }

/* ---------------------------------------------------------------- overlays: sheet / modal / dialog / toast */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(18, 19, 28, .5); opacity: 0; transition: opacity .25s; }
.overlay.is-open { opacity: 1; }
.sheet { position: fixed; z-index: 95; left: 0; right: 0; bottom: 0; max-height: 94vh; max-height: 94dvh; background: #fff; border-radius: 26px 26px 0 0; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .38s var(--ease); box-shadow: var(--sh-3); overflow: hidden; }
.sheet.is-open { transform: none; }
.sheet-handle { width: 42px; height: 5px; border-radius: 9px; background: var(--line-2); margin: 10px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); flex: none; }
.sheet-head h3 { margin: 0; font-size: 18px; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; flex: 1; }
.sheet-foot { padding: 12px 18px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); flex: none; background: #fff; }
.sheet-close { position: absolute; top: 12px; right: 12px; z-index: 5; }
@media (min-width: 768px) {
  .sheet { left: 50%; right: auto; top: 50%; bottom: auto; width: min(560px, calc(100vw - 40px)); max-height: min(88vh, 860px); border-radius: 26px; transform: translate(-50%, -46%) scale(.97); opacity: 0; transition: transform .3s var(--ease), opacity .22s; }
  .sheet.is-open { transform: translate(-50%, -50%); opacity: 1; }
  .sheet-handle { display: none; }
  .sheet.sheet-wide { width: min(720px, calc(100vw - 40px)); }
}
.drawer { position: fixed; z-index: 95; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: #fff; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .35s var(--ease); box-shadow: var(--sh-3); }
.drawer.is-open { transform: none; }
body.is-locked { overflow: hidden; }

.dialog { position: fixed; z-index: 100; left: 50%; top: 50%; width: min(400px, calc(100vw - 32px)); background: #fff; border-radius: 24px; padding: 26px 22px 20px; transform: translate(-50%, -46%) scale(.96); opacity: 0; transition: transform .25s var(--ease), opacity .2s; box-shadow: var(--sh-3); text-align: center; }
.dialog.is-open { transform: translate(-50%, -50%); opacity: 1; }
.dialog .dialog-ic { width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.dialog h3 { font-size: 19px; }
.dialog p { color: var(--muted); font-size: 14.5px; }
.dialog .dialog-actions { display: grid; gap: 8px; margin-top: 18px; }

.toasts { position: fixed; z-index: 120; left: 50%; top: 14px; transform: translateX(-50%); display: grid; gap: 8px; width: min(420px, calc(100vw - 24px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; box-shadow: var(--sh-3); animation: toastIn .35s var(--ease); pointer-events: auto; }
.toast .icon { color: #5BE38E; flex: none; }
.toast.is-error .icon { color: #FF8A8D; }
.toast.is-out { animation: toastOut .3s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }
@media (min-width: 1024px) { .toasts { top: auto; bottom: 24px; } }

.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 300% 100%; animation: shimmer 1.3s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ---------------------------------------------------------------- footer */
.app-footer { background: var(--footer-bg); color: #BFC2CF; margin-top: 40px; padding: 44px 0 28px; font-size: 14px; }
.app-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
.footer-grid h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-brand .brand-logo { color: #fff; }
.footer-brand p { margin: 14px 0 18px; max-width: 360px; line-height: 1.65; }
.footer-social { display: flex; gap: 8px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .08); display: grid; place-items: center; color: #fff; }
.footer-social a:hover { background: var(--brand); }
.footer-social .icon { width: 17px; height: 17px; }
.footer-cta { display: grid; gap: 10px; }
.footer-cta a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); color: #fff; font-weight: 700; }
.footer-cta a:hover { background: rgba(255, 255, 255, .11); }
.footer-cta .icon { color: var(--brand); }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; font-size: 13px; color: #8E91A0; }
.pay-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-badges span { padding: 5px 10px; border-radius: 8px; background: rgba(255, 255, 255, .07); color: #D5D7E0; font-size: 12px; font-weight: 700; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
@media (max-width: 1023px) { .app-footer { padding-bottom: 28px; } body.has-bottom-nav .app-footer { margin-bottom: 0; } }

/* ---------------------------------------------------------------- install banner, demo notice */
.install-banner { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); z-index: 56; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 18px; background: var(--ink); color: #fff; box-shadow: var(--sh-3); animation: toastIn .4s var(--ease); }
.install-banner .brand-mark { width: 42px; height: 42px; border-radius: 12px; flex: none; }
.install-banner b { display: block; font-size: 14.5px; }
.install-banner small { display: block; font-size: 12.5px; color: #B9BCCA; line-height: 1.35; }
.install-banner .btn { min-height: 38px; padding: 0 14px; }
.install-banner .x { width: 30px; height: 30px; display: grid; place-items: center; color: #8E91A0; flex: none; }
.demo-notice { background: var(--ink); color: #fff; font-size: 13px; text-align: center; padding: 8px 16px; }
.demo-notice a { color: var(--brand-100); font-weight: 700; text-decoration: underline; }
