/* ==========================================================
   BidarFood — customer UI
   Brand colours live here: change these to match the logo.
   ========================================================== */
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
/* Brand palette from the logo: navy #08275a · blue #0f4f94 · orange #ff8a06 · amber #ffb300.
   Light is the default (matches the logo artwork); dark follows the phone's setting or the 🌙 button. */
:root {
  color-scheme: light;
  --bg: #e4eaf5;
  --bg-2: #d6dfef;
  --surface: #ffffff;
  --surface-2: #e6ecf6;
  --line: rgba(8, 39, 90, .12);
  --text: #0b2147;
  --muted: #5a6a8d;
  --accent: #ff8a06;
  --accent-2: #ffb300;
  --accent-text: #c25e00;
  --accent-ink: #08275a;
  --navy: #08275a;
  --blue: #0f4f94;
  --ok: #109a62;
  --warn: #c77700;
  --danger: #e03e4b;
  --ok-ink: #0b7a4c; --err-ink: #b42332; --info-ink: #8a5200;
  --ov: rgba(8, 39, 90, .04);
  --ov-2: rgba(8, 39, 90, .08);
  --hdr-bg: rgba(255, 255, 255, .88);
  --nav-bg: rgba(255, 255, 255, .97);
  --tag-bg: rgba(255, 255, 255, .92);
  --fade: rgba(228, 234, 245, 0);
  --star-off: #c3cde3;
  --map-bg: #dfe7f5;
  --ph-a: #e8eefb; --ph-b: #d5e0f5;
  --prep-ink: #1f4fb8;
  --hero-ov: rgba(255, 255, 255, .78);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(8, 39, 90, .12);
  --glow: 0 0 0 1px rgba(255, 138, 6, .35), 0 10px 26px rgba(255, 138, 6, .28);
  --header-h: 64px;
}
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"], html[data-theme="auto-dark"] { }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) { color-scheme: dark; } }
html[data-theme="dark"] {
  --bg: #061631; --bg-2: #0a1f47; --surface: #0e2859; --surface-2: #153269;
  --line: rgba(255, 255, 255, .10); --text: #eef3ff; --muted: #9fb0d6;
  --accent-text: #ffb300; --accent-ink: #1a1206;
  --ok: #2fd18b; --warn: #ffb020; --danger: #ff6b78;
  --ok-ink: #9ff0c9; --err-ink: #ffb3bb; --info-ink: #ffc21a;
  --ov: rgba(255, 255, 255, .05); --ov-2: rgba(255, 255, 255, .09);
  --hdr-bg: rgba(6, 22, 49, .85); --nav-bg: rgba(8, 28, 64, .97); --tag-bg: rgba(6, 22, 49, .78);
  --fade: rgba(6, 22, 49, 0); --star-off: #4a5d8c; --map-bg: #12295a; --ph-a: #1b3470; --ph-b: #12295a;
  --prep-ink: #aab6ff;
  --hero-ov: rgba(5, 10, 40, .55);
  --shadow: 0 12px 40px rgba(0, 0, 0, .35);
}
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) {
  --bg: #061631; --bg-2: #0a1f47; --surface: #0e2859; --surface-2: #153269;
  --line: rgba(255, 255, 255, .10); --text: #eef3ff; --muted: #9fb0d6;
  --accent-text: #ffb300; --accent-ink: #1a1206;
  --ok: #2fd18b; --warn: #ffb020; --danger: #ff6b78;
  --ok-ink: #9ff0c9; --err-ink: #ffb3bb; --info-ink: #ffc21a;
  --ov: rgba(255, 255, 255, .05); --ov-2: rgba(255, 255, 255, .09);
  --hdr-bg: rgba(6, 22, 49, .85); --nav-bg: rgba(8, 28, 64, .97); --tag-bg: rgba(6, 22, 49, .78);
  --fade: rgba(6, 22, 49, 0); --star-off: #4a5d8c; --map-bg: #12295a; --ph-a: #1b3470; --ph-b: #12295a;
  --prep-ink: #aab6ff;
  --hero-ov: rgba(5, 10, 40, .55);
  --shadow: 0 12px 40px rgba(0, 0, 0, .35);
} }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.unit { font-size: .72em; color: var(--muted); font-weight: 400; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.num { font-feature-settings: "tnum"; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  padding: 11px 20px; border-radius: 999px; cursor: pointer; font-weight: 600;
  transition: transform .15s, box-shadow .2s, background .2s; white-space: nowrap;
  text-decoration: none; font-size: 15px;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--accent-ink); border: 0; box-shadow: var(--glow);
}
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.lg { padding: 15px 26px; font-size: 16px; }
.btn.sm { padding: 6px 14px; font-size: 13px; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn .spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-left-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

input[type=text], input[type=tel], input[type=password], input[type=number], input[type=search], input:not([type]), select, textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; outline: none; transition: border .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 122, 18, .15); }
textarea { resize: vertical; min-height: 80px; }
label { display: block; font-size: 13px; color: var(--muted); }
label > input, label > select, label > textarea { margin-top: 6px; color: var(--text); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid h3 { margin: 10px 0 0; font-size: 15px; color: var(--accent-text); }
.check { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 14px; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 14px; border: 1px solid; }
.alert.success { background: rgba(47, 209, 139, .1); border-color: rgba(47, 209, 139, .35); color: var(--ok-ink); }
.alert.error { background: rgba(255, 90, 106, .1); border-color: rgba(255, 90, 106, .35); color: var(--err-ink); }
.alert.info { background: rgba(255, 179, 0, .10); border-color: rgba(255, 179, 0, .35); color: var(--info-ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: var(--hdr-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 19px; }
.brand img { width: 42px; height: 42px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 138, 6, .45); }
.brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: -4px; }
.header-spacer { flex: 1; }
.open-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 5px 12px; border-radius: 999px; background: rgba(47, 209, 139, .12); color: var(--ok); font-weight: 600; }
.open-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(47, 209, 139, .25); animation: pulse 1.6s infinite; }
.open-pill.closed { background: rgba(255, 90, 106, .12); color: var(--danger); }
.open-pill.closed::before { animation: none; box-shadow: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(47, 209, 139, 0); } }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; }
.badge { position: absolute; top: -6px; left: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.badge:empty, .badge[data-n="0"] { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 56px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(620px 320px at 15% 0%, rgba(15, 79, 148, .13), transparent 70%),
    radial-gradient(520px 420px at 90% 25%, rgba(255, 138, 6, .16), transparent 70%);
}
html[data-theme="dark"] .hero::before { background:
    radial-gradient(1px 1px at 12% 22%, #fff 60%, transparent), radial-gradient(1.5px 1.5px at 58% 18%, #fff 60%, transparent),
    radial-gradient(1px 1px at 88% 28%, #fff 60%, transparent), radial-gradient(1px 1px at 46% 42%, #cfd6ff 60%, transparent),
    radial-gradient(600px 300px at 20% 10%, rgba(80, 100, 255, .2), transparent 70%), radial-gradient(500px 400px at 85% 30%, rgba(255, 138, 6, .18), transparent 70%); }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .hero::before { background:
    radial-gradient(1px 1px at 12% 22%, #fff 60%, transparent), radial-gradient(1.5px 1.5px at 58% 18%, #fff 60%, transparent),
    radial-gradient(1px 1px at 88% 28%, #fff 60%, transparent), radial-gradient(1px 1px at 46% 42%, #cfd6ff 60%, transparent),
    radial-gradient(600px 300px at 20% 10%, rgba(80, 100, 255, .2), transparent 70%), radial-gradient(500px 400px at 85% 30%, rgba(255, 138, 6, .18), transparent 70%); } }
.hero .container { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: center; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.25; margin: 0 0 12px; font-weight: 900; letter-spacing: -.5px; }
.hero h1 span { background: linear-gradient(135deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--muted); font-size: 17px; margin: 0 0 22px; max-width: 520px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.stat { background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); border-radius: 16px; padding: 10px 16px; }
.stat b { display: block; font-size: 17px; }
.stat span { font-size: 12px; color: var(--muted); }
.hero-art { position: relative; aspect-ratio: 1; max-width: 380px; justify-self: center; width: 100%; }
.moon { display: none;
  position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe3a6, #ffb347 45%, #ff7a1a 80%);
  box-shadow: 0 0 80px rgba(255, 170, 60, .45), 0 0 160px rgba(255, 120, 30, .25);
  animation: float 6s ease-in-out infinite;
}
.moon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 70% 40%, rgba(0,0,0,.08) 0 8%, transparent 9%), radial-gradient(circle at 40% 70%, rgba(0,0,0,.07) 0 6%, transparent 7%), radial-gradient(circle at 60% 75%, rgba(0,0,0,.06) 0 4%, transparent 5%); }
.hero-emoji { position: absolute; font-size: 56px; filter: drop-shadow(0 10px 20px rgba(0,0,0,.4)); animation: float 5s ease-in-out infinite; }
.hero-emoji.e1 { top: 4%; right: 2%; animation-delay: -1s; }
.hero-emoji.e2 { bottom: 6%; left: 0; animation-delay: -2.5s; font-size: 64px; }
.hero-emoji.e3 { bottom: 0; right: 12%; animation-delay: -3.5s; }
@keyframes float { 50% { transform: translateY(-10px); } }

.announce { background: linear-gradient(90deg, rgba(255, 122, 18, .18), rgba(255, 200, 87, .1)); border: 1px solid rgba(255, 122, 18, .3); border-radius: var(--radius); padding: 12px 18px; margin: 0 0 20px; font-size: 14px; }
.closed-banner { background: rgba(255, 90, 106, .1); border: 1px solid rgba(255, 90, 106, .3); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 20px; }

/* ---------- Menu ---------- */
.menu-toolbar {
  position: sticky; top: var(--header-h); z-index: 40; padding: 12px 0;
  background: linear-gradient(var(--bg) 75%, var(--fade));
}
.search-wrap { position: relative; margin-bottom: 10px; }
.search-wrap input { padding-right: 44px; border-radius: 999px; background: var(--surface); }
.search-wrap svg { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 18px; color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; gap: 6px; align-items: center; padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 14px; cursor: pointer; transition: .2s; }
.chip.active { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); border-color: transparent; font-weight: 700; }
.menu-section { padding-top: 18px; scroll-margin-top: calc(var(--header-h) + 110px); }
.menu-section h2 { font-size: 20px; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.menu-section h2 small { font-size: 13px; color: var(--muted); font-weight: 400; }
.food-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.food-card {
  position: relative; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s;
}
.food-card:hover { transform: translateY(-3px); border-color: rgba(255, 122, 18, .35); box-shadow: var(--shadow); }
.food-img { position: relative; aspect-ratio: 4/3; background: linear-gradient(135deg, var(--ph-a), var(--ph-b)); overflow: hidden; }
.food-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.food-card:hover .food-img img { transform: scale(1.05); }
.food-img .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; background: radial-gradient(circle at 50% 60%, rgba(255, 122, 18, .25), transparent 60%); }
.tag { position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--tag-bg); color: var(--text); backdrop-filter: blur(6px); }
.tag.special { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); }
.tag.off { right: auto; left: 10px; background: var(--danger); color: #fff; }
.food-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.food-body h3 { margin: 0; font-size: 16px; font-weight: 700; }
.food-body p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; flex: 1; }
.food-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.price { font-weight: 800; font-size: 17px; }
.price del { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.food-card.unavailable { opacity: .55; }
.food-card.unavailable .food-img::after { content: "تمام شد"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.55); font-weight: 800; font-size: 18px; }

