@import url("fonts.css");

/* Quiet, editorial look: ivory paper, ink text, hairlines, brand color only where it matters. */
:root {
  --brand: #3b2418;
  --bg: #f8f6f2;
  --surface: #ffffff;
  --field: #f2efea;
  --ink: #171513;
  --muted: #8b847b;
  --line: #ebe6de;
  --line-strong: #d9d2c8;
  --btn-bg: var(--brand);
  --btn-ink: #fff;
  --ok: #2f7a53;
  --ok-soft: #eaf4ee;
  --danger: #b4382e;
  --danger-soft: #fbeeec;
  --radius: 18px;
  --font: "Vazirmatn", Tahoma, "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --surface: #1a1917;
    --field: #22201e;
    --ink: #f3efe9;
    --muted: #9c958b;
    --line: #2a2825;
    --line-strong: #3a3733;
    --btn-bg: #f3efe9;
    --btn-ink: #121110;
    --ok: #7fcf9f;
    --ok-soft: #17261d;
    --danger: #ff8f84;
    --danger-soft: #2c1a18;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15.5px/1.75 var(--font);
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
body.has-cart { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
body.locked { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a, label, select { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
img, video { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.ic { width: 20px; height: 20px; flex: none; }

/* ---------- header ---------- */
.top { padding: calc(14px + env(safe-area-inset-top)) 20px 0; }
.top-in { max-width: 960px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; flex: none; }
.brand-logo.mark { display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: 1.1rem; }
.brand-text { flex: 1; min-width: 0; line-height: 1.35; }
.brand-text h1 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.brand-store { margin: 0; color: var(--muted); font-size: .8rem; }
.brand-call {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong); color: var(--ink);
}
.hero { max-width: 960px; margin: 0 auto; padding: 26px 0 6px; }

/* cover: photo / looping video behind the header */
.top.cover {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(58vh, 460px);
  display: flex; flex-direction: column;
  padding-bottom: 28px;
  border-radius: 0 0 28px 28px;
  background: #1a1714; color: #fff;
}
.cover-media { position: absolute; inset: 0; z-index: -1; }
.cover-media img, .cover-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-media video { opacity: 0; transition: opacity .8s ease; }
.cover-media video.playing { opacity: 1; }
.cover-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, .05) 35%, rgba(0, 0, 0, .15) 55%, rgba(0, 0, 0, .78) 100%);
}
.top.cover .hero { margin-top: auto; padding-bottom: 0; width: 100%; }
.top.cover .hero h2 { font-size: 1.9rem; text-shadow: 0 2px 16px rgba(0, 0, 0, .35); }
.top.cover .brand-store, .top.cover .hero-addr { color: rgba(255, 255, 255, .8); }
.top.cover .brand-call { border-color: rgba(255, 255, 255, .45); color: #fff; background: rgba(255, 255, 255, .08); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.top.cover .top-in { width: 100%; }
@media (min-width: 760px) { .top.cover { border-radius: 0 0 36px 36px; } }
.hero h2 { margin: 0; font-size: 1.65rem; line-height: 1.45; font-weight: 800; max-width: 22ch; }
.hero-addr { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; color: var(--muted); font-size: .85rem; }
.hero-addr .ic { width: 16px; height: 16px; }

.closed, .active-order {
  max-width: 920px; width: calc(100% - 40px);
  margin: 18px auto 0; padding: 12px 16px;
  border-radius: 14px; font-size: .92rem;
}
.closed { background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.active-order {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
}
.active-order .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; margin-left: 8px; box-shadow: 0 0 0 4px var(--ok-soft); }

/* ---------- menu picker ---------- */
.home { max-width: 960px; margin: 0 auto; padding: 22px 20px 32px; }
.home-title { margin: 0; font-size: .8rem; font-weight: 600; color: var(--muted); }
.home-sub { display: none; }
.menus { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 12px; }
@media (min-width: 640px) { .menus { grid-template-columns: 1fr 1fr; } }
.menu-card {
  position: relative; display: flex; align-items: center; gap: 16px;
  width: 100%; min-height: 96px; padding: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-align: right; cursor: pointer; overflow: hidden;
  transition: transform .15s ease, border-color .15s;
}
.menu-card:active { transform: scale(.985); }
.menu-icon { flex: none; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--field); color: var(--ink); }
.menu-icon .ic { width: 28px; height: 28px; }
.menu-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.55; }
.menu-card-text b { font-size: 1.1rem; font-weight: 800; }
.menu-card-text small { color: var(--muted); font-size: .84rem; }
.menu-card-text em { font-style: normal; font-size: .75rem; color: var(--muted); margin-top: 4px; }
.menu-arrow { flex: none; color: var(--muted); }
.menu-card.has-img { min-height: 190px; padding: 0; align-items: flex-end; border: 0; }
.menu-card.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.menu-card.has-img:hover img { transform: scale(1.03); }
.menu-card.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0) 65%); }
.menu-card.has-img .menu-card-text, .menu-card.has-img .menu-arrow { position: relative; z-index: 1; color: #fff; padding: 18px 20px; }
.menu-card.has-img .menu-card-text small, .menu-card.has-img .menu-card-text em { color: rgba(255, 255, 255, .8); }

/* ---------- category tabs ---------- */
.cats {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 22px; align-items: center;
  overflow-x: auto; scrollbar-width: none;
  margin-top: 14px; padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.cats::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: none; position: relative;
  padding: 14px 0 13px;
  color: var(--muted); text-decoration: none; white-space: nowrap;
  font-size: .95rem; font-weight: 600;
}
.cat-chip.on { color: var(--ink); }
.cat-chip.on::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 2px; background: var(--ink); border-radius: 2px; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; }
.cat-chip .fi { width: 18px; height: 18px; flex: none; opacity: .75; }
.cat-chip.on .fi { opacity: 1; }
.menu-section h2 .fi { width: 22px; height: 22px; vertical-align: -4px; margin-left: 6px; color: var(--muted); }
.cat-back {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px 6px 14px; margin-left: -4px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: transparent;
  font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.cat-back .ic { width: 16px; height: 16px; }

/* ---------- product list ---------- */
.menu { max-width: 960px; margin: 0 auto; padding: 0 20px 28px; }
.menu-title { display: flex; align-items: baseline; gap: 10px; margin: 24px 0 0; }
.menu-title h2 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.menu-title span { display: none; }
.menu-section { padding-top: 8px; }
.menu-section h2 { margin: 24px 0 2px; font-size: 1.15rem; font-weight: 800; }
.grid { display: grid; grid-template-columns: 1fr; column-gap: 40px; }
@media (min-width: 760px) { .grid { grid-template-columns: 1fr 1fr; } }

.card {
  display: flex; gap: 16px; align-items: center;
  width: 100%; padding: 16px 0;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  text-align: right; cursor: pointer;
}
.card:active .card-img { transform: scale(.97); }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-self: stretch; }
.card-body h3 { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.6; }
.card-desc {
  margin: 2px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 8px; }
