/* Catering Mini App — modern chic design system
   Fonts: Vazirmatn (Persian) + Inter (English / Latin / numbers)
   Themes: cream / forest / royal / turquoise / turquoisegreen / sunrise — each in Light + Dark.
   Choice is stored per customer (localStorage catering-theme / catering-mode)
   and applied via html[data-theme][data-mode]. */
:root{
  --radius:20px; --radius-sm:14px;
  --font-fa:"Vazirmatn","Inter",Tahoma,system-ui,sans-serif;
  --font-en:"Inter","Vazirmatn",system-ui,-apple-system,sans-serif;
  /* Aliases used by calendar / line-total / progress / segmented controls.
     They resolve against the active theme's --brand/--gold-soft/--line/--ink,
     so the free-delivery progress fill and active states are actually visible. */
  --accent:var(--brand); --accent-soft:var(--gold-soft);
  --border:var(--line); --text:var(--ink);
}
/* ---- Cream / Saffron — Light (default) ---- */
html[data-theme="cream"][data-mode="light"], :root{
  --bg:#FBF7F0; --surface:#FFFFFF; --surface-2:#F6EFE3;
  --ink:#1C1917; --ink-2:#44403C; --muted:#8A8378; --line:#EDE6D6;
  --brand:#B45309; --brand-deep:#7C2D12; --gold:#D97706; --gold-soft:#FEF3C7;
  --green:#166534; --green-bg:#DCFCE7; --red:#991B1B; --red-bg:#FEE2E2;
  --blue-bg:#DBEAFE; --amber-bg:#FEF3C7;
  --hero-1:#1C1917; --hero-2:#7C2D12; --hero-ink:#FAFAF9; --hero-muted:#D6D3D1; --hero-accent:#FDBA74;
  --loyalty-1:#1C1917; --loyalty-2:#7C2D12;
  --cart-bg:#1C1917; --cart-ink:#FFFFFF;
  --shadow:0 10px 30px rgba(28,25,23,.08); --shadow-sm:0 2px 10px rgba(28,25,23,.06);
  color-scheme:light;
}
/* ---- Cream / Saffron — Dark ---- */
html[data-theme="cream"][data-mode="dark"]{
  --bg:#171412; --surface:#241F1C; --surface-2:#2E2824;
  --ink:#FAF7F2; --ink-2:#D6D3D1; --muted:#A8A29E; --line:#3D3630;
  --brand:#F59E0B; --brand-deep:#FDBA74; --gold:#F59E0B; --gold-soft:#451A03;
  --green:#4ADE80; --green-bg:#14532D; --red:#FCA5A5; --red-bg:#450A0A;
  --blue-bg:#1E3A5F; --amber-bg:#451A03;
  --hero-1:#0F0D0B; --hero-2:#7C2D12; --hero-ink:#FAFAF9; --hero-muted:#D6D3D1; --hero-accent:#FDBA74;
  --loyalty-1:#0F0D0B; --loyalty-2:#92400E;
  --cart-bg:#F59E0B; --cart-ink:#1C1917;
  --shadow:0 10px 30px rgba(0,0,0,.35); --shadow-sm:0 2px 10px rgba(0,0,0,.3);
  color-scheme:dark;
}
/* ---- Forest Green — Light ---- */
html[data-theme="forest"][data-mode="light"]{
  --bg:#F6F1E7; --surface:#FFFDF8; --surface-2:#F1E9DA;
  --ink:#22301F; --ink-2:#4A5546; --muted:#7A8577; --line:#E3D9C6;
  --brand:#1D6B45; --brand-deep:#14532F; --gold:#D98A06; --gold-soft:#FBEED3;
  --green:#166534; --green-bg:#DCFCE7; --red:#991B1B; --red-bg:#FEE2E2;
  --blue-bg:#DBEAFE; --amber-bg:#FEF3C7;
  --hero-1:#14261C; --hero-2:#1D6B45; --hero-ink:#F2F1EB; --hero-muted:#CBD5CB; --hero-accent:#F5C66B;
  --loyalty-1:#14261C; --loyalty-2:#1D6B45;
  --cart-bg:#14532F; --cart-ink:#FFFFFF;
  --shadow:0 10px 30px rgba(34,48,31,.09); --shadow-sm:0 2px 10px rgba(34,48,31,.06);
  color-scheme:light;
}
/* ---- Forest Green — Dark ---- */
html[data-theme="forest"][data-mode="dark"]{
  --bg:#0F1A14; --surface:#16241C; --surface-2:#1E2F25;
  --ink:#E8EDE6; --ink-2:#B9C4B5; --muted:#8A978A; --line:#2A3A2E;
  --brand:#4ADE80; --brand-deep:#86EFAC; --gold:#E5B04A; --gold-soft:#332A12;
  --green:#4ADE80; --green-bg:#14532D; --red:#FCA5A5; --red-bg:#450A0A;
  --blue-bg:#1E3A5F; --amber-bg:#332A12;
  --hero-1:#0A120D; --hero-2:#14532F; --hero-ink:#F2F1EB; --hero-muted:#CBD5CB; --hero-accent:#F5C66B;
  --loyalty-1:#0A120D; --loyalty-2:#1D6B45;
  --cart-bg:#4ADE80; --cart-ink:#0F1A14;
  --shadow:0 10px 30px rgba(0,0,0,.4); --shadow-sm:0 2px 10px rgba(0,0,0,.3);
  color-scheme:dark;
}
/* ---- Royal Purple — Light ---- */
html[data-theme="royal"][data-mode="light"]{
  --bg:#F5F3FF; --surface:#FFFFFF; --surface-2:#EDE9FE;
  --ink:#1E1B2E; --ink-2:#4B465E; --muted:#7C7390; --line:#E2DCF5;
  --brand:#7C3AED; --brand-deep:#4C1D95; --gold:#D97706; --gold-soft:#FEF3C7;
  --green:#15803D; --green-bg:#DCFCE7; --red:#991B1B; --red-bg:#FEE2E2;
  --blue-bg:#DBEAFE; --amber-bg:#FEF3C7;
  --hero-1:#1E1B2E; --hero-2:#6D28D9; --hero-ink:#F5F3FF; --hero-muted:#D8D3F0; --hero-accent:#FBBF24;
  --loyalty-1:#1E1B2E; --loyalty-2:#7C3AED;
  --cart-bg:#4C1D95; --cart-ink:#FFFFFF;
  --shadow:0 10px 30px rgba(76,29,149,.10); --shadow-sm:0 2px 10px rgba(76,29,149,.06);
  color-scheme:light;
}
/* ---- Royal Purple — Dark ---- */
html[data-theme="royal"][data-mode="dark"]{
  --bg:#171225; --surface:#211A38; --surface-2:#2C2450;
  --ink:#F3F0FF; --ink-2:#C4BDE0; --muted:#9A92B8; --line:#3A3160;
  --brand:#A78BFA; --brand-deep:#C4B5FD; --gold:#F59E0B; --gold-soft:#3B2F0B;
  --green:#4ADE80; --green-bg:#14532D; --red:#FCA5A5; --red-bg:#450A0A;
  --blue-bg:#1E3A5F; --amber-bg:#3B2F0B;
  --hero-1:#100B1E; --hero-2:#4C1D95; --hero-ink:#F5F3FF; --hero-muted:#D8D3F0; --hero-accent:#FBBF24;
  --loyalty-1:#100B1E; --loyalty-2:#6D28D9;
  --cart-bg:#A78BFA; --cart-ink:#1E1B2E;
  --shadow:0 10px 30px rgba(0,0,0,.45); --shadow-sm:0 2px 10px rgba(0,0,0,.3);
  color-scheme:dark;
}
/* ---- Persian Turquoise — Light ---- */
html[data-theme="turquoise"][data-mode="light"]{
  --bg:#EFFAF8; --surface:#FFFFFF; --surface-2:#DFF3F0;
  --ink:#0C2B27; --ink-2:#33524D; --muted:#5F7F7A; --line:#CDE8E3;
  --brand:#0D9488; --brand-deep:#0F766E; --gold:#D97706; --gold-soft:#FEF3C7;
  --green:#15803D; --green-bg:#DCFCE7; --red:#991B1B; --red-bg:#FEE2E2;
  --blue-bg:#DBEAFE; --amber-bg:#FEF3C7;
  --hero-1:#0A2A26; --hero-2:#0D9488; --hero-ink:#F0FDFA; --hero-muted:#BFE3DD; --hero-accent:#5EEAD4;
  --loyalty-1:#0A2A26; --loyalty-2:#0D9488;
  --cart-bg:#0F766E; --cart-ink:#FFFFFF;
  --shadow:0 10px 30px rgba(13,148,136,.12); --shadow-sm:0 2px 10px rgba(13,148,136,.07);
  color-scheme:light;
}
/* ---- Persian Turquoise — Dark ---- */
html[data-theme="turquoise"][data-mode="dark"]{
  --bg:#081F1C; --surface:#102B27; --surface-2:#173832;
  --ink:#E4F5F1; --ink-2:#B4D3CC; --muted:#7FA39C; --line:#23463E;
  --brand:#2DD4BF; --brand-deep:#5EEAD4; --gold:#F59E0B; --gold-soft:#3B2F0B;
  --green:#4ADE80; --green-bg:#14532D; --red:#FCA5A5; --red-bg:#450A0A;
  --blue-bg:#1E3A5F; --amber-bg:#3B2F0B;
  --hero-1:#051512; --hero-2:#0F766E; --hero-ink:#F0FDFA; --hero-muted:#BFE3DD; --hero-accent:#5EEAD4;
  --loyalty-1:#051512; --loyalty-2:#0D9488;
  --cart-bg:#2DD4BF; --cart-ink:#081F1C;
  --shadow:0 10px 30px rgba(0,0,0,.4); --shadow-sm:0 2px 10px rgba(0,0,0,.3);
  color-scheme:dark;
}
/* ---- Turquoise Green — Light ---- */
html[data-theme="turquoisegreen"][data-mode="light"]{
  --bg:#F1FAF3; --surface:#FFFFFF; --surface-2:#E1F3E7;
  --ink:#122E1C; --ink-2:#3A5240; --muted:#64806D; --line:#CFE8D6;
  --brand:#059669; --brand-deep:#047857; --gold:#D97706; --gold-soft:#FEF3C7;
  --green:#15803D; --green-bg:#DCFCE7; --red:#991B1B; --red-bg:#FEE2E2;
  --blue-bg:#DBEAFE; --amber-bg:#FEF3C7;
  --hero-1:#0C2416; --hero-2:#059669; --hero-ink:#ECFDF5; --hero-muted:#BDE5CD; --hero-accent:#6EE7B7;
  --loyalty-1:#0C2416; --loyalty-2:#059669;
  --cart-bg:#047857; --cart-ink:#FFFFFF;
  --shadow:0 10px 30px rgba(5,150,105,.11); --shadow-sm:0 2px 10px rgba(5,150,105,.06);
  color-scheme:light;
}
/* ---- Turquoise Green — Dark ---- */
html[data-theme="turquoisegreen"][data-mode="dark"]{
  --bg:#0A1F13; --surface:#122A1B; --surface-2:#1A3825;
  --ink:#E6F4EB; --ink-2:#B3D2BE; --muted:#7FA38D; --line:#234534;
  --brand:#34D399; --brand-deep:#6EE7B7; --gold:#F59E0B; --gold-soft:#3B2F0B;
  --green:#4ADE80; --green-bg:#14532D; --red:#FCA5A5; --red-bg:#450A0A;
  --blue-bg:#1E3A5F; --amber-bg:#3B2F0B;
  --hero-1:#06130C; --hero-2:#047857; --hero-ink:#ECFDF5; --hero-muted:#BDE5CD; --hero-accent:#6EE7B7;
  --loyalty-1:#06130C; --loyalty-2:#059669;
  --cart-bg:#34D399; --cart-ink:#0A1F13;
  --shadow:0 10px 30px rgba(0,0,0,.4); --shadow-sm:0 2px 10px rgba(0,0,0,.3);
  color-scheme:dark;
}
/* ---- Turquoise Sunrise — Light ----
   Persian turquoise primary + warm orange accent on a warm off-white. */