.stepper { display: inline-flex; align-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.stepper button { width: 36px; height: 36px; border: 0; background: transparent; cursor: pointer; font-size: 20px; color: var(--accent-text); display: grid; place-items: center; }
.stepper span { min-width: 26px; text-align: center; font-weight: 800; }
.add-btn { width: 40px; height: 40px; border-radius: 14px; border: 0; cursor: pointer; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); font-size: 24px; font-weight: 800; display: grid; place-items: center; box-shadow: var(--glow); transition: transform .15s; }
.add-btn:active { transform: scale(.9); }
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-state .big { font-size: 56px; }

/* ---------- Cart drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 90; opacity: 0; pointer-events: none; transition: .25s; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(420px, 100%); background: var(--bg-2); z-index: 100; transform: translateX(-100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.drawer.open { transform: none; }
.drawer:not(.open) { visibility: hidden; transition: transform .3s, visibility 0s .3s; }
.drawer.open + .drawer-backdrop, .drawer-backdrop.show { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px 20px; }
.drawer-foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.cart-line { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.cart-line .thumb { width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; font-size: 28px; flex: none; }
.cart-line .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line .info { flex: 1; min-width: 0; }
.cart-line .info b { display: block; font-size: 14px; }
.cart-line .info small { color: var(--muted); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sum-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; color: var(--muted); }
.sum-row.total { color: var(--text); font-size: 17px; font-weight: 800; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.sum-row.discount { color: var(--ok); }
.progress-free { margin: 6px 0 12px; font-size: 12px; color: var(--muted); }
.progress-free .bar { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.progress-free .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 6px; transition: width .4s; }

/* floating cart bar (mobile) */
.cart-bar {
  position: fixed; bottom: calc(14px + env(safe-area-inset-bottom)); left: 16px; right: 16px; z-index: 60;
  display: none; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-radius: 18px; border: 0; cursor: pointer; text-align: right;
  background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); font-weight: 800; box-shadow: 0 12px 30px rgba(255, 122, 18, .4);
  animation: rise .35s ease;
}
.cart-bar.show { display: flex; }
.cart-bar .count { background: var(--accent-ink); color: var(--accent-text); border-radius: 10px; padding: 2px 10px; }
@keyframes rise { from { transform: translateY(120%); } }

.toast { position: fixed; top: calc(var(--header-h) + 12px); left: 50%; transform: translate(-50%, -20px); background: var(--surface-2); border: 1px solid var(--line); padding: 10px 18px; border-radius: 14px; z-index: 200; opacity: 0; pointer-events: none; transition: .3s; box-shadow: var(--shadow); font-size: 14px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(255, 90, 106, .5); }