.price { font-weight: 800; font-size: 1rem; }
.price small, .unit { font-weight: 500; color: var(--muted); font-size: .72rem; margin-right: 3px; }

/* sold out: stays on the menu, can't be ordered */
.card.soldout .card-body { opacity: .5; }
.card.soldout .card-img img, .card.soldout .card-img .ph { filter: grayscale(1); opacity: .55; }
.card.soldout .add { display: none; }
.stamp {
  position: absolute; top: 50%; left: 50%; z-index: 2;
  transform: translate(-50%, -50%) rotate(-12deg);
  padding: 2px 10px; border: 2px solid var(--ink); border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--ink); font-size: .78rem; font-weight: 800; white-space: nowrap;
}
.ps-media .stamp { font-size: 1.2rem; padding: 4px 18px; border-width: 3px; }
.soldout-note { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-weight: 600; font-size: .9rem; }

/* progressive images: blurred tiny preview → real photo fades in */
.pimg { position: absolute; inset: 0; overflow: hidden; background: var(--field); }
.pimg > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.pimg > .ph { filter: blur(10px); transform: scale(1.15); }
.pimg > img:not(.ph) { opacity: 0; transition: opacity .5s ease; }
.pimg > img.loaded { opacity: 1; }
.card-img .pimg { border-radius: 16px; }
.menu-card .pimg { z-index: 0; }
.ps-media .pimg { position: relative; aspect-ratio: 1 / 1; max-height: 52vh; width: 100%; }
.card-img {
  position: relative; flex: none;
  width: 96px; height: 96px; border-radius: 16px;
  background: var(--field);
  transition: transform .12s ease;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--line-strong); border-radius: 16px; }