html[data-theme="sunrise"][data-mode="light"]{
  --bg:#FFFBF5; --surface:#FFFFFF; --surface-2:#FDEEDD;
  --ink:#241D16; --ink-2:#57534A; --muted:#8A7F6E; --line:#F0E2CE;
  --brand:#0D9488; --brand-deep:#0F766E; --gold:#F97316; --gold-soft:#FFEDD5;
  --green:#15803D; --green-bg:#DCFCE7; --red:#991B1B; --red-bg:#FEE2E2;
  --blue-bg:#DBEAFE; --amber-bg:#FFEDD5;
  --hero-1:#0B2E2B; --hero-2:#C2410C; --hero-ink:#FFF7ED; --hero-muted:#FED7AA; --hero-accent:#FDBA74;
  --loyalty-1:#0B2E2B; --loyalty-2:#EA580C;
  --cart-bg:#0F766E; --cart-ink:#FFFFFF;
  --shadow:0 10px 30px rgba(194,65,12,.12); --shadow-sm:0 2px 10px rgba(194,65,12,.07);
  color-scheme:light;
}
/* ---- Turquoise Sunrise — Dark ----
   Deep teal-charcoal with a warm orange glow. */
html[data-theme="sunrise"][data-mode="dark"]{
  --bg:#101614; --surface:#1A2420; --surface-2:#223129;
  --ink:#F5EFE6; --ink-2:#CFC4B4; --muted:#97897A; --line:#2E3A32;
  --brand:#2DD4BF; --brand-deep:#5EEAD4; --gold:#FB923C; --gold-soft:#431407;
  --green:#4ADE80; --green-bg:#14532D; --red:#FCA5A5; --red-bg:#450A0A;
  --blue-bg:#1E3A5F; --amber-bg:#431407;
  --hero-1:#08110E; --hero-2:#7C2D12; --hero-ink:#FFF7ED; --hero-muted:#FED7AA; --hero-accent:#FDBA74;
  --loyalty-1:#08110E; --loyalty-2:#9A3412;
  --cart-bg:#2DD4BF; --cart-ink:#101614;
  --shadow:0 10px 30px rgba(0,0,0,.4); --shadow-sm:0 2px 10px rgba(0,0,0,.3);
  color-scheme:dark;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--font-fa);line-height:1.65;-webkit-font-smoothing:antialiased;transition:background-color .3s ease,color .3s ease}
html[lang="en"] body{font-family:var(--font-en);line-height:1.55;letter-spacing:-.01em}
html[lang="en"]{direction:ltr}
[dir="ltr"]{text-align:left}
img{max-width:100%}
button{font-family:inherit}
input,select,textarea{font-family:inherit}
.card,.panel,.tabs button,.chip,.search-wrap,.toolbar select{transition:background-color .3s ease,color .3s ease,border-color .3s ease,box-shadow .3s ease}

/* ---------- Hero ---------- */
.hero{background:linear-gradient(150deg,var(--hero-1) 0%,var(--hero-2) 130%);color:var(--hero-ink);padding:18px 18px 22px;border-radius:0 0 28px 28px}
.topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;max-width:920px;margin:0 auto}
.brand{display:flex;gap:12px;align-items:center;min-width:0}
.logo{width:56px;height:56px;border-radius:18px;object-fit:cover;background:#fff;box-shadow:0 4px 14px rgba(0,0,0,.25);flex:none}
.brand-text h1{margin:0;font-size:22px;font-weight:800;letter-spacing:-.01em;line-height:1.25}
html[lang="fa"] .brand-text h1{font-size:23px}
.brand-sub{margin:2px 0 0;color:var(--hero-muted);font-size:12.5px;letter-spacing:.04em}
.top-actions{display:flex;gap:8px;align-items:center;flex:none}
.lang-toggle{display:flex;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);border-radius:999px;padding:3px}
.lang-btn{border:0;background:transparent;color:#E7E5E4;padding:7px 13px;border-radius:999px;cursor:pointer;font-size:13px;font-weight:700}
.lang-btn.active{background:var(--gold);color:#1C1917}
.hero-copy{max-width:920px;margin:18px auto 0}
.eyebrow{margin:0;color:var(--hero-accent);font-size:12px;font-weight:700;letter-spacing:.14em;text-transform:uppercase}
.welcome{margin:8px 0 0;font-size:26px;font-weight:800;line-height:1.35;max-width:640px}
html[lang="en"] .welcome{font-size:24px}
.delivery-info{margin:8px 0 0;color:var(--hero-muted);font-size:13.5px;max-width:640px}
.hero-stats{display:flex;gap:10px;max-width:920px;margin:18px auto 0;flex-wrap:wrap}
.stat{flex:1;min-width:120px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);border-radius:16px;padding:10px 12px}
.stat strong{display:block;font-size:15px;color:var(--hero-accent)}
.stat span{font-size:12px;color:var(--hero-muted)}

/* ---------- Theme picker ---------- */
.theme-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:12px}
.theme-card{border:2px solid var(--line);background:var(--surface-2);border-radius:16px;padding:12px;cursor:pointer;text-align:start;font-size:13px}
.theme-card.active{border-color:var(--brand);box-shadow:0 0 0 3px var(--gold-soft)}
.theme-card b{display:block;font-size:14px;margin:6px 0 2px}
.theme-card p{margin:0;color:var(--muted);font-size:12px;line-height:1.5}
.swatches{display:flex;gap:5px}
.swatches i{width:22px;height:22px;border-radius:50%;border:2px solid rgba(255,255,255,.85);box-shadow:0 1px 4px rgba(0,0,0,.2);display:block}
.mode-seg{display:inline-flex;background:var(--surface-2);border:1px solid var(--line);border-radius:999px;padding:4px;gap:4px;margin-top:12px}
.mode-seg button{border:0;background:transparent;border-radius:999px;padding:8px 18px;font-weight:700;font-size:13.5px;cursor:pointer;color:var(--ink-2)}
.mode-seg button.active{background:var(--ink);color:var(--bg)}
.theme-note{margin-top:12px;font-size:13px;color:var(--muted)}
.theme-note b{color:var(--brand)}