/* ---------- Generic cards / pages ---------- */
.page { padding: 26px 0 120px; }
.page-title { font-size: 24px; margin: 0 0 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 16px; }
.card h3 { margin: 0 0 14px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.card h3 .step { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); font-size: 14px; }
.two-col { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
.sticky-col { position: sticky; top: calc(var(--header-h) + 16px); }

/* ---------- Map picker ---------- */
.map-box { position: relative; height: 380px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--map-bg); }
.map-box .leaflet-container { width: 100%; height: 100%; background: var(--map-bg); font-family: inherit; }
.center-pin { position: absolute; left: 50%; top: 50%; z-index: 500; pointer-events: none; transform: translate(-50%, -100%); transition: transform .15s; }
.center-pin.lift { transform: translate(-50%, calc(-100% - 12px)); }
.center-pin svg { width: 46px; height: 46px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.45)); }
.center-pin::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 10px; height: 4px; border-radius: 50%; background: rgba(0,0,0,.45); transform: translateX(-50%); }
.map-tools { position: absolute; z-index: 600; left: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.map-tools .icon-btn { background: #fff; color: #1a2140; box-shadow: 0 4px 14px rgba(0,0,0,.3); border: 0; }
.map-search { position: absolute; z-index: 600; top: 12px; right: 12px; left: 12px; }
.map-search input { background: rgba(255,255,255,.96); color: #111; border: 0; box-shadow: 0 4px 14px rgba(0,0,0,.25); border-radius: 14px; }
.map-search .results { background: #fff; color: #111; border-radius: 12px; margin-top: 6px; overflow: hidden; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.map-search .results div { padding: 10px 14px; cursor: pointer; font-size: 13px; border-bottom: 1px solid #eee; }
.map-search .results div:hover { background: #fff4e8; }
.map-status { margin-top: 10px; padding: 10px 14px; border-radius: 12px; font-size: 13px; background: var(--bg-2); border: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.map-status.ok { border-color: rgba(47, 209, 139, .4); color: var(--ok-ink); }
.map-status.bad { border-color: rgba(255, 90, 106, .4); color: var(--err-ink); }
.gps-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.saved-addrs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.addr-chip { flex: none; max-width: 240px; text-align: right; padding: 10px 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.addr-chip b { display: block; }
.addr-chip span { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.addr-chip.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255,122,18,.2); }

.pay-options { display: grid; gap: 10px; }
.pay-opt { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; color: var(--text); font-size: 14px; }
.pay-opt input { accent-color: var(--accent); width: 18px; height: 18px; }
.pay-opt:has(input:checked) { border-color: var(--accent); background: rgba(255, 122, 18, .08); }
.pay-opt .ic { font-size: 22px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; text-transform: uppercase; }

/* ---------- Auth ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(700px 400px at 80% 0%, rgba(255, 122, 18, .15), transparent), radial-gradient(600px 400px at 0% 100%, rgba(80, 100, 255, .15), transparent), var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 30px 26px; box-shadow: var(--shadow); }
.auth-logo { text-align: center; margin-bottom: 20px; }
.auth-logo img { width: 190px; height: auto; margin: 0 auto 10px; }
.auth-logo h1 { font-size: 21px; margin: 0; }
.auth-logo p { color: var(--muted); margin: 4px 0 0; font-size: 14px; }
.otp-inputs { display: flex; gap: 8px; direction: ltr; justify-content: center; margin: 14px 0; }
.otp-inputs input { width: 48px; height: 56px; text-align: center; font-size: 22px; font-weight: 800; padding: 0; }
.big-input { font-size: 20px !important; text-align: center; letter-spacing: 2px; direction: ltr; }
.install-steps li { margin-bottom: 8px; }

/* ---------- Tracking ---------- */
.track-hero { text-align: center; padding: 24px; }
.track-hero .big { font-size: 60px; }
.track-hero h2 { margin: 6px 0; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 38px 22px 0; color: var(--muted); }
.timeline li::before { content: ""; position: absolute; right: 9px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li .dot { position: absolute; right: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg-2); }
.timeline li.done { color: var(--text); }
.timeline li.done .dot { background: var(--ok); border-color: var(--ok); }
.timeline li.done::before { background: var(--ok); }
.timeline li.current .dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px rgba(255, 122, 18, .25); animation: pulse2 1.5s infinite; }
.timeline li.current { color: var(--accent-text); font-weight: 700; }
@keyframes pulse2 { 50% { box-shadow: 0 0 0 9px rgba(255, 122, 18, 0); } }
.timeline small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.track-map { height: 260px; border-radius: var(--radius); overflow: hidden; margin-top: 12px; }
.stars { display: flex; gap: 6px; direction: ltr; justify-content: center; font-size: 32px; }
.stars button { background: none; border: 0; cursor: pointer; color: var(--star-off); font-size: 34px; padding: 0; }
.stars button.on { color: var(--accent-text); }

.order-list { display: grid; gap: 12px; }
.order-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--text); }
.st { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); font-weight: 600; }
.st-new, .st-accepted { background: rgba(255, 200, 87, .15); color: var(--accent-text); }
.st-preparing, .st-ready { background: rgba(120, 140, 255, .15); color: var(--prep-ink); }
.st-delivering { background: rgba(255, 122, 18, .15); color: var(--accent); }
.st-delivered { background: rgba(47, 209, 139, .15); color: var(--ok); }
.st-cancelled, .st-pending_payment { background: rgba(255, 90, 106, .12); color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 50px; padding: 36px 0 110px; color: var(--muted); font-size: 14px; background: linear-gradient(transparent, var(--ov)); }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.site-footer h4 { color: var(--text); margin: 0 0 10px; font-size: 15px; }
.site-footer a { color: var(--muted); display: block; margin-bottom: 6px; }
.site-footer a:hover { color: var(--accent-text); }
.copyright { text-align: center; margin-top: 26px; font-size: 12px; }

/* leaflet tweaks */
.leaflet-control-attribution { font-size: 9px !important; direction: ltr; }
.courier-marker { font-size: 30px; line-height: 1; filter: drop-shadow(0 3px 5px rgba(0,0,0,.5)); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .food-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .sticky-col { position: static; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .brand small { display: none; }
  .hero { padding: 26px 0 14px; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { max-width: 190px; order: -1; margin-bottom: -10px; }
  .hero-emoji { font-size: 36px !important; }
  .hero p.lead { font-size: 15px; }
  .hero-stats { gap: 8px; }
  .stat { padding: 8px 12px; flex: 1; text-align: center; }
  .stat b { font-size: 15px; }
  .food-grid { grid-template-columns: 1fr; gap: 12px; }
  /* horizontal card on phones */
  .food-card { flex-direction: row-reverse; }
  .food-img { width: 122px; flex: none; aspect-ratio: auto; min-height: 130px; }
  .food-img .ph { font-size: 44px; }
  .food-body { padding: 12px 14px; }
  .food-body p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; }
  .price { font-size: 15px; }
  .tag { font-size: 10px; top: 6px; right: 6px; padding: 2px 8px; }
  .tag.off { left: 6px; }
  .form-grid { grid-template-columns: 1fr; }
  .map-box { height: 340px; }
  .drawer { width: 100%; top: auto; height: 88vh; border-radius: 22px 22px 0 0; transform: translateY(100%); border-right: 0; }
  .drawer.open { transform: none; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .header-phone { display: none; }
}
@media print {
  .site-header, .site-footer, .cart-bar, .no-print { display: none !important; }
}

/* extra */
.two-col.even { grid-template-columns: 1fr 1fr; }
@media (max-width: 980px) { .two-col.even { grid-template-columns: 1fr; } }
.track-hero svg, .btn svg { width: 18px; height: 18px; vertical-align: middle; flex: none; }

/* brand logo */
.hero-glow { position: absolute; inset: 4%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 179, 0, .28), rgba(255, 138, 6, .10) 50%, transparent 72%); filter: blur(14px); animation: glow 4s ease-in-out infinite; }
.hero-logo { position: absolute; inset: 2%; width: 96%; height: 96%; object-fit: contain; filter: drop-shadow(0 18px 28px rgba(8, 39, 90, .22)); animation: float 6s ease-in-out infinite; }
html[data-theme="dark"] .hero-logo { background: #fff; border-radius: 28px; padding: 14px; width: 92%; height: 92%; inset: 4%; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .hero-logo { background: #fff; border-radius: 28px; padding: 14px; width: 92%; height: 92%; inset: 4%; } }
@keyframes glow { 50% { transform: scale(1.06); opacity: .8; } }
.footer-logo { width: 150px; height: auto; margin-bottom: 12px; }
.brand span { background: linear-gradient(135deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand span small { -webkit-text-fill-color: var(--muted); }
@media (max-width: 640px) { .hero-art { max-width: 230px; } }

/* ===== Platform (v2) ===== */
.loc-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font-size: 13px; }
.loc-chip svg { width: 16px; height: 16px; flex: none; color: var(--accent-text); }
.loc-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-modal { position: fixed; inset: 0; z-index: 300; background: rgba(0, 0, 0, .6); display: none; align-items: center; justify-content: center; padding: 16px; }
.loc-modal.open { display: flex; }
.loc-sheet { width: min(640px, 100%); background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px; padding: 0 16px 16px; box-shadow: var(--shadow); }
.loc-sheet .drawer-head { padding: 14px 0; border: 0; }
.loc-sheet .drawer-head h3 { font-size: 16px; }
.loc-map { height: min(58vh, 460px); }
.section-title { font-size: 20px; margin: 18px 0 14px; }
.rest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rest-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: transform .2s, box-shadow .2s, border-color .2s; }
.rest-card:hover { transform: translateY(-3px); border-color: rgba(255, 122, 18, .4); box-shadow: var(--shadow); }
.rest-card.closed { opacity: .6; }
.rest-cover { position: relative; aspect-ratio: 16/7; background: radial-gradient(circle at 30% 30%, rgba(255, 194, 26, .25), transparent 55%), linear-gradient(135deg, var(--ph-a), var(--ph-b)); background-size: cover; background-position: center; }
.rest-body { position: relative; padding: 34px 16px 16px; }
.rest-logo { position: absolute; top: -30px; right: 16px; width: 60px; height: 60px; border-radius: 50%; overflow: hidden; border: 3px solid var(--surface); background: var(--bg); }
.rest-logo img { width: 100%; height: 100%; object-fit: cover; }
.rest-body h3 { margin: 0; font-size: 17px; }
.rest-body p { margin: 2px 0 10px; color: var(--muted); font-size: 13px; min-height: 1.6em; }
.rest-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: var(--muted); align-items: center; }
.rest-meta span { white-space: nowrap; }
.rest-hero { position: relative; padding: 36px 0 26px; background: linear-gradient(180deg, var(--hero-ov), var(--bg)), var(--cover, radial-gradient(600px 300px at 80% 20%, rgba(255, 122, 18, .25), transparent)); background-size: cover; background-position: center; border-bottom: 1px solid var(--line); }
.rest-hero .container { display: flex; gap: 18px; align-items: center; }
.rest-hero h1 { margin: 0; font-size: clamp(22px, 4vw, 34px); }
.rest-hero p { margin: 2px 0 10px; color: var(--muted); }
.rest-hero-logo { width: 96px; height: 96px; flex: none; border-radius: 50%; overflow: hidden; border: 3px solid rgba(255, 194, 26, .5); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.rest-hero-logo img { width: 100%; height: 100%; object-fit: cover; }
.low-stock { color: var(--warn); font-size: 12px; font-weight: 700; }
.order-rest { display: flex; align-items: center; gap: 10px; color: var(--text); }
.order-rest img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.push-cta { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px; border-radius: 16px; background: rgba(255, 194, 26, .08); border: 1px solid rgba(255, 194, 26, .25); font-size: 14px; }
.st-rejected { background: rgba(255, 90, 106, .12); color: var(--danger); }
.st-t-open { background: rgba(255, 194, 26, .15); color: var(--accent-text); }
.st-t-answered { background: rgba(47, 209, 139, .15); color: var(--ok); }
.st-t-closed { background: var(--surface-2); color: var(--muted); }
.ticket-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); color: var(--text); }
.thread { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 16px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; background: var(--surface-2); line-height: 1.9; font-size: 14px; }
.msg.mine { align-self: flex-start; background: rgba(255, 122, 18, .15); border: 1px solid rgba(255, 122, 18, .25); }
.msg.staff { align-self: flex-end; background: rgba(47, 209, 139, .1); border: 1px solid rgba(47, 209, 139, .25); }
.msg-meta { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.reply-form { display: flex; gap: 8px; align-items: flex-end; }
.reply-form textarea { flex: 1; }
.bottom-nav { display: none; }
@media (max-width: 980px) { .rest-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .rest-grid { grid-template-columns: 1fr; gap: 14px; }
  .loc-chip { max-width: 150px; }
  .brand span { display: none; }
  .hide-sm { display: none !important; }
  .rest-hero-logo { width: 72px; height: 72px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 55; background: var(--nav-bg); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); }
  .bottom-nav svg { width: 22px; height: 22px; }
  .cart-bar { bottom: calc(70px + env(safe-area-inset-bottom)); }
  .site-footer { padding-bottom: 150px; }
  .loc-modal { padding: 0; align-items: flex-end; }
  .loc-sheet { border-radius: 22px 22px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}
@media (display-mode: standalone) { .site-footer .cols { display: none; } }

/* support card + order number */
.support-card{display:flex;gap:14px;align-items:center}
.support-card .qr-img{width:104px;height:104px;border-radius:10px;background:#fff;padding:4px;image-rendering:pixelated;flex-shrink:0}
.order-no{font-size:26px;font-weight:900;letter-spacing:3px;color:var(--accent-text);direction:ltr;text-align:right}
.code-chips{display:flex;gap:6px;flex-wrap:wrap}
.code-chip{display:inline-flex;gap:4px;align-items:center;background:var(--bg-2);border:1px solid var(--line);border-radius:999px;padding:3px 10px;font-size:12px}
.code-chip b{letter-spacing:1px}

/* support: call box, quick reports, codes */
.support-call{display:flex;align-items:center;gap:12px}
.call-big{display:inline-block;font-size:24px;font-weight:900;margin:4px 0;direction:ltr;text-decoration:none}
.quick-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:12px}
.quick-btn{font:inherit;font-size:15px;font-weight:700;padding:16px 10px;border-radius:14px;border:1px solid var(--line);background:var(--surface-2,var(--ov));color:inherit;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:6px}
.quick-btn span{font-size:30px}
.quick-btn:active{transform:scale(.97)}
select.big-select{font-size:16px;padding:12px}
a.code-chip:hover{border-color:var(--accent,#ff7a12)}
.order-no-big{font-size:30px;font-weight:900;letter-spacing:3px;direction:ltr;text-align:center}
.qr-box{text-align:center}.qr-box img{width:120px;height:120px;background:#fff;padding:4px;border-radius:8px;image-rendering:pixelated}
[hidden]{display:none!important}

/* ===== v8: options, wallet, delivery code, favorites, reviews ===== */
.opt-hint { display: block; color: var(--accent-text); font-size: 12px; margin-top: 2px; }
.qty-ctl { position: relative; }
.opt-count { position: absolute; top: -6px; left: -6px; background: var(--accent); color: var(--accent-ink); border-radius: 10px; font-size: 11px; font-weight: 800; padding: 0 6px; }
.opt-dlg { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); width: min(440px, 94vw); padding: 18px; }
.opt-dlg::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.opt-dlg h3 { margin: 0 0 10px; }
.opt-dlg fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 10px; padding: 8px 12px; }
.opt-dlg legend { font-weight: 700; padding: 0 6px; }
.opt-choice { display: flex; align-items: center; gap: 8px; padding: 7px 0; cursor: pointer; border-bottom: 1px dashed var(--line); }
.opt-choice span { flex: 1; }
.opt-choice small { color: var(--accent-text); }
.opt-choice input { width: auto; margin: 0; }
.opt-foot { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.opt-foot b { flex: 1; font-size: 18px; }
.cart-line .info small.opts { color: var(--accent-text); display: block; }
.fav-btn { background: none; border: 0; font-size: 20px; cursor: pointer; padding: 0 4px; }
.reviews { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.review { background: var(--ov); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.review p { margin: 6px 0 0; font-size: 14px; }
.stars-sm { color: #ffc21a; letter-spacing: 1px; }
.pin-show { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 12px auto; padding: 12px 18px; border: 2px dashed var(--accent); border-radius: 16px; max-width: 280px; }
.pin-show b { font-size: 34px; letter-spacing: 10px; color: var(--accent-text); }
.pin-show small { color: #aab; font-size: 12px; text-align: center; }
.sched-pill { display: inline-block; background: rgba(255,194,26,.12); color: var(--accent-text); padding: 4px 12px; border-radius: 20px; font-size: 13px; }
.wallet-bal { font-size: 22px; color: var(--ok); }
.wallet-opt { margin-bottom: 10px; border-color: var(--ok) !important; }
.fav-list { display: grid; gap: 6px; }
.fav-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.grid.k2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .grid.k2 { grid-template-columns: 1fr; } }
.city-chips { margin: 0 0 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.city-chips .chip.active { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); }

/* v11 — night food feed («غذاهای همین حالا») */
.view-toggle { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin: 14px 0 4px; gap: 4px; }
.view-toggle a { padding: 8px 18px; border-radius: 999px; color: var(--muted); font-weight: 700; font-size: 14px; }
.view-toggle a.on { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); }
.section-title small { font-size: 13px; font-weight: 400; margin-inline-start: 6px; }
.type-chips { margin: 10px 0 6px; }
.type-chips .chip small { opacity: .75; font-size: 12px; }
.type-chips .chip.empty { opacity: .45; }
.feed-sort { display: flex; justify-content: flex-end; margin: 6px 0 10px; }
.feed-sort label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.feed-sort select { width: auto; padding: 6px 10px; }
.feed-section { padding-top: 16px; }
.feed-section h2 { font-size: 19px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.feed-section h2 small { font-size: 13px; color: var(--muted); font-weight: 400; }
.feed-section .more-link { margin-inline-start: auto; font-size: 13px; color: var(--accent); font-weight: 700; }
.feed-more { display: contents; }
.feed-more[hidden] { display: none; }
.feed-card .feed-rest { color: var(--accent); font-size: 13px; font-weight: 700; }
.feed-card .feed-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 12px; }
.feed-card .food-body { gap: 5px; }
.feed-card .food-foot { margin-top: auto; }
.feed-card.closing { border-color: rgba(255, 176, 32, .35); }
.tag.closing { background: var(--warn); color: #221400; }
.closed-rests { margin: 26px 0 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.closed-rests summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.closed-rests .rest-grid { margin-top: 14px; }
@media (max-width: 640px) {
  .view-toggle { display: flex; }
  .view-toggle a { flex: 1; text-align: center; padding: 8px 6px; }
  .feed-card .food-img { width: 112px; }
}
@media (min-width: 981px) {
  .feed-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .feed-card .food-img { aspect-ratio: 16/10; }
  .feed-card .food-img .ph { font-size: 52px; }
  .feed-card .food-body { padding: 12px 14px 14px; }
}
@media (max-width: 640px) {
  /* night food feed: get the food on screen first */
  .hero.compact { padding: 14px 0 4px; }
  .hero.compact .hero-art, .hero.compact .hero-stats, .hero.compact p.lead { display: none; }
  .hero.compact h1 { font-size: 24px; margin-bottom: 10px; }
  .hero.compact h1 br { display: none; }
  .hero.compact .hero-actions .btn { padding: 10px 16px; font-size: 14px; }
}
/* v12 customer withdrawal */
.cw-box { margin: 10px 0; background: var(--bg-2, var(--ov)); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.cw-box summary { cursor: pointer; font-weight: 700; }
.cw-box .form-grid { margin-top: 10px; }
.results div b { font-weight: 600; }
.results div small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }

/* ---------- Checkout page v2 (tidy + mobile) ---------- */
.checkout-page { overflow-x: clip; }
.checkout-page .two-col > * { min-width: 0; }
.co-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 16px; }
.co-head .page-title { margin: 0; }
.co-rest { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.checkout-page .card h3 { font-size: 16px; }
.checkout-page .form-grid > * { min-width: 0; }
.row3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; }
.row3 label { min-width: 0; }
.save-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.save-row .check { flex: none; }
.save-row input { flex: 1 1 120px; min-width: 0; max-width: 220px; margin: 0; padding: 8px 12px; }
.other-box { grid-template-columns: 1fr 1fr; }
.pay-opt .pt { min-width: 0; flex: 1; line-height: 1.7; }
.pay-opt .pt select { margin-top: 6px; }
.pay-opt.wallet-opt { margin-bottom: 10px; }
.edit-cart { font-size: 13px; display: inline-block; margin: 10px 0 4px; }
.coupon-row { margin: 8px 0 12px; }
.coupon-msg { font-size: 13px; min-height: 0; }
.coupon-msg:empty { display: none; }
.terms-note { font-size: 12px; text-align: center; margin: 10px 0 0; }
#submitBtn { margin-top: 16px; }
.cart-line .num { white-space: nowrap; font-size: 13px; }
.sum-row > span:first-child { min-width: 0; }
.map-status { line-height: 1.7; }

/* sticky bottom bar (phones/tablets only) */
.co-bar { display: none; }
@media (max-width: 980px) {
  .checkout-page { padding-bottom: 96px; }
  .co-bar { display: flex; align-items: center; gap: 12px; position: fixed; right: 0; left: 0; bottom: 0; z-index: 70; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--nav-bg); backdrop-filter: blur(12px); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(8,39,90,.14); }
  .co-bar-sum { flex: none; display: flex; flex-direction: column; line-height: 1.4; }
  .co-bar-sum small { color: var(--muted); font-size: 11px; }
  .co-bar-sum b { font-size: 16px; white-space: nowrap; }
  .co-bar .btn { flex: 1; padding: 13px 14px; font-size: 15px; white-space: nowrap; }
  .site-footer { padding-bottom: 110px; }
}
@media (max-width: 640px) {
  /* 16px inputs stop iOS Safari from zooming the page on focus */
  input[type=text], input[type=tel], input[type=password], input[type=number], input[type=search], input:not([type]), select, textarea { font-size: 16px; }
  .checkout-page .container, .checkout-page { padding-left: 14px; padding-right: 14px; }
  .co-head { margin-bottom: 12px; }
  .page-title { font-size: 21px; }
  .checkout-page .card { padding: 14px; border-radius: 16px; }
  .checkout-page .card + .card { margin-top: 12px; }
  .row3 { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .row3 label { font-size: 12px; }
  .other-box { grid-template-columns: 1fr; }
  .pay-opt { padding: 12px; gap: 10px; }
  .pay-opt .ic { font-size: 20px; }
  .saved-addrs { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; scroll-snap-type: x proximity; }
  .addr-chip { max-width: 70vw; scroll-snap-align: start; }
  .map-box { height: 300px; }
  .cart-line { gap: 10px; }
  .cart-line .thumb { width: 48px; height: 48px; }
}
.map-box { isolation: isolate; z-index: 0; }
.save-row .check { white-space: nowrap; }
/* saved address chip with delete + wallet top-up */
.addr-wrap { position: relative; flex: none; }
.addr-wrap .addr-chip { padding-left: 40px; }
.addr-del { position: absolute; left: 6px; top: 6px; width: 28px; height: 28px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2, var(--ov)); font-size: 14px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.addr-del:hover { border-color: rgba(255, 90, 106, .6); background: rgba(255, 90, 106, .15); }
.topup-box { display: grid; gap: 10px; margin: 12px 0; padding: 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.topup-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.topup-chips .chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 13px; color: var(--text); }
.topup-chips .chip:hover, .topup-chips .chip:focus { border-color: var(--accent); }
.topup-row { display: flex; gap: 8px; }
.topup-row input { flex: 1; min-width: 0; }
.topup-row .btn { white-space: nowrap; }
/* wallet action buttons */
.wallet-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin: 12px 0; }
.wallet-actions button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); cursor: pointer; font-size: 18px; }
.wallet-actions button span { font-size: 12px; font-weight: 700; }
.wallet-actions button.on, .wallet-actions button:hover { border-color: var(--accent); background: rgba(255, 122, 18, .1); }
.wpanel[hidden] { display: none !important; }
.cw-box.wpanel { margin: 12px 0; }

/* map markers: van picture vs motorbike picture */
.veh-marker img{width:100%;height:100%;display:block;filter:drop-shadow(0 2px 3px rgba(0,0,0,.45))}

/* آدرس‌های ذخیره‌شدهٔ مشتری (سربرگ) */
.as-modal{position:fixed;inset:0;z-index:310;background:rgba(0,0,0,.6);display:none;align-items:flex-end;justify-content:center}
.as-modal.open{display:flex}
.as-sheet{width:min(560px,100%);max-height:88vh;overflow:auto;background:#fff;color:#111;border-radius:22px 22px 0 0;padding:16px}
.as-sheet h3{margin:0 0 4px;color:#111}.as-sheet p{margin:4px 0 10px;color:#333}
.as-row{display:flex;gap:8px;align-items:stretch;margin:8px 0}
.as-pick{flex:1;text-align:right;background:#f6f7fb;border:2px solid #cfd3e3;border-radius:14px;padding:11px 12px;font:inherit;color:#111;cursor:pointer}
.as-pick b{display:block;font-size:16px;color:#111}.as-pick span{display:block;color:#333;font-size:13px;margin-top:2px}
.as-pick.on{border-color:#1a9a4f;background:#e8f8ee}
.as-del{flex:none;width:48px;border:2px solid #d33;background:#fff;border-radius:14px;font-size:18px;cursor:pointer}
.as-act{display:block;width:100%;margin:8px 0;padding:13px;border-radius:14px;border:2px solid #ff7a12;background:#fff4ea;color:#000;font:inherit;font-weight:800;font-size:16px;cursor:pointer}
.as-act.pri{background:#ff7a12}
.as-sheet input,.as-sheet textarea{width:100%;padding:11px;border:2px solid #888;border-radius:12px;font:inherit;background:#fff;color:#000;margin:4px 0}
.as-bar{position:sticky;top:0;z-index:50;background:#ffc400;color:#000;font-weight:800;padding:10px 14px;display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;border-bottom:2px solid #b88a00}
.as-bar button{background:#000;color:#fff;border:0;border-radius:99px;padding:8px 16px;font:inherit;font-weight:800;cursor:pointer}
.as-bar .x{background:transparent;color:#000;font-size:18px;padding:4px 10px}

/* پیشنهادهای صفحهٔ پرداخت + خلاصهٔ آدرس */
.addon-card{border:2px solid #ffb020;background:#fffaf0;color:#111}
.addon-card h3,.addon-card b,.addon-card small{color:#111}
.addon-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 0;border-top:1px dashed #d9b86a}
.addon-row .ai b{display:block;font-size:16px}.addon-row .ai small{color:#333}
.addon-row .stepper{display:flex;align-items:center;gap:6px}
.addon-row .stepper button{width:44px;height:44px;border-radius:12px;border:2px solid #ff7a12;background:#fff;color:#000;font-size:22px;font-weight:800;cursor:pointer}
.addon-row .stepper button[data-addon=inc]{background:#ff7a12}
.addon-row .stepper span{min-width:26px;text-align:center;font-weight:800;font-size:18px;color:#111}
.addr-sum{background:#e8f8ee;border:2px solid #1a9a4f;border-radius:14px;padding:10px 12px;color:#111;font-weight:700}

/* customer search dropdown */
.srch-pop{position:absolute;inset-inline:0;top:calc(100% + 6px);z-index:60;background:#fff;border:1px solid #e5e7eb;border-radius:14px;box-shadow:0 12px 32px rgba(0,0,0,.18);max-height:70vh;overflow:auto;text-align:right}
.srch-h{padding:8px 14px;font-size:12px;font-weight:700;color:#6b7280;background:#f9fafb;position:sticky;top:0}
.srch-i{display:flex;align-items:center;gap:10px;padding:9px 14px;color:inherit;text-decoration:none;border-bottom:1px solid #f3f4f6}
.srch-i:hover{background:#fff7ed}.srch-i.off{opacity:.55}
.srch-img{width:40px;height:40px;border-radius:10px;background:#f3f4f6;display:flex;align-items:center;justify-content:center;flex:none;overflow:hidden}
.srch-img img{width:100%;height:100%;object-fit:cover}
.srch-t{flex:1;min-width:0;font-weight:600}.srch-t small{display:block;font-weight:400;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.srch-i>small{color:#6b7280;font-size:12px;white-space:nowrap}
.srch-pop mark{background:#fde68a;border-radius:3px;padding:0 1px}
.srch-empty{padding:18px;text-align:center;color:#6b7280}
@media (prefers-color-scheme:dark){.srch-pop{background:#1f2937;border-color:#374151}.srch-h{background:#111827;color:#9ca3af}.srch-i{border-color:#374151}.srch-i:hover{background:#374151}.srch-img{background:#374151}}

/* current order status strip (under the header) */
.order-strip{display:flex;align-items:center;justify-content:center;gap:8px;background:#16a34a;color:#fff;padding:8px 12px;font-size:14px;text-decoration:none;line-height:1.3;text-align:center}
.order-strip b{font-weight:700}.order-strip small{background:rgba(255,255,255,.22);border-radius:999px;padding:1px 10px;font-size:12px}
.order-strip .dot{width:8px;height:8px;border-radius:50%;background:#fff;flex:none;animation:onpulse 1.4s infinite}
.order-strip.bad{background:#b45309}
@keyframes onpulse{50%{opacity:.25}}

/* پیک رسید: کد تحویل بزرگ برای مشتری */
.arrive-box { margin: 14px auto; padding: 20px 16px; max-width: 420px; border: 3px solid var(--accent); border-radius: 22px; background: rgba(246,170,13,.12); text-align: center; animation: arrivePulse 1.6s ease-in-out infinite; }
.arrive-box .ab-ic { font-size: 54px; line-height: 1; }
.arrive-box h3 { margin: 6px 0; font-size: 24px; }
.arrive-box p { margin: 6px 0; line-height: 2; font-size: 15px; }
.arrive-box .ab-code { font-size: 72px; font-weight: 800; letter-spacing: 14px; padding: 6px 0 6px 14px; color: var(--accent-text); text-shadow: 0 2px 14px rgba(246,170,13,.35); }
.arrive-box .ab-thx { font-size: 13px; opacity: .8; }
@keyframes arrivePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(246,170,13,.5); } 50% { box-shadow: 0 0 0 12px rgba(246,170,13,0); } }

/* big logo on the customer home page – always visible (also in the compact foods view) */
.hero .container { grid-template-columns: 1.1fr .9fr; }
.hero-art { max-width: 460px; }
.hero.compact .hero-art { display: block !important; }
@media (max-width: 800px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art, .hero.compact .hero-art { max-width: 280px; order: -1; margin: 0 auto -6px; }
  .hero.compact { padding: 18px 0 6px; }
}

/* private support message on the customer home page */
.cmsg{background:linear-gradient(135deg,#ffcf33,#ff9f1a);color:#1b1100;border-bottom:3px solid #b86e00;padding:12px 0;position:relative;z-index:30}
.cmsg b{font-size:16px}.cmsg p{margin:6px 0 4px;font-size:16px;line-height:1.7;font-weight:600}.cmsg small{opacity:.8}

/* checkout: visible quantity changes */
.cart-line .info{display:flex;flex-direction:column;gap:3px}
.line-step{display:inline-flex;align-items:center;gap:8px;margin-top:4px}
.line-step button{width:30px;height:30px;border-radius:50%;border:1px solid #c9cfdc;background:#fff;font-size:18px;line-height:1;cursor:pointer}
.line-step .line-qty,.addon-row .stepper span{min-width:26px;text-align:center;font-weight:800;font-size:17px}
.in-order{color:#0a7a3d;font-weight:700}
@keyframes coPulse{0%{background:#fff3b0;box-shadow:0 0 0 0 rgba(255,170,0,.7)}60%{background:#fff3b0;box-shadow:0 0 0 10px rgba(255,170,0,0)}100%{background:transparent}}
.pulse{animation:coPulse 2.4s ease-out;border-radius:12px}

.wallet-zero,.wallet-note{background:#fff7e0;border:1px solid #f1d27a;border-radius:12px;padding:10px 12px;margin:8px 0;font-size:14px;line-height:1.8}
.wallet-note{background:#eaf8ef;border-color:#9bd5b0}

/* v60 — header city menu (search + choose city) */
.city-menu { position: relative; }
.city-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 170px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font-size: 13px; }
.city-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.city-chip svg { width: 14px; height: 14px; flex: none; color: var(--accent-text); }
.city-pop { position: absolute; top: calc(100% + 8px); right: 0; width: 290px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 48px rgba(8,39,90,.22); padding: 10px; z-index: 80; }
.city-pop input { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; }
.city-list { max-height: 280px; overflow-y: auto; margin-top: 6px; }
.city-list:empty { display: none; }
.city-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: right; padding: 10px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; font: inherit; }
.city-item small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.city-item:hover, .city-item.sel { background: var(--ov-2); }
.city-item.cur b::after { content: ' ✓'; color: var(--accent-text); }
.city-item mark { background: rgba(255,200,60,.35); color: inherit; border-radius: 3px; }
.site-header { z-index: 70; }
@media (max-width: 640px) {
  .site-header .container { gap: 8px; }
  .city-chip { max-width: 104px; padding: 7px 9px; gap: 4px; }
  .site-header .loc-chip { max-width: 118px; padding: 7px 9px; }
  .city-pop { position: fixed; top: calc(var(--header-h) + 6px); right: 12px; left: 12px; width: auto; max-width: none; }
}

/* theme toggle */
.theme-btn { font-size: 18px; line-height: 1; }
.brand img { object-fit: cover; background: #fff; }
.btn.primary, .btn-primary { text-shadow: none; }

/* ---- کاور رستوران: تصویر واکنش‌گرا (سبک‌ترین نسخه‌ی کافی برای هر صفحه) ---- */
.rest-cover { overflow: hidden; }
.rest-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- خط نازک و نرم + سایه‌ی ملایم دور هر باکس؛ با لمس/موس کمی بالا می‌آید ---- */
:root { --box-line: #cdd6e8; --box-shadow: 0 1px 2px rgba(16, 32, 70, .06), 0 6px 16px rgba(16, 32, 70, .07); }
html[data-theme="dark"] { --box-line: rgba(255, 255, 255, .16); --box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) { --box-line: rgba(255, 255, 255, .16); --box-shadow: 0 6px 18px rgba(0, 0, 0, .35); } }
.rest-card, .food-card, .feed-card, .card, .stat { border: 1px solid var(--box-line); box-shadow: var(--box-shadow); }
.rest-card, .food-card, .feed-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.rest-card:hover, .food-card:hover, .feed-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 10px 26px rgba(16, 32, 70, .16); }
.rest-card:active, .food-card:active, .feed-card:active { transform: translateY(-1px); border-color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .rest-card, .food-card, .feed-card { transition: none; } .rest-card:hover, .food-card:hover, .feed-card:hover { transform: none; } }

/* ---- بالای صفحه‌ی رستوران: کاور واضح و باکیفیت + لوگو + مشخصات ---- */
.rest-top { position: relative; margin-bottom: 8px; }
.rt-cover { position: relative; height: clamp(190px, 33vw, 380px); overflow: hidden; background: radial-gradient(circle at 30% 30%, rgba(255, 194, 26, .30), transparent 55%), linear-gradient(135deg, var(--ph-a), var(--ph-b)); }
.rt-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.rt-cover .rt-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 72px; opacity: .45; }
/* سایه‌ی نرم فقط پایین و بالای تصویر؛ خود عکس دست‌نخورده و روشن می‌ماند */
.rt-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .32) 0, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, .28) 100%); }
.rt-open { position: absolute; top: 14px; right: 14px; background: rgba(8, 14, 30, .72); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 7px 14px; font-size: 13px; border: 1px solid rgba(255, 255, 255, .18); }
.rt-open:not(.closed)::before { background: #2fd18b; }
.rt-open.closed { color: #ffb3b9; }
.rt-fav { position: absolute; top: 14px; left: 14px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 21px; padding: 0; background: rgba(8, 14, 30, .62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .18); }
.rt-info { position: relative; display: flex; gap: 16px; align-items: flex-start; padding-bottom: 14px; }
.rt-logo { flex: none; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--surface); border: 4px solid var(--bg); margin-top: -50px; position: relative; z-index: 2; box-shadow: 0 8px 24px rgba(0, 0, 0, .28), 0 0 0 1px var(--box-line, #cdd6e8); }
.rt-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rt-main { min-width: 0; flex: 1; padding-top: 12px; }
.rt-main h1 { margin: 0; font-size: clamp(22px, 4.2vw, 34px); line-height: 1.35; font-weight: 800; }
.rt-tag { margin: 2px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.rt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rt-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--muted); white-space: nowrap; }
.rt-chip b { color: var(--text); font-weight: 700; }
.rt-chip small { color: var(--muted); }
.rt-chip.star { background: rgba(255, 194, 26, .14); border-color: rgba(255, 194, 26, .35); }
.rt-chip.warn { background: rgba(255, 122, 18, .12); border-color: rgba(255, 122, 18, .35); }
@media (max-width: 640px) {
  .rt-info { gap: 12px; }
  .rt-logo { width: 80px; height: 80px; border-width: 3px; margin-top: -42px; }
  .rt-main { padding-top: 10px; }
  .rt-chip { font-size: 12px; padding: 5px 10px; }
}

/* ---- سه کادر ثابت زیر نام رستوران: امتیاز / ساعت امروز / حداقل سفارش (همیشه همین جا و همین اندازه) ---- */
.rt-facts { display: grid; grid-template-columns: 1fr 1.25fr 1.25fr; gap: 10px; margin: 4px 0 10px; }
.rt-fact { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 62px; padding: 8px 6px; text-align: center; border-radius: 14px; background: var(--surface); border: 1px solid var(--box-line); box-shadow: var(--box-shadow); }
.rt-fact .k { font-size: 12px; color: var(--muted); white-space: nowrap; }
.rt-fact b { font-size: 14px; color: var(--text); line-height: 1.4; }
.rt-fact small { font-size: 11px; color: var(--muted); font-weight: 400; }
.rt-fact.star { background: rgba(255, 194, 26, .14); border-color: rgba(255, 194, 26, .4); }
.rt-busy { margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; font-size: 13px; background: rgba(255, 122, 18, .12); border: 1px solid rgba(255, 122, 18, .35); }
@media (max-width: 640px) { .rt-fact { min-height: 58px; } .rt-fact b { font-size: 13px; } .rt-fact .k { font-size: 11px; } }

/* ---- تخفیف غذا ---- */
.off-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--danger); color: #fff; white-space: nowrap; vertical-align: middle; }
.old-price { color: var(--muted); font-size: .8em; font-weight: 400; margin-inline-end: 4px; }
.tag.off { font-size: 13px; padding: 4px 11px; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.food-card .price del { display: block; font-size: 12px; line-height: 1.4; color: var(--muted); font-weight: 400; }

/* وقتی «پیشنهاد ویژه» و «تخفیف» با هم هستند، زیر هم می‌نشینند و روی هم نمی‌افتند */
.tag.special ~ .tag.off { left: auto; right: 10px; top: 42px; }
@media (max-width: 640px) { .tag.special ~ .tag.off { right: 6px; top: 30px; } }
/* شمارش معکوس تخفیف */
.sale-cd { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; background: rgba(229, 57, 53, .12); border: 1px solid rgba(229, 57, 53, .4); color: var(--danger); white-space: nowrap; }
.sale-cd b { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.sale-cd.big { font-size: 15px; padding: 6px 14px; margin-bottom: 12px; }
.sale-cd.urgent { animation: salepulse 1s ease-in-out infinite; }
@keyframes salepulse { 50% { background: rgba(229, 57, 53, .28); } }
.food-body .sale-cd { align-self: flex-start; }

/* «پیشنهاد ویژه» داخل باکس سفید، روبروی عکس و درست بالای دکمه‌ی + */
.food-body .spec-pill { align-self: flex-end; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); white-space: nowrap; }
.tag.special ~ .tag.off { top: 10px; }
@media (max-width: 640px) { .tag.special ~ .tag.off { top: 6px; } .food-body .spec-pill { font-size: 11px; padding: 2px 9px; } }

/* ساعت‌شمار معکوس: سه کادر ساعت : دقیقه : ثانیه */
.sale-cd { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 6px 10px; border-radius: 12px; }
.sale-cd .cd-t { font-size: 12px; font-weight: 700; }
.sale-cd .cd-clock { display: inline-flex; align-items: flex-start; gap: 3px; }
.sale-cd .cd-box { display: inline-flex; flex-direction: column; align-items: center; min-width: 38px; padding: 3px 4px 2px; border-radius: 8px; background: var(--danger); color: #fff; line-height: 1.1; }
.sale-cd .cd-box b { font-size: 17px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.sale-cd .cd-box i { font-style: normal; font-size: 9px; opacity: .9; }
.sale-cd em { font-style: normal; font-weight: 800; font-size: 17px; line-height: 1.5; color: var(--danger); }
.sale-cd.big { flex-direction: row; align-items: center; gap: 12px; padding: 8px 14px; }
.sale-cd.big .cd-box { min-width: 52px; } .sale-cd.big .cd-box b { font-size: 24px; } .sale-cd.big em { font-size: 24px; } .sale-cd.big .cd-t { font-size: 14px; }
.sale-cd.ended { flex-direction: row; font-size: 13px; }

/* ============ کارت غذا: چیدمان مرتب (اندازه‌ی عکس همان قبلی) ============ */
.food-body { padding: 12px 14px 13px; gap: 8px; }
.fb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.food-body h3 { font-size: 16px; font-weight: 800; line-height: 1.5; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.food-body p { flex: 0 1 auto; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.food-body .spec-pill { flex: none; align-self: flex-start; margin-top: 3px; padding: 2px 9px; font-size: 11px; }
.food-body .opt-hint, .food-body .low-stock { margin: 0; line-height: 1.5; }
.food-foot { margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--box-line); display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.pricebox { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.pricebox .price { display: flex; flex-direction: column; align-items: flex-start; font-size: 17px; line-height: 1.3; }
.pricebox .price del { display: block; font-size: 12px; line-height: 1.3; }
.pricebox .off-pill { font-size: 11px; padding: 1px 8px; }
.add-btn { width: 44px; height: 44px; border-radius: 14px; }
.stepper button { width: 40px; height: 40px; }
.qty-ctl { flex: none; }
.sold-out { flex: none; padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg-2); color: var(--muted); border: 1px solid var(--box-line); }
.food-card.unavailable { opacity: .6; filter: grayscale(.55); }
/* ساعت‌شمار فشرده داخل کارت */
.sale-cd.compact { flex-direction: row; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 10px; align-self: stretch; }
.sale-cd.compact .cd-t { font-size: 11px; white-space: nowrap; }
.sale-cd.compact .cd-clock { margin-inline-start: auto; gap: 2px; }
.sale-cd.compact .cd-box { min-width: 30px; padding: 2px 3px 1px; border-radius: 6px; }
.sale-cd.compact .cd-box b { font-size: 14px; }
.sale-cd.compact .cd-box i { font-size: 8px; }
.sale-cd.compact em { font-size: 14px; line-height: 1.6; }
@media (max-width: 640px) {
  .food-body { padding: 10px 12px 11px; gap: 6px; }
  .food-body h3 { font-size: 15px; }
  .sale-cd.compact .cd-t { display: none; }
  .sale-cd.compact .cd-clock { margin-inline-start: 0; }
}

.pricebox .pb-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pricebox .pb-top del { color: var(--muted); font-size: 12px; font-weight: 400; }
.pricebox .price { display: block; font-size: 17px; line-height: 1.3; }

/* ساعت‌شمار فشرده: فقط به اندازه‌ی خود اعداد، نه عرض کامل کارت */
.sale-cd.compact { align-self: flex-start; width: fit-content; max-width: 100%; gap: 6px; padding: 3px 8px 3px 6px; }
.sale-cd.compact .cd-tx { display: none; }
.sale-cd.compact .cd-ic { font-size: 14px; }
.sale-cd.compact .cd-t { display: inline-flex; }
.sale-cd.compact .cd-clock { margin-inline-start: 0; }
@media (max-width: 640px) { .sale-cd.compact .cd-t { display: inline-flex; } }

/* ============ دسکتاپ: غذاها پرظرفیت‌تر (موبایل دست‌نخورده) ============ */
@media (min-width: 700px) and (max-width: 980px) { .food-grid, .feed-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 981px) {
  .food-grid, .feed-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .food-img, .feed-card .food-img { aspect-ratio: 16 / 10; }
}
@media (min-width: 1500px) {
  .container { width: min(1440px, 100% - 48px); }
  .food-grid, .feed-grid { grid-template-columns: repeat(5, 1fr); }
}

/* نظرها: اول ۵ تا، بقیه با دکمه‌ی «نمایش بیشتر» */
.review[hidden] { display: none; }
.rv-btnrow { text-align: center; margin-top: 14px; }

/* صفحه‌های متنی قابل ویرایش (درباره ما، قوانین، حریم خصوصی، پرسش‌های متداول) */
.page-text > :first-child{margin-top:0}.page-text > :last-child{margin-bottom:0}
.page-text p{margin:0 0 12px}
.page-text h2{font-size:18px;margin:18px 0 6px}
.page-text ul{margin:0 0 12px;padding-inline-start:22px}
.page-text li{margin:2px 0}
.page-text a{color:var(--primary,#e4572e);text-decoration:underline}

/* نوار دسته‌ی رستوران‌ها */
.cat-strip { margin: 4px 0 12px; padding: 4px 2px 6px; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.cat-strip .chip { scroll-snap-align: start; padding: 10px 18px; font-size: 15px; white-space: nowrap; }
.cat-strip .chip .ci { font-size: 18px; line-height: 1; }