.noimg .ic { width: 34px; height: 34px; stroke-width: 1.2; }
.badge-video { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; }
.badge-video .ic { width: 11px; height: 11px; }
.add {
  position: absolute; left: -6px; bottom: -6px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}
.add .ic { width: 16px; height: 16px; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px;
  border-radius: 14px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--ink);
  font-weight: 700; text-decoration: none; cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-ink); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 36px; padding: 4px 14px; font-size: .85rem; border-radius: 999px; }
.btn.block { width: 100%; margin-top: 10px; }
.btn.grow { flex: 1; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- floating cart ---------- */
.cart-bar {
  position: fixed; z-index: 10;
  inset-inline: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 10px 0 20px;
  border: 0; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-ink);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
  font-weight: 700; cursor: pointer; white-space: nowrap;
}
.cart-bar-count {
  min-width: 40px; height: 40px; padding: 0 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  display: grid; place-items: center;
}
@media (prefers-color-scheme: dark) { .cart-bar-count { background: rgba(0, 0, 0, .1); } }
.cart-bar-total { margin-inline-start: auto; font-weight: 800; }

/* ---------- sheets ---------- */
.sheet { position: fixed; inset: 0; z-index: 20; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(10, 8, 6, .45); opacity: 0; transition: opacity .25s; }
.sheet-body {
  position: absolute; inset-inline: 0; bottom: 0;
  max-width: 640px; margin: 0 auto;
  max-height: 94vh; max-height: 94dvh;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.sheet-body::before { content: ""; position: sticky; top: 0; display: block; width: 38px; height: 4px; margin: 8px auto -12px; border-radius: 4px; background: var(--line-strong); z-index: 3; }
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-body { transform: none; }
.sheet-x {
  position: sticky; top: 14px; float: left; margin: 14px 14px -50px 0; z-index: 4;
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center; cursor: pointer; color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
.sheet-x .ic { width: 18px; height: 18px; }
.ps-media { position: relative; background: var(--field); }
.ps-media img, .ps-media video { width: 100%; aspect-ratio: 1 / 1; max-height: 52vh; object-fit: cover; margin: 0 auto; }
.ps-media video { object-fit: contain; background: #000; }
.ps-content, .cart-content, .status-content { padding: 22px 20px; }
.ps-content h2, .cart-content h2 { margin: 0; font-size: 1.4rem; font-weight: 800; line-height: 1.5; }
.ps-desc { margin: 6px 0 0; color: var(--muted); white-space: pre-line; font-size: .92rem; }

.variants { margin-top: 18px; }
.variants-title { margin: 0 0 8px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.variant {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 14px; cursor: pointer;
  transition: border-color .15s;
}
.variant:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 .5px var(--ink); }
.variant input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; }
.variant input:checked { border-color: var(--ink); }
.variant input:checked::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.variant-name { flex: 1; font-weight: 600; }
.variant-price { color: var(--muted); font-size: .9rem; }

.ps-actions {
  display: flex; gap: 10px; align-items: center;
  position: sticky; bottom: 0;
  background: var(--surface);
  padding: 14px 0 6px; margin-top: 18px;
}
.stepper { display: inline-flex; align-items: center; height: 48px; border-radius: 14px; background: var(--field); }
.stepper button { width: 44px; height: 100%; border: 0; background: none; font-size: 1.25rem; cursor: pointer; display: grid; place-items: center; }
.stepper button .ic { width: 18px; height: 18px; }
.stepper output { min-width: 26px; text-align: center; font-weight: 800; }
.stepper.small { height: 36px; border-radius: 999px; }
.stepper.small button { width: 34px; }
.stepper.small button .ic { width: 15px; height: 15px; }

/* ---------- cart ---------- */
.cart-lines { list-style: none; padding: 0; margin: 10px 0 0; }
.cart-line { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cl-info { flex: 1; min-width: 0; line-height: 1.6; }
.cl-info b { font-weight: 700; }
.cl-total { font-size: .9rem; font-weight: 700; min-width: 86px; text-align: left; }
.cart-sum { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 4px; }
.cart-sum span { color: var(--muted); font-size: .9rem; }
.cart-sum b { font-size: 1.25rem; font-weight: 800; }

.checkout { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 4px; }
.checkout h3 { margin: 18px 0 0; font-size: 1.1rem; font-weight: 800; }
.checkout > p.muted { margin: 2px 0 6px; font-size: .88rem; }
.checkout label, .checkout fieldset { display: block; margin: 18px 0 0; font-size: .8rem; font-weight: 600; color: var(--muted); }
.checkout fieldset { border: 0; padding: 0; min-width: 0; }
.checkout legend { padding: 0; margin-bottom: 8px; }
.checkout input, .checkout textarea {
  display: block; width: 100%; margin-top: 8px;
  min-height: 52px; padding: 12px 16px;
  border: 1px solid transparent; border-radius: 14px;
  background: var(--field); color: var(--ink);
  font-size: 1rem; font-weight: 500;
  transition: border-color .15s, background .15s;
}
.checkout input::placeholder, .checkout textarea::placeholder { color: var(--muted); opacity: .7; }
.checkout input[dir="ltr"] { text-align: left; }
.checkout input:focus, .checkout textarea:focus { outline: none; border-color: var(--ink); background: var(--surface); }
.checkout .invalid { border-color: var(--danger) !important; background: var(--danger-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; font-size: .88rem; font-weight: 500;
}
.chip i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.chip.on { border-color: var(--ink); box-shadow: inset 0 0 0 .5px var(--ink); font-weight: 700; }
.colors input { margin-top: 10px; }
.pay-note {
  display: flex; align-items: center; gap: 10px;
  margin: 20px 0 0; padding: 14px 16px; border-radius: 14px;
  background: var(--field); color: var(--ink); font-size: .88rem;
}
.pay-note .ic { color: var(--muted); }
.form-error { background: var(--danger-soft); color: var(--danger); padding: 10px 14px; border-radius: 12px; font-weight: 600; font-size: .9rem; }

.submit-wrap {
  position: sticky; bottom: 0; z-index: 2;
  margin: 18px -20px 0; padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.submit-wrap .btn.block { margin-top: 0; min-height: 56px; font-size: 1.02rem; }
.submit-wrap .form-error { margin: 0 0 10px; }

/* ---------- order status ---------- */
.st-head { text-align: center; padding: 22px 8px 4px; }
.st-num { display: inline-block; color: var(--muted); font-size: .85rem; }
.st-num b { color: var(--ink); font-size: 1rem; }
.st-head h2 { margin: 6px 0 6px; font-size: 1.45rem; font-weight: 800; }
.st-head p { margin: 0 auto; color: var(--muted); font-size: .92rem; max-width: 30ch; }
.st-head.cancelled h2 { color: var(--danger); }
.steps { list-style: none; display: flex; padding: 0; margin: 26px 0 22px; }
.steps li { flex: 1; text-align: center; font-size: .78rem; color: var(--muted); position: relative; }
.steps li::before {
  content: ""; display: block;
  width: 12px; height: 12px; margin: 0 auto 10px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-strong);
  position: relative; z-index: 1;
}
.steps li + li::after { content: ""; position: absolute; top: 6px; left: 50%; right: -50%; height: 2px; background: var(--line); }
.steps li.done, .steps li.now { color: var(--ink); font-weight: 700; }
.steps li.done::before { background: var(--ink); border-color: var(--ink); }
.steps li.now::before { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 0 5px var(--ok-soft); animation: pulse 1.8s infinite; }
.steps li.done + li::after { background: var(--ink); }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px var(--ok-soft); } }
.st-eta {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  margin: 18px 0 0; padding: 16px; border-radius: 16px;
  background: var(--ok-soft); color: var(--ok); text-align: center;
}
.st-eta-left { font-size: 1.5rem; font-weight: 800; line-height: 1.4; }
.st-eta-at { font-size: .88rem; font-weight: 600; opacity: .85; }
.st-car { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.st-car .ic { width: 18px; height: 18px; }
.st-items { list-style: none; padding: 0; margin: 8px 0 0; border-top: 1px solid var(--line); }
.st-items li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.pay-note.paid { background: var(--ok-soft); color: var(--ok); }
.status-content .btn { margin-top: 12px; }

/* ---------- Iranian plate input ---------- */
.checkout .plate-field { margin-top: 16px; }
.plate {
  display: flex; align-items: stretch;
  height: 64px; margin-top: 8px;
  background: #fff; color: #111;
  border: 2px solid #1a1a1a; border-radius: 10px;
  overflow: hidden;
}
.plate.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.plate-flag {
  flex: none; width: 32px;
  background: #1c4fa6; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 7px 0 6px;
  font: 700 7px/1.15 Arial, sans-serif; text-align: center;
}
.flag { display: flex; flex-direction: column; width: 18px; border-radius: 2px; overflow: hidden; }
.flag i { height: 4px; }
.flag i:nth-child(1) { background: #239f40; }
.flag i:nth-child(2) { background: #fff; }
.flag i:nth-child(3) { background: #da0000; }
.checkout .plate input, .checkout .plate select {
  display: block; min-width: 0; width: 0; height: 100%; min-height: 0;
  margin: 0; padding: 0;
  border: 0; border-radius: 0;
  background: transparent; color: #111;
  text-align: center; text-align-last: center;
  font: 800 1.65rem/1 var(--font);
  -webkit-appearance: none; appearance: none;
}
.checkout .plate input::placeholder { color: #cfc9c1; opacity: 1; }
.checkout .plate input:focus, .checkout .plate select:focus { outline: none; background: #fbf6e8; border: 0; }
.checkout .plate .p2 { flex: 2; }
.checkout .plate .pl { flex: 2.3; font-size: 1.4rem; cursor: pointer; }
.checkout .plate .pl.empty { color: #b5aea5; font-size: .95rem; font-weight: 600; }
.checkout .plate .p3 { flex: 3; }
.plate-region { flex: 1.9; display: flex; flex-direction: column; align-items: center; border-left: 2px solid #1a1a1a; }
.plate-region small { font-size: .7rem; font-weight: 700; line-height: 1; padding-top: 6px; color: #111; }
.checkout .plate .plate-region input { font-size: 1.4rem; height: auto; flex: 1; width: 100%; }

.plate-mini {
  display: flex; width: max-content; align-items: stretch;
  height: 32px; margin: 0 auto 14px;
  background: #fff; color: #111;
  border: 1.5px solid #1a1a1a; border-radius: 6px; overflow: hidden;
  font-weight: 800;
}
.pm-flag { width: 10px; background: #1c4fa6; }
.pm-main { display: flex; align-items: center; gap: 8px; padding: 0 10px; font-size: 1.05rem; }
.pm-main b { font-size: .95rem; }
.pm-region { display: flex; flex-direction: column; align-items: center; justify-content: center; border-left: 1.5px solid #1a1a1a; padding: 0 8px; font-size: .9rem; line-height: 1; }
.pm-region small { font-size: .5rem; }

/* ---------- glass mode (optional, set in the dashboard) ----------
   The cover photo/video is pinned behind the whole page (position: fixed, which also
   works on iPhone unlike background-attachment: fixed) and the content sits on frosted,
   see-through panels. Sheets (cart, plate form, order status) keep their solid colors. */
body.glass { background: #14110e; }
body.glass .top.cover { isolation: auto; overflow: visible; background: transparent; min-height: min(44vh, 380px); }
body.glass .cover-media { position: fixed; z-index: -1; }
body.glass .cover-media::after { background: linear-gradient(to bottom, rgba(0, 0, 0, calc(var(--dim) + .15)) 0%, rgba(0, 0, 0, var(--dim)) 40%, rgba(0, 0, 0, calc(var(--dim) + .2)) 100%); }
body.glass .top, body.glass .home, body.glass .cats, body.glass .menu, body.glass .active-order, body.glass .closed {
  --ink: #fff;
  --muted: rgba(255, 255, 255, .72);
  --line: rgba(255, 255, 255, .16);
  --line-strong: rgba(255, 255, 255, .32);
  --field: rgba(255, 255, 255, .12);
  --surface: rgba(255, 255, 255, .12);
  color: var(--ink);
}
body.glass .menu-card, body.glass .active-order, body.glass .menu {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
}
body.glass .menu { margin-top: 12px; border-radius: 24px 24px 0 0; border-bottom: 0; padding-bottom: 40px; min-height: 60vh; }
body.glass .cats { background: rgba(20, 16, 12, .35); }
body.glass .active-order .btn { color: #fff; }
body.glass .add { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .35); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
body.glass .stamp { background: rgba(0, 0, 0, .45); }
body.glass .closed { background: rgba(180, 56, 46, .55); color: #fff; }
body.glass .cat-back { color: #fff; }
/* Phones without frosted-glass support (or with "reduce transparency" on): plain tinted panels. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body.glass .menu-card, body.glass .active-order, body.glass .menu { background: rgba(20, 16, 12, .72); }
}
@media (prefers-reduced-transparency: reduce) {
  body.glass .menu-card, body.glass .active-order, body.glass .menu { background: rgba(20, 16, 12, .88); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 30; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px); opacity: 0;
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: .88rem; font-weight: 600;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- small phones ---------- */
@media (max-width: 380px) {
  .top, .hero, .home, .menu { padding-left: 16px; padding-right: 16px; }
  .cats { padding: 0 16px; gap: 18px; }
  .hero h2 { font-size: 1.4rem; }
  .card-img { width: 84px; height: 84px; }
  .checkout .plate input, .checkout .plate select { font-size: 1.4rem; }
  .checkout .plate .pl { font-size: 1.2rem; }
  .plate { height: 58px; }
  .cart-bar { inset-inline: 12px; font-size: .92rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- online payment ---------- */
.pay-choice { border: 0; margin: 20px 0 0; padding: 0; display: grid; gap: 8px; }
.pay-choice legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.pay-opt { display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); cursor: pointer; }
.pay-opt[hidden] { display: none; }
.pay-opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); flex: none; }
.pay-opt span { display: grid; gap: 2px; }
.pay-opt small { color: var(--muted); font-size: .8rem; font-weight: 400; }
.pay-opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 .5px var(--ink); }
.st-pay { margin: 14px 0 0; padding: 14px 16px; border-radius: 14px; font-size: .9rem; }
.st-pay > b { display: flex; align-items: center; gap: 8px; }
.st-pay.ok { background: var(--ok-soft); color: var(--ok); }
.st-pay.fail { background: var(--danger-soft); color: var(--danger); }
.st-pay.fail p { margin: 6px 0 0; color: var(--ink); font-size: .85rem; }
.st-pay dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 10px 0 0; color: var(--ink); }
.st-pay dt { color: var(--muted); }
.st-pay dd { margin: 0; font-weight: 600; text-align: left; overflow-wrap: anywhere; }
.st-pay .btn.block { margin-top: 10px; }
.testbank { max-width: 420px; margin: 8vh auto; padding: 28px 22px; background: var(--surface); border-radius: var(--radius); text-align: center; box-shadow: 0 10px 40px rgba(0, 0, 0, .08); }
.testbank h1 { font-size: 1.3rem; margin: 14px 0 6px; }
.testbank-warn { background: #fff4d6; color: #7a5800; padding: 8px 12px; border-radius: 10px; font-size: .85rem; font-weight: 700; margin: 0; }
.testbank-amount { font-size: 1.6rem; font-weight: 800; margin: 18px 0; }
.site-foot { display: flex; justify-content: center; padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
.site-foot img { display: block; background: #fff; border-radius: 12px; }