/* ---------- Tabs ---------- */
.tabs{display:flex;gap:6px;padding:12px 14px 4px;position:sticky;top:0;background:color-mix(in srgb,var(--bg) 92%,transparent);backdrop-filter:blur(10px);z-index:20;overflow-x:auto;max-width:920px;margin:0 auto}
.tabs button{flex:1;white-space:nowrap;border:1px solid var(--line);background:var(--surface);padding:10px 10px;border-radius:999px;cursor:pointer;font-size:13.5px;font-weight:600;color:var(--ink-2);display:flex;align-items:center;justify-content:center;gap:6px}
.tabs button.active{background:var(--ink);color:var(--bg);border-color:var(--ink);box-shadow:var(--shadow-sm)}
.tab-ic{font-size:14px}
.count-badge{background:var(--gold);color:#fff;border-radius:999px;font-size:11px;font-weight:800;padding:1px 7px;line-height:1.6}
.tabs button.active .count-badge{background:var(--surface);color:var(--ink)}

main{max-width:920px;margin:0 auto;padding:6px 16px 140px}
.section-head{margin:18px 2px 12px}
.section-head h2{margin:0;font-size:20px;font-weight:800}
.section-head p{margin:2px 0 0;color:var(--muted);font-size:13.5px}

/* ---------- Search / filters ---------- */
.toolbar{display:flex;gap:8px;margin:16px 0 12px;flex-wrap:wrap}
.search-wrap{flex:1;min-width:200px;display:flex;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:0 6px 0 14px;box-shadow:var(--shadow-sm)}
html[lang="en"] .search-wrap{padding:0 14px 0 6px}
.search-ic{color:var(--muted);display:inline-flex}
.search-wrap input{flex:1;min-width:0;border:0;outline:0;padding:12px 8px;font-size:14px;background:transparent;color:var(--ink)}
.clear-btn{border:0;background:var(--surface-2);border-radius:50%;width:26px;height:26px;cursor:pointer;font-size:16px;line-height:1;color:var(--muted)}
.toolbar select{border:1px solid var(--line);border-radius:999px;padding:11px 14px;background:var(--surface);color:var(--ink);font-size:13.5px;box-shadow:var(--shadow-sm)}
.chips{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:6px}
.chip{border:1px solid var(--line);background:var(--surface);padding:8px 14px;border-radius:999px;cursor:pointer;font-size:13px;font-weight:600;color:var(--ink-2)}
.chip small{display:block;font-size:11px;color:var(--muted);font-weight:500}
.chip.active{background:var(--brand);border-color:var(--brand);color:#fff}
.chip.active small{color:var(--gold-soft)}

/* ---------- Menu cards ---------- */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow-sm);display:flex;flex-direction:column;transition:transform .15s ease,box-shadow .15s ease,background-color .3s ease}
.card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.card img{width:100%;height:180px;object-fit:cover;display:block;background:var(--surface-2)}
.card .body{padding:16px;display:flex;flex-direction:column;gap:6px;flex:1}
.card h3{margin:0;font-size:17px;font-weight:700;line-height:1.4}
.card .en-name{margin:0;color:var(--muted);font-size:12.5px;font-family:var(--font-en)}
.card p.desc{margin:0;color:var(--muted);font-size:13.5px;line-height:1.6}
.meta-row{display:flex;justify-content:space-between;align-items:center;margin-top:4px;flex-wrap:wrap;gap:4px 8px}
.price{font-weight:800;font-size:17px;color:var(--brand-deep);font-family:var(--font-en);white-space:nowrap}
.price small{font-size:12px;font-weight:600;color:var(--muted)}
.stock{font-size:12px;color:var(--muted);background:var(--surface-2);border-radius:999px;padding:3px 9px;white-space:nowrap;flex-shrink:0}
.stock.low{color:var(--red);background:var(--red-bg);font-weight:700}
.cat{font-size:11.5px;font-weight:700;letter-spacing:.02em;color:var(--brand);background:var(--gold-soft);border-radius:999px;padding:3px 9px;white-space:nowrap}
.row{display:flex;gap:8px;align-items:center;margin-top:auto;padding-top:10px}
.qty{display:flex;gap:10px;align-items:center;border:1px solid var(--line);border-radius:999px;padding:3px 6px}
.qty button{width:30px;height:30px;border-radius:50%;border:0;background:var(--surface-2);cursor:pointer;font-size:17px;line-height:1;color:var(--ink)}
.qty button:hover{background:var(--gold-soft)}
.qty span{min-width:20px;text-align:center;font-weight:800}
.empty{text-align:center;color:var(--muted);padding:36px 12px;background:var(--surface);border:1px dashed var(--line);border-radius:var(--radius)}

/* ---------- Buttons / panels ---------- */
.btn{border:0;background:var(--brand);color:#fff;padding:11px 18px;border-radius:14px;cursor:pointer;font-weight:700;font-size:14px}
.btn.primary{background:linear-gradient(135deg,var(--brand),var(--brand-deep))}
.btn.green{background:#15803D}
.btn.red{background:#B91C1C}
.btn.ghost{background:var(--surface);color:var(--ink);border:1px solid var(--line)}
.btn.big{width:100%;padding:14px;font-size:15.5px;border-radius:16px;margin-top:12px}
.btn:disabled{opacity:.55;cursor:not-allowed}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:20px;margin:16px 0;box-shadow:var(--shadow-sm)}
.panel h2{margin:0 0 6px;font-size:19px;font-weight:800}
.panel h3{margin:16px 0 6px;font-size:15px}
.muted{color:var(--muted);font-size:13.5px;margin:0 0 10px}
label{display:block;font-size:13px;font-weight:600;margin:12px 0 5px;color:var(--ink-2)}
input,select,textarea{width:100%;padding:12px 13px;border:1px solid var(--line);border-radius:12px;font-size:14px;background:var(--surface);color:var(--ink)}
input:focus,select:focus,textarea:focus{outline:2px solid var(--gold);border-color:var(--gold)}
.badge{display:inline-block;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:700;background:var(--surface-2);color:var(--ink)}
.badge.pending_payment{background:var(--amber-bg)}
.badge.pending_review{background:var(--blue-bg)}
.badge.approved{background:var(--green-bg);color:var(--green)}
.badge.rejected{background:var(--red-bg);color:var(--red)}
.progress{height:10px;background:var(--line);border-radius:999px;overflow:hidden}
.progress i{display:block;height:100%;background:linear-gradient(90deg,var(--gold),var(--brand));border-radius:999px}
.hidden{display:none!important}
.notice{background:var(--gold-soft);border:1px solid var(--line);padding:14px;border-radius:14px;font-size:13.5px;line-height:1.8}
.msg{font-size:13px;color:var(--green);margin:8px 0 0}
.total-row{display:flex;justify-content:space-between;align-items:center;border-top:1px dashed var(--line);margin-top:16px;padding-top:14px;font-size:16px}
.total-row strong{font-family:var(--font-en);font-size:19px}
.fineprint{font-size:12.5px;color:var(--muted);margin:10px 0 0;line-height:1.6}
.receipt-preview img{max-width:220px;border-radius:14px;margin-top:10px;border:1px solid var(--line)}
.order-card{background:var(--surface-2);border:1px solid var(--line);border-radius:16px;padding:14px;margin:10px 0}
.order-card .row{justify-content:space-between}

/* ---------- Loyalty card ---------- */
.loyalty-card{background:linear-gradient(140deg,var(--loyalty-1),var(--loyalty-2) 120%);color:#fff;border-radius:24px;padding:22px;margin:16px 0;box-shadow:0 16px 40px rgba(0,0,0,.25)}
.loyalty-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.loyalty-eyebrow{margin:0;color:var(--hero-accent);font-size:11.5px;font-weight:700;letter-spacing:.14em;text-transform:uppercase}
.loyalty-card h3{margin:4px 0 0;font-size:20px}
.loyalty-chip{background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.2);border-radius:999px;padding:5px 11px;font-size:12px;font-weight:700}
.loyalty-card .progress{background:rgba(255,255,255,.18);margin:14px 0 8px}
.loyalty-card .progress i{background:linear-gradient(90deg,#FCD34D,#F59E0B)}
.loyalty-card p{color:#E7E5E4;font-size:13.5px}
.loyalty-rules{margin-top:14px;border-top:1px solid rgba(255,255,255,.16);padding-top:12px;display:grid;gap:8px}
.loyalty-rules div{background:rgba(255,255,255,.08);border-radius:12px;padding:10px 12px;font-size:13px}
.profile-panel .stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:12px}
.profile-panel .stat-grid div{background:var(--surface-2);border-radius:14px;padding:12px;text-align:center}
.profile-panel .stat-grid strong{display:block;font-size:19px;font-family:var(--font-en)}
.profile-panel .stat-grid span{font-size:12px;color:var(--muted)}

/* ---------- Admin ---------- */
.admin-list{display:grid;gap:8px;margin-top:14px}
.admin-item{display:flex;justify-content:space-between;align-items:center;gap:10px;background:var(--surface-2);border-radius:12px;padding:10px 12px;font-size:13.5px}
.admin-item .mini{font-size:12px;color:var(--muted)}
#tab-admin{padding-bottom:170px} /* clearance above the fixed bottom nav; the cart bar is also hidden on admin views (see updateCartBar) */
.rule-row{display:flex;justify-content:space-between;align-items:center;gap:10px;background:var(--surface-2);border-radius:12px;padding:10px 12px;margin:8px 0;font-size:13.5px}

/* ---------- Cart bar / footer ---------- */
.cart-bar{position:fixed;bottom:58px;left:50%;transform:translateX(-50%);width:min(920px,calc(100% - 24px));background:var(--cart-bg);color:var(--cart-ink);border-radius:18px;padding:12px 14px;display:flex;justify-content:space-between;align-items:center;gap:12px;box-shadow:0 14px 34px rgba(0,0,0,.28);z-index:30}
.cart-bar strong{font-family:var(--font-en);font-size:17px;margin-inline-end:8px}
.cart-bar .muted{color:var(--cart-ink);opacity:.75}
footer{position:fixed;bottom:0;left:0;right:0;background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(8px);border-top:1px solid var(--line);padding:10px 16px;display:flex;justify-content:space-between;gap:10px;font-size:12px;color:var(--muted);z-index:25}

@media (max-width:560px){
  .welcome{font-size:22px}
  .grid{grid-template-columns:1fr 1fr;gap:10px}
  .card img{height:132px}
  .card .body{padding:12px}
  .card h3{font-size:15px}
  /* Dish-card action row, stacked: at 360–390px a 2-col card is ~176px wide
     and stepper (~114px) + Add (~78px) side by side overflow the card and the
     Add button gets clipped by the card's rounded corners. Stacking the
     stepper above a full-width Add button keeps everything inside the card. */
  .card .row{flex-direction:column;align-items:stretch;gap:8px}
  .card .row .qty{justify-content:center}
  .card .row .btn{width:100%}
  main{padding-left:12px;padding-right:12px}
  .panel{padding:16px}
  .profile-panel .stat-grid{grid-template-columns:repeat(3,1fr)}
  .theme-cards{grid-template-columns:1fr}
}
@media (max-width:380px){ .grid{grid-template-columns:1fr} }

/* ---------- Telegram viewport + safe area (2026-11-12) ---------- */
:root{ --tg-vh:100dvh; --tg-safe-top:0px; --tg-safe-bottom:0px; }
html,body{overflow-x:clip}
body{min-height:var(--tg-vh,100dvh);min-height:100dvh}
main{padding-bottom:calc(200px + var(--tg-safe-bottom,0px) + env(safe-area-inset-bottom,0px))}
footer{padding-bottom:calc(10px + var(--tg-safe-bottom,0px) + env(safe-area-inset-bottom,0px))}
.cart-bar{bottom:calc(58px + var(--tg-safe-bottom,0px) + env(safe-area-inset-bottom,0px))}
@media (min-width:1180px){ main{max-width:1180px} .topbar,.tabs{max-width:1180px} }

@media (max-width:640px){
  .theme-cards{grid-template-columns:1fr}
  .mode-seg{width:100%;justify-content:center;flex-wrap:wrap}
  .topbar{flex-wrap:wrap}
  .hero-stats{flex-wrap:wrap}
  .admin-item,.rule-row{flex-wrap:wrap}
  .sched-times{flex-wrap:wrap}
}

/* ---------- No horizontal overflow anywhere ---------- */
input,select,textarea{max-width:100%}
img{max-width:100%}
.tabs{scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tabs button{min-width:0}
.chip{max-width:100%;text-overflow:ellipsis;overflow:hidden}
.chip-closed{opacity:.55}
.check-row{display:flex;align-items:center;gap:8px;margin:10px 0;flex-wrap:wrap}
.check-row input{width:auto}
.day-checks{display:flex;flex-wrap:wrap;gap:2px 16px;margin:4px 0 10px}
.day-checks .check-row{margin:2px 0}
#fSuggested{min-height:96px}

/* ---------- Closed banner / schedule / discounts ---------- */
.closed-banner{background:#FEE2E2;border:1px solid #FCA5A5;color:#7F1D1D;border-radius:14px;padding:12px 14px;margin:12px 0;font-size:14px}
html[data-mode="dark"] .closed-banner{background:#450A0A;border-color:#7F1D1D;color:#FECACA}
.total-row{display:flex;justify-content:space-between;align-items:center;padding:6px 0}
.total-row.sub{color:var(--muted);font-size:14px}
.total-row.disc{color:#15803D;font-weight:700;font-size:14px}
html[data-mode="dark"] .total-row.disc{color:#86EFAC}
.sched-row{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;background:var(--surface-2);border-radius:12px;padding:10px 12px;margin:8px 0}
.sched-times{display:flex;gap:10px;flex-wrap:wrap}
.sched-times label{font-size:12.5px;color:var(--muted);display:flex;align-items:center;gap:6px}
.sched-times input{width:110px}
.days-checks{display:flex;flex-wrap:wrap;gap:4px 14px;margin:6px 0}
.form2{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
@media (max-width:560px){ .form2{grid-template-columns:1fr} }
.fineprint{font-size:12.5px;color:var(--muted)}

/* ---------- Setup / connection wizard ---------- */
.wizard{margin:8px 0;padding-inline-start:20px;display:grid;gap:10px}
.wizard li{display:grid;gap:2px}
.wizard b{font-size:14.5px}
.wizard span{font-size:13.5px;color:var(--muted)}
.setup-status{display:grid;gap:4px;background:var(--surface-2);border-radius:12px;padding:10px 12px;margin:10px 0;font-size:14px}
.setup-status p{margin:2px 0}
.dot{display:inline-block;width:11px;height:11px;border-radius:50%;margin-inline-end:6px;vertical-align:middle}
.dot.green{background:#16A34A}
.dot.red{background:#DC2626}
.input-row{display:flex;gap:8px}
.input-row input{flex:1;min-width:0}
/* Phone row (checkout): the long "Share my number from Telegram" button
   squeezed the phone input to ~60px at 390px (2026-11-16) — stack them. */
.phone-row{flex-wrap:wrap}
.phone-row input{flex:1 1 100%}
.phone-row .btn{flex:1 1 auto;justify-content:center}
.btn:disabled{opacity:.5;cursor:not-allowed}

/* ---------- Weekly calendar / line totals / codes / referral (2026-11-12) ---------- */
.calendar-panel{margin:14px 0}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin-top:10px}
.cal-day{display:flex;flex-direction:column;align-items:center;gap:2px;border:1.5px solid var(--border);background:var(--surface-2);border-radius:12px;padding:8px 2px;cursor:pointer;font-family:inherit;color:var(--text);min-height:86px}
.cal-day.active{border-color:var(--accent);background:var(--accent-soft);box-shadow:0 0 0 1px var(--accent)}
.cal-day.cal-closed{opacity:.45;cursor:not-allowed;background:var(--surface)}
.cal-wd{font-size:11.5px;color:var(--muted);text-align:center}
.cal-num{font-size:20px;font-weight:800;line-height:1.1}
.cal-dishes{font-size:10.5px;color:var(--muted);text-align:center;line-height:1.25;max-height:26px;overflow:hidden}
.cal-count{font-size:10.5px;font-weight:700;color:var(--accent)}
@media (max-width:640px){ .cal-grid{grid-template-columns:repeat(7,1fr);gap:4px} .cal-day{min-height:78px;padding:6px 1px} .cal-dishes{display:none} .cal-num{font-size:17px} }
.line-total{display:flex;align-items:baseline;gap:6px;margin-top:8px;padding:7px 10px;border-radius:10px;background:var(--accent-soft);font-size:13.5px}
.line-total b{font-size:15px}
.line-total .muted{margin-inline-start:auto}
.code-box{border:1px dashed var(--border);border-radius:12px;padding:12px;margin:12px 0}
.referral-code-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:10px 0}
.referral-code-row code{font-size:18px;font-weight:800;letter-spacing:1px;background:var(--surface-2);padding:8px 12px;border-radius:10px}
.badge{display:inline-block;padding:3px 9px;border-radius:999px;font-size:12px;font-weight:700}
.badge.approved{background:#DCFCE7;color:#166534}
.badge.pending_review{background:#FEF3C7;color:#92400E}
.mini{font-size:12px;color:var(--muted)}
.rule-row{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding:9px 0;border-bottom:1px solid var(--border)}
.rule-row:last-child{border-bottom:none}

/* ---------- Delivery / pickup, address, invoice, login (2026-11-12) ---------- */
.seg{display:flex;background:var(--surface-2);border-radius:12px;padding:4px;gap:4px;margin:10px 0}
.seg button{flex:1;border:none;background:transparent;border-radius:9px;padding:10px 6px;font-family:inherit;font-size:14.5px;font-weight:700;color:var(--muted);cursor:pointer}
.seg button.active{background:var(--accent);color:#fff}
.addr-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
@media (max-width:560px){ .addr-grid{grid-template-columns:1fr} }
.progress{height:10px;border-radius:999px;background:var(--surface-2);overflow:hidden;margin:6px 0;border:1px solid var(--line)}
.progress > div{height:100%;min-width:8px;background:var(--accent);border-radius:999px;transition:width .3s}

/* ---- Order tracking timeline ---- */
.track-timeline{display:flex;flex-direction:column;gap:0;margin:10px 0}
.track-step{display:flex;align-items:center;gap:10px;padding:6px 0;color:var(--muted)}
.track-step .track-dot{width:26px;height:26px;flex:0 0 26px;border-radius:50%;border:2px solid var(--line);display:flex;align-items:center;justify-content:center;font-size:13px;background:var(--surface)}
.track-step.done{color:var(--ink)}
.track-step.done .track-dot{border-color:var(--green);background:var(--green-bg);color:var(--green)}
.track-step.current{color:var(--ink);font-weight:700}
.track-step.current .track-dot{border-color:var(--brand);background:var(--gold-soft);color:var(--brand)}
.track-step.terminal .track-dot{border-color:var(--red);background:var(--red-bg);color:var(--red)}
.status-select{max-width:260px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font:inherit}
.unlock-banner{background:linear-gradient(135deg,#FEF3C7,#FDE68A);color:#92400E;border-radius:12px;padding:10px 12px;font-weight:700;margin:10px 0}
[data-theme="royal"] .unlock-banner{background:linear-gradient(135deg,#EDE9FE,#DDD6FE);color:#5B21B6}
.total-row.free span:last-child{color:#16A34A;font-weight:700}
.invoice{max-width:640px;margin:0 auto;background:#fff;color:#111;border-radius:14px;padding:22px;font-size:14px}
.invoice h1{font-size:20px;margin:0}
.invoice table{width:100%;border-collapse:collapse;margin:12px 0}
.invoice th,.invoice td{padding:7px 4px;border-bottom:1px solid #eee;text-align:start}
.invoice th:last-child,.invoice td:last-child{text-align:end}
.invoice .inv-total td{font-weight:800;font-size:16px;border-top:2px solid #111}
.login-box{border:1px solid var(--border);border-radius:12px;padding:14px;margin:12px 0}
.demo-badge{display:inline-block;background:#FEF3C7;color:#92400E;border-radius:999px;padding:2px 10px;font-size:12px;font-weight:800}
input:required:invalid{outline:none}
.field-err{color:#DC2626;font-size:12.5px;margin-top:4px}

/* ============================================================
   REDESIGN 2026-11-12 — mobile-first layout, secret admin path,
   events, legal pages, footer, featured, PWA install hint.
   These rules come last so they override the earlier ones. */

/* ---------- Sticky header (shrinks + shadow on scroll) ---------- */
/* FIX 2026-11-15 — the shrink-on-scroll changed the sticky header's height
   (padding 12/10 -> 7/7, h1 font-size, .brand-sub display:none), so crossing
   scrollY 24 moved all page content by ~30px and the scroll position
   oscillated around the threshold: the jumpy/stuck scrolling on mobile.
   The header height must NEVER change on scroll: .scrolled now only adds
   the shadow. No layout property may change here. */
.site-header{position:sticky;top:0;z-index:50;background:linear-gradient(150deg,var(--hero-1) 0%,var(--hero-2) 130%);color:var(--hero-ink);padding:12px 16px 10px;transition:box-shadow .25s ease}
.site-header .topbar{max-width:920px}
.site-header.scrolled{box-shadow:0 10px 28px rgba(0,0,0,.30)}
.hero{padding:6px 18px 22px}

/* ---------- Collapsible hero (2026-11-15) ----------
   Collapsed by default after the first visit (localStorage catering-hero-collapsed);
   the menu must be visible on first paint, so the collapsed hero is one line +
   a small toggle pill. The toggle stays visible in both states. */
.hero-toggle{display:flex;margin:14px auto 0;align-items:center;gap:6px;border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.12);color:var(--hero-ink);border-radius:999px;padding:6px 14px;cursor:pointer;font-size:12.5px;font-weight:700}
.hero-toggle .hero-chevron{font-size:10px}
.hero-collapsed-line{margin:2px 0 0;text-align:center;font-size:14.5px;font-weight:700;color:var(--hero-ink)}
.hero.collapsed{padding:10px 18px 12px}
.hero.collapsed .hero-toggle{margin-top:8px}

/* ---------- Persian tile-pattern strip (2026-11-15) ----------
   Restrained Iranian character: a thin CSS-only turquoise lattice under the
   header and above the footer. Uses the active theme's --brand, so it reads
   correctly in all 5 themes, light and dark. */
.tile-strip{height:7px;background-color:var(--surface-2);background-image:
  repeating-linear-gradient(45deg,color-mix(in srgb,var(--brand) 42%,transparent) 0 5px,transparent 5px 11px),
  repeating-linear-gradient(-45deg,color-mix(in srgb,var(--brand) 42%,transparent) 0 5px,transparent 5px 11px)}
.count-badge:empty{display:none}

/* ---------- Iranian ornaments — boteh divider + girih footer strip (2026-11-15) ----------
   Restrained, theme-aware (var(--brand)/var(--gold) at low opacity):
   a boteh (paisley) divider under the hero, and a thin girih diamond-lattice
   strip as the footer's top accent. Both are inline SVG, no images, no
   emoji, and sit outside the order flow so they cannot slow it down. */
.orn-divider{display:flex;align-items:center;gap:12px;max-width:920px;margin:16px auto 2px;padding:0 18px;color:color-mix(in srgb,var(--brand) 55%,transparent)}
.orn-divider .ic{flex:none;width:26px;height:26px}
.orn-line{flex:1;height:1px;background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--brand) 45%,transparent) 50%,transparent)}
.foot-orn{display:block;width:100%;height:12px;background:var(--surface-2);color:color-mix(in srgb,var(--brand) 42%,transparent)}
.foot-orn svg{display:block;width:100%;height:12px}

/* ---------- Fixed bottom tab bar — 5 tabs, raised centre cart, CURVED bump (2026-11-15) ----------
   The bar itself curves up around the cart: an inline SVG (.tabs-shape,
   first child of <nav class="tabs">) draws the bar as one filled shape whose
   top edge rises ~19px in a smooth bezier scoop on each side of the centre
   (concave left + right), cradling the 56px cart circle. The path is
   symmetric, so EN (LTR) and FA (RTL) look identical, and it uses
   var(--surface)/var(--line) so it follows all 6 themes, light and dark.
   The SVG is pointer-events:none and sits behind the buttons (z-index 0);
   the buttons stay clickable above it. The hill's peak is the tallest
   element of the bottom stack — re-measure after any change here.
   Measured at 390px (Playwright, fresh profile): tab bar 72px,
   raised cart top 87px above the viewport bottom, hill peak 92px —
   identical in EN and FA, and at 768px and 1280px. Every floating element
   and the footer clear it: cart bar bottom 128px, cookie/install bars
   124px (208px with the cart bar), footer padding 136px (208px with the
   cart bar). */
.tabs{position:fixed;left:0;right:0;bottom:0;top:auto;z-index:40;display:flex;gap:4px;max-width:none;margin:0;padding:6px 8px calc(8px + var(--tg-safe-bottom,0px) + env(safe-area-inset-bottom,0px));background:transparent;border-top:0;overflow-x:visible}
.tabs-shape{position:absolute;left:0;right:0;bottom:0;top:-20px;width:100%;height:calc(100% + 20px);z-index:0;pointer-events:none;overflow:visible}
.tabs button{position:relative;z-index:1;flex:1 1 0;min-width:0;flex-direction:column;gap:2px;padding:7px 2px 6px;border:0;border-radius:12px;background:transparent;font-size:11.5px;font-weight:700}
.tabs button.active{background:var(--gold-soft);color:var(--brand-deep);border-color:transparent;box-shadow:none}
.tabs button.active .count-badge{background:var(--brand);color:#fff}
/* The cart tab is the way to order: a raised brand circle, unmistakable as
   the cart, with the red count badge on its top corner. */
.tabs button.tab-cart-raised{font-weight:800;overflow:visible}
.tabs button.tab-cart-raised .tab-ic{width:56px;height:56px;margin-top:-28px;border-radius:50%;background:var(--brand);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 8px 20px rgba(0,0,0,.28);position:relative;border:3px solid var(--surface)}
.tabs button.tab-cart-raised .tab-ic .ic{width:26px;height:26px}
.tabs button.tab-cart-raised .count-badge{position:absolute;top:-5px;inset-inline-end:-5px;background:var(--red);color:#fff;min-width:20px;height:20px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;border:2px solid var(--surface);padding:0 4px}
.tabs button.tab-cart-raised.active{background:transparent;color:var(--ink-2)}
.tabs button.tab-cart-raised.active .tab-ic{box-shadow:0 8px 20px rgba(0,0,0,.28),0 0 0 3px var(--gold-soft)}
.tab-ic{display:inline-flex;line-height:0}
main{padding-bottom:24px}
footer{position:static;background:var(--surface-2);border-top:1px solid var(--line);padding:28px 16px calc(136px + var(--tg-safe-bottom,0px) + env(safe-area-inset-bottom,0px));display:block;font-size:13px;color:var(--muted)}
/* With a non-empty cart the floating cart bar (bottom 78px + ~65px tall) sits
   above the tab bar and covered the footer's last line. Extra bottom padding
   while the bar is visible (body.has-cart-bar, toggled in updateCartBar)
   lifts the whole footer above it. */
body.has-cart-bar footer{padding-bottom:calc(208px + var(--tg-safe-bottom,0px) + env(safe-area-inset-bottom,0px))}
.foot-inner{max-width:920px;margin:0 auto;display:grid;gap:20px}
.foot-col b{font-size:16px;color:var(--ink)}
.foot-links{display:flex;flex-wrap:wrap;gap:8px 18px;align-content:flex-start}
.foot-links a{color:var(--ink-2);text-decoration:none;font-weight:600;font-size:13.5px}
.foot-links a:hover{color:var(--brand)}
.foot-dev{font-size:12px;line-height:1.6;color:var(--muted);text-align:center}
.foot-dev a{color:var(--brand);font-weight:600;text-decoration:none;direction:ltr;unicode-bidi:embed}
.foot-note{margin:0;font-size:12px}
@media (min-width:640px){ .foot-inner{grid-template-columns:1.3fr 1fr} .foot-dev{grid-column:1 / -1} .foot-note{grid-column:1 / -1} }
.cart-bar{bottom:calc(128px + var(--tg-safe-bottom,0px) + env(safe-area-inset-bottom,0px))}
/* 2026-11-15 nav redesign: was 100px; the raised cart button's top sits
   87px above the viewport bottom at 390px (EN and FA) — the bar clears it
   by 41px. */

/* ---------- Hero stat cards: equal columns, no awkward wrap ---------- */
.hero-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.stat{min-width:0;padding:10px;text-align:center}
.stat strong{font-size:14px;white-space:nowrap}
.stat span{display:block;font-size:11.5px;line-height:1.4;margin-top:2px}

/* ---------- Weekly calendar: horizontal strip (no 7-col squeeze) ----------
   NOTE: no scroll-snap on this strip. Mandatory snap forces the scroll
   position onto day boundaries (2, 80, 158, …), but the position that shows
   the selected day fully is often a few px off a snap point (measured: 4px
   cut at 360px) — and re-enabling snap re-snaps even a static position.
   scrollIntoView(inline:"nearest") lands exactly; the strip still scrolls
   freely by swipe. */
.cal-grid{display:flex;gap:8px;overflow-x:auto;padding:4px 2px 10px;scrollbar-width:none}
.cal-grid::-webkit-scrollbar{display:none}
.cal-day{flex:0 0 78px;min-height:100px;min-width:44px;padding:10px 4px}
.cal-day .cal-dishes{max-height:30px}
@media (max-width:640px){ .cal-grid{gap:6px} .cal-day{flex-basis:72px;min-height:92px} .cal-dishes{display:block;font-size:10px} .cal-num{font-size:18px} }

/* ---------- Delivery-date chips: compact single line, scrollable row ---------- */
.chips{display:flex;gap:6px;flex-wrap:nowrap;overflow-x:auto;padding-bottom:6px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:0 0 auto;white-space:nowrap;padding:9px 13px}
.chip small{display:none}

/* ---------- Skeleton loaders ---------- */
.skel{border-radius:12px;background:linear-gradient(90deg,var(--surface-2) 25%,var(--surface) 50%,var(--surface-2) 75%);background-size:200% 100%;animation:shimmer 1.2s linear infinite}
@keyframes shimmer{to{background-position:-200% 0}}
.skel-card{height:290px;overflow:hidden;padding:0}
.skel-card .skel-img{height:150px;border-radius:0}
.skel-card .skel-line{height:14px;margin:12px 14px 0}
.skel-card .skel-line.short{width:55%}
@media (max-width:560px){ .skel-card{height:230px} .skel-card .skel-img{height:110px} }

/* ---------- Animations (alive, but calm) ---------- */
@keyframes fadeUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes badgePop{0%{transform:scale(.4)}60%{transform:scale(1.3)}100%{transform:scale(1)}}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.card{animation:fadeUp .3s ease both}
.order-card{animation:fadeUp .3s ease both}
.count-badge.pop{animation:badgePop .3s ease}
.btn:active,.qty button:active,.chip:active,.cal-day:active{transform:scale(.96)}
.btn,.qty button,.chip,.cal-day{transition:transform .12s ease,background-color .3s ease,color .3s ease,border-color .3s ease,box-shadow .3s ease}
.reveal{opacity:0;transform:translateY(12px);transition:opacity .45s ease,transform .45s ease}
.reveal.in{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
  .reveal{opacity:1;transform:none}
}

/* ---------- Featured showcase ---------- */
.featured-strip{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;padding:4px 2px 12px;scrollbar-width:none}
.featured-strip::-webkit-scrollbar{display:none}
.featured-strip .card{flex:0 0 262px;scroll-snap-align:start}
.feat-badge{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;font-weight:800;color:#92400E;background:linear-gradient(135deg,#FEF3C7,#FDE68A);border-radius:999px;padding:3px 10px}
/* ---------- Dietary tag badges + filter (round 3) ---------- */
.tag-badges{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 2px}
.tag-badges:empty{display:none}
.tag-badge{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;font-weight:800;border-radius:999px;padding:3px 9px;border:1px solid var(--line);background:var(--surface-2);color:var(--ink-2)}
.tag-badge .ic{width:12px;height:12px}
.tag-halal{color:#166534;background:#DCFCE7;border-color:#BBF7D0}
.tag-vegan{color:#14532D;background:#D1FAE5;border-color:#A7F3D0}
html[data-mode="dark"] .tag-halal{color:#BBF7D0;background:#14532D;border-color:#166534}
html[data-mode="dark"] .tag-vegan{color:#A7F3D0;background:#064E3B;border-color:#065F46}
.tag-filter{margin:8px 0 2px}
html[data-mode="dark"] .feat-badge{color:#FDE68A;background:#451A03}
@media (max-width:380px){ .featured-strip .card{flex-basis:232px} }

/* ---------- Events ---------- */
.events-card{border:2px dashed var(--gold);background:linear-gradient(135deg,var(--gold-soft),transparent 70%)}
.ev-dish-row{display:flex;justify-content:space-between;align-items:center;gap:10px}
.ev-status{font-size:12px;font-weight:700}
.ev-status.pending{color:#92400E}
.ev-status.approved{color:#166534}
.ev-status.rejected{color:#991B1B}
.tel-link{color:var(--brand);font-weight:800;text-decoration:none;direction:ltr;unicode-bidi:embed;font-size:16px}

/* ---------- Legal pages ---------- */
.legal-content h2{margin:14px 0 8px;font-size:20px}
.legal-content h3{margin:16px 0 6px;font-size:16px}
.legal-content p,.legal-content li{font-size:14.5px;line-height:1.8;color:var(--ink-2)}
.legal-content ul,.legal-content ol{padding-inline-start:22px;display:grid;gap:6px}
.legal-content .install-steps{display:grid;gap:12px}
.legal-content .install-steps li{background:var(--surface-2);border-radius:12px;padding:10px 12px;list-style:none}
.legal-content .install-steps li b{display:block;color:var(--ink)}

/* ---------- Install hint (dismissible) ---------- */
.install-hint{position:fixed;left:12px;right:12px;bottom:calc(124px + var(--tg-safe-bottom,0px) + env(safe-area-inset-bottom,0px));z-index:45;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:10px 12px;display:flex;gap:8px;align-items:center;box-shadow:var(--shadow);font-size:13.5px;font-weight:600}
.install-hint span{flex:1;min-width:0}
.install-hint .btn{padding:8px 12px;font-size:13px;flex:none}

/* ---------- Admin gate / misc ---------- */
#adminGatePanel{border:2px solid var(--gold)}
.contact-panel .row,.panel .row{flex-wrap:wrap}
@media (max-width:560px){
  .tabs button{font-size:11px}
  .top-actions{gap:6px}
  .hero{padding-left:14px;padding-right:14px}
  .welcome{font-size:21px}
}

/* ---------- Business type + logo preview (CMS Setup, 2026-11-15) ---------- */
.logo-preview-row{display:flex;gap:10px;margin:10px 0}
.logo-preview{flex:1;border-radius:14px;padding:12px;display:flex;flex-direction:column;align-items:center;gap:8px;border:1px solid var(--line);min-width:0}
.logo-preview.light{background:#FBF7F0}
.logo-preview.dark{background:#171412}
.logo-preview img{width:72px;height:72px;border-radius:14px;object-fit:cover}
.logo-preview span{font-size:12px;color:var(--muted);text-align:center}
.logo-preview.dark span{color:#D6D3D1}

/* ---------- Admin dashboard (business owner) ---------- */
.admin-tabs{margin:4px 0 12px}
.admin-tabs button{white-space:nowrap}
.dash-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:12px 0}
.dash-grid div{background:var(--surface-2);border-radius:14px;padding:12px;text-align:center;min-width:0}
.dash-grid strong{display:block;font-size:19px;font-family:var(--font-en);overflow-wrap:anywhere}
.dash-grid span{font-size:12px;color:var(--muted)}
.dash-chart{display:flex;align-items:flex-end;gap:2px;height:96px;padding:6px 2px 0}
.dash-chart .bar{flex:1;background:var(--accent);border-radius:3px 3px 0 0;min-height:2px;opacity:.85}
.dash-chart-labels{display:flex;gap:2px;font-size:10px;color:var(--muted)}
.dash-chart-labels span{flex:1;text-align:center;overflow:hidden;white-space:nowrap}
.dash-row{display:flex;justify-content:space-between;gap:8px;padding:8px 2px;border-bottom:1px solid var(--line);font-size:14px}
.dash-row span:first-child{min-width:0;overflow-wrap:anywhere}
.dash-row span:last-child{flex:none;text-align:end}
.table-wrap{overflow-x:auto;margin:8px 0}
.table-wrap table{width:100%;border-collapse:collapse;font-size:13px;min-width:430px}
.table-wrap th,.table-wrap td{padding:7px 6px;border-bottom:1px solid var(--line);text-align:start;white-space:nowrap}
.table-wrap th{color:var(--muted);font-weight:700}

/* ---------- Promo popup modal (2026-11-15) ---------- */
.promo-overlay{position:fixed;inset:0;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;z-index:100;padding:16px;box-sizing:border-box}
.promo-modal{position:relative;width:min(420px,100%);max-height:85vh;overflow-y:auto;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:20px;padding:20px;box-sizing:border-box;box-shadow:var(--shadow);text-align:center}
.promo-modal h2{margin:4px 0 8px;font-size:20px;padding-inline-end:36px;box-sizing:border-box}
.promo-modal p{margin:0 0 12px;color:var(--ink-2);line-height:1.6}
.promo-img{width:100%;max-height:220px;object-fit:cover;border-radius:14px;margin-bottom:12px;display:block}
.promo-close{position:absolute;top:10px;inset-inline-end:10px;width:32px;height:32px;border-radius:50%;border:0;background:var(--surface-2);color:var(--ink);font-size:20px;line-height:1;cursor:pointer}
.promo-code-row{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;background:var(--surface-2);border:1px dashed var(--line);border-radius:12px;padding:10px;margin:4px 0 14px}
.promo-code-row code{font-size:17px;font-weight:700;letter-spacing:1px}
.promo-code-label{font-size:12px;color:var(--muted)}
.promo-ok-btn{width:100%}
/* ---------- User management (admin dashboard) ---------- */
.user-row:hover{background:var(--surface-2)}
.user-detail{margin:12px 0}
.user-detail .badge{font-size:12px}
#userSearch{width:100%;box-sizing:border-box;margin:8px 0}
#dashAnalytics h3{margin-top:18px}

/* ============================================================
   DISH PAGES, SUGGESTIONS, OFFERS (2026-11-15) */
.dish-page{margin:12px 0}
.dish-gallery{position:relative;display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x mandatory;border-radius:var(--radius);scrollbar-width:none}
.dish-gallery::-webkit-scrollbar{display:none}
.dish-gallery img{flex:0 0 100%;width:100%;height:260px;object-fit:cover;border-radius:var(--radius);scroll-snap-align:start;background:var(--surface-2)}
.dish-gallery-count{position:absolute;top:10px;inset-inline-end:10px;background:rgba(0,0,0,.55);color:#fff;border-radius:999px;padding:3px 10px;font-size:12px;font-weight:700}
.dish-head{padding:14px 2px 0;display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.dish-head h2{margin:0;font-size:22px;font-weight:800;line-height:1.35}
.dish-head .desc{margin:0;color:var(--muted);font-size:14px;line-height:1.7}
.offer-badge{display:inline-flex;align-items:center;gap:4px;font-size:12.5px;font-weight:800;color:#92400E;background:linear-gradient(135deg,#FEF3C7,#FDE68A);border-radius:999px;padding:4px 11px}
html[data-mode="dark"] .offer-badge{color:#FDE68A;background:#451A03}
.dish-section{margin-top:18px}
.dish-section h3{margin:0 0 8px;font-size:15.5px;font-weight:800}
.dish-section p{margin:4px 0;color:var(--ink-2);font-size:14px;line-height:1.7}
.ing-chips{display:flex;flex-wrap:wrap;gap:6px}
.ing-chip{background:var(--surface-2);border:1px solid var(--line);border-radius:999px;padding:5px 12px;font-size:13px}
.dish-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px}
.dish-facts div{background:var(--surface-2);border:1px solid var(--line);border-radius:14px;padding:10px 12px}
.dish-facts strong{display:block;font-size:15px;font-family:var(--font-en)}
.dish-facts span{font-size:12px;color:var(--muted)}
.dish-buy{margin-top:20px;display:grid;gap:10px}
.dish-buy .qty{justify-content:center}
.dish-buy .btn.big{margin-top:0}
.call-box{background:var(--surface-2);border:1px dashed var(--line);border-radius:16px;padding:14px;margin-top:10px;display:grid;gap:8px}
.call-box p{margin:0}
.sugg-title{margin:18px 0 8px;font-size:16px;font-weight:800}
.sugg-strip{display:flex;gap:10px;overflow-x:auto;padding:2px 2px 10px;scroll-snap-type:x mandatory;scrollbar-width:none}
.sugg-strip::-webkit-scrollbar{display:none}
.sugg-card{flex:0 0 168px;scroll-snap-align:start;background:var(--surface);border:1px solid var(--line);border-radius:16px;overflow:hidden;cursor:pointer;box-shadow:var(--shadow-sm)}
.sugg-card img{width:100%;height:96px;object-fit:cover;display:block;background:var(--surface-2)}
.sugg-body{padding:10px;display:grid;gap:4px}
.sugg-body b{font-size:13.5px;line-height:1.4}
.sugg-body .price{font-size:14px}
.sugg-add{padding:8px 10px;font-size:13px;width:100%}
.offers-box{background:var(--green-bg);border:1px solid var(--line);border-radius:14px;padding:12px 14px;margin:12px 0;font-size:14px;display:grid;gap:4px}
.offers-box .fineprint{margin:4px 0 0}
.offer-free-row{display:flex;justify-content:space-between;gap:8px;font-size:13.5px}
.offer-free-row b{color:var(--green);white-space:nowrap}
@media (max-width:380px){ .sugg-card{flex-basis:150px} .dish-gallery img{height:220px} }

/* ---------- Inline SVG icons (2026-11-15) ----------
   .ic inherits currentColor; sizes below keep the measured bottom stack
   (tabs 73px, raised cart top 87px, cart bar bottom:128px) — tab icons
   are 22px (raised cart circle 56px),
   the same visual height as the emoji they replace. */
.ic{width:20px;height:20px;flex:none;vertical-align:-4px}
.tab-ic .ic{width:22px;height:22px}
.search-ic .ic{width:18px;height:18px}
.clear-btn{display:inline-flex;align-items:center;justify-content:center}
.clear-btn .ic{width:14px;height:14px}
.btn .ic{width:17px;height:17px;vertical-align:-3px}
.seg button .ic{width:18px;height:18px;vertical-align:-3px}
.mode-seg .ic{width:16px;height:16px;vertical-align:-3px}
.qty button{display:inline-flex;align-items:center;justify-content:center}
.qty button .ic{width:15px;height:15px}
.msg .ic{width:16px;height:16px;vertical-align:-3px;margin-inline-end:2px}
.msg-ok{color:var(--green)}
.msg-err{color:var(--red)}
.msg-warn,.msg-demo{color:#92400E}
html[data-mode="dark"] .msg-warn,html[data-mode="dark"] .msg-demo{color:#FBBF24}
.msg-lock,.msg-info{color:var(--ink-2)}
.field-err .ic{width:14px;height:14px;vertical-align:-2px}
.track-dot .ic{width:14px;height:14px}
.feat-badge .ic,.offer-badge .ic{width:13px;height:13px;vertical-align:-2px}
.loyalty-chip{display:inline-flex;align-items:center;gap:5px}
.loyalty-chip .ic{width:13px;height:13px}
.dish-gallery-count{display:inline-flex;align-items:center;gap:4px}
.dish-gallery-count .ic{width:13px;height:13px}
.unlock-banner .ic,.offers-box .ic{width:17px;height:17px;vertical-align:-3px}
.notice .ic{width:16px;height:16px;vertical-align:-3px}
.hero-chevron .ic{width:11px;height:11px}
.user-row .ic{width:16px;height:16px;vertical-align:-3px}
.promo-close{display:flex;align-items:center;justify-content:center}
.promo-close .ic{width:16px;height:16px}
.rule-row .ic,.admin-item .ic{width:16px;height:16px;vertical-align:-3px}
.admin-item .btn .ic{width:15px;height:15px}
.closed-banner .ic{width:17px;height:17px;vertical-align:-3px}

/* ============================================================
   WAVE 2 (2026-11-15) — cart badge on the icon, EN header one row,
   footer rebuild, contact / working-hours / admin messages. */

/* ---------- Cart badge ON the cart icon (2026-11-15 wave 2) ----------
   Small red circle overlapping the top inline-end corner of the cart icon,
   like a shop badge. The badge span now lives INSIDE .tab-ic (index.html),
   so it is positioned against the icon, not the tab label. :empty keeps it
   hidden when the cart is empty — the explicit :empty rule below must stay
   AFTER the positioning rule (higher specificity wins over display). */
.tabs button[data-tab="cart"] .tab-ic{position:relative}
.tabs button[data-tab="cart"] .tab-ic .count-badge{position:absolute;top:-8px;inset-inline-end:-12px;min-width:19px;height:19px;padding:0 5px;background:#DC2626;color:#fff;border:2px solid var(--surface);border-radius:999px;font-size:11px;font-weight:800;line-height:1.4;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 1px 4px rgba(0,0,0,.25)}
.tabs button[data-tab="cart"] .tab-ic .count-badge:empty{display:none}

/* ---------- EN header fits on one row at 390px (2026-11-15 wave 2) ----------
   The EN header was 130px tall (vs 78px FA): "Persian catering · London,
   Ontario" + the language toggle wrapped the topbar onto a second row.
   EN-only fix — never wrap the topbar, let the brand text shrink, tighten
   the language buttons at phone widths. FA layout is untouched. */
html[lang="en"] .topbar{flex-wrap:nowrap}
html[lang="en"] .brand-text{min-width:0;flex:1 1 auto}
@media (max-width:640px){
  html[lang="en"] .site-header{padding-left:12px;padding-right:12px}
  html[lang="en"] .lang-btn{padding:7px 8px;font-size:12px}
  html[lang="en"] .brand-sub{font-size:11.5px;letter-spacing:0}
}

/* ---------- Footer rebuild — categorized columns (2026-11-15 wave 2) ----------
   Brand + tagline | Contact | Working hours | Legal — 4 columns (the
   Explore column was deleted 2026-11-15: it duplicated the bottom nav).
   The footer is a normal in-flow block (position:static, set in the
   2026-11-12 redesign rules above) reached by scrolling; main needs only
   24px bottom padding. The Legal column keeps class .foot-links so
   cookie-consent.js can append its "Cookie settings" link there. */
.foot-inner{max-width:920px;margin:0 auto;display:grid;gap:24px 20px;grid-template-columns:1fr}
.foot-col{display:flex;flex-direction:column;gap:8px;align-items:flex-start;min-width:0}
.foot-col h3{margin:0 0 2px;font-size:13px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--ink)}
.foot-col b{font-size:16px;color:var(--ink)}
.foot-brand p{margin:0}
.foot-links{display:flex;flex-direction:column;flex-wrap:nowrap;gap:8px;align-items:flex-start}
.foot-links a{color:var(--ink-2);text-decoration:none;font-weight:600;font-size:13.5px}
.foot-links a:hover{color:var(--brand)}
.foot-contact-list{display:grid;gap:6px}
.foot-contact-list a{color:var(--ink-2);text-decoration:none;font-weight:600;font-size:13.5px;display:inline-flex;align-items:center;gap:6px;overflow-wrap:anywhere}
.foot-contact-list a:hover{color:var(--brand)}
.foot-contact-list .ic{width:15px;height:15px}
.foot-contact-btn{margin-top:4px}
.foot-hours-list{display:grid;gap:3px;font-size:13px}
.foot-hours-row{display:flex;justify-content:space-between;gap:14px}
.foot-hours-row b{font-weight:600}
.foot-hours-row .closed{color:var(--muted);font-weight:600}
.foot-dev{font-size:12px;line-height:1.6;color:var(--muted);text-align:center}
.foot-dev a{color:var(--brand);font-weight:600;text-decoration:none;direction:ltr;unicode-bidi:embed}
.foot-note{margin:0;font-size:12px}
@media (min-width:640px){
  .foot-inner{grid-template-columns:1fr 1fr}
  .foot-brand{grid-column:1 / -1}
  .foot-dev{grid-column:1 / -1}
  .foot-note{grid-column:1 / -1}
}
@media (min-width:1024px){
  .foot-inner{grid-template-columns:1.3fr 1fr 1.1fr .9fr}
  .foot-brand{grid-column:auto}
}
/* The floating cart bar (bottom:128px + ~65px tall) sits above the tab bar;
   while it is visible the footer needs 208px bottom padding so its last
   line clears the bar's top edge (193px) by 15px. */
body.has-cart-bar footer{padding-bottom:calc(208px + var(--tg-safe-bottom,0px) + env(safe-area-inset-bottom,0px))}

/* ---------- Admin contact inbox (2026-11-15 wave 2) ---------- */
.contact-msg{border:1px solid var(--line);border-radius:14px;padding:12px;margin:10px 0;background:var(--surface-2)}
.contact-msg.unread{background:var(--gold-soft);border-color:var(--gold)}
.contact-msg p{margin:6px 0;white-space:pre-wrap}
.contact-msg .row{justify-content:flex-start}

/* ---------- Favorites + Home + copyright (2026-11-15) ---------- */
.card{position:relative}
.fav-btn{position:absolute;top:10px;inset-inline-end:10px;z-index:2;width:36px;height:36px;border-radius:50%;border:1px solid var(--line);background:color-mix(in srgb,var(--surface) 88%,transparent);color:var(--ink-2);cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--shadow-sm)}
.fav-btn .ic{width:20px;height:20px}
.fav-btn.active{color:var(--red);border-color:var(--red);background:var(--red-bg)}
.dish-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.dish-title-row h2{margin:0}
.dish-title-row .fav-btn{position:static;flex:none}
.home-cats{flex-wrap:wrap}
.offer-row{display:flex;gap:8px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line);font-size:14px;font-weight:600}
.offer-row:last-child{border-bottom:0}
.offer-row .ic{width:17px;height:17px;color:var(--brand);flex:none}
.foot-copy{margin:0;font-size:12px;text-align:center;grid-column:1 / -1}
