/* ==========================================================================
   Restaurant Menu SaaS — design system
   ========================================================================== */

:root {
  --bg: #f6f7f9;
  --bg-tint: #eef1f5;
  --surface: #ffffff;
  --surface-2: #fbfbfc;
  --text: #14181f;
  --text-soft: #4b5563;
  --muted: #8b94a3;
  --border: #e7e9ee;
  --border-strong: #d6dae1;

  --primary: #e11d48;
  --primary-600: #c81a41;
  --primary-050: #fff1f4;
  --primary-ink: #ffffff;

  --ok: #0f9d58;
  --ok-bg: #e7f7ee;
  --danger: #dc2626;
  --danger-bg: #fdecec;
  --warn-bg: #fef6e7;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .07), 0 2px 4px rgba(16, 24, 40, .04);
  --shadow-lg: 0 18px 40px -12px rgba(16, 24, 40, .18), 0 8px 16px -8px rgba(16, 24, 40, .10);

  --ring: 0 0 0 4px rgba(225, 29, 72, .14);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font: "Tajawal", system-ui, -apple-system, "Segoe UI", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { line-height: 1.3; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; margin: .2em 0 .6em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; margin: 0 0 .6em; }
p { margin: .4em 0 .9em; }
a { color: var(--primary); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--primary-600); }
img { max-width: 100%; display: block; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: var(--bg-tint); padding: .12em .45em; border-radius: 6px; font-size: .88em;
  direction: ltr; display: inline-block;
}
hr { border: none; border-top: 1px solid var(--border); margin: 18px 0; }

/* ---------- layout ---------- */
.container { max-width: 1080px; margin: 0 auto; padding: 28px 18px 64px; }
.container-narrow { max-width: 440px; margin: 0 auto; padding: 24px 18px 64px; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.muted { color: var(--muted); }
.soft { color: var(--text-soft); }
.right { text-align: end; }
.center { text-align: center; }
.inline { display: inline; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.stack { display: grid; gap: 6px; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar .inner {
  max-width: 1080px; margin: 0 auto; padding: 12px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.brand { font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: -.02em; }
.brand:hover { color: var(--text); }
.nav { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.nav a {
  padding: 8px 12px; border-radius: 9px; color: var(--text-soft);
  font-weight: 600; font-size: .9rem; transition: background .15s var(--ease), color .15s var(--ease);
}
.nav a:hover { background: var(--bg-tint); color: var(--text); }
.nav a.active { background: var(--primary-050); color: var(--primary-600); }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--primary);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--btn-bg); color: var(--primary-ink);
  font: inherit; font-weight: 700; font-size: .92rem; line-height: 1;
  cursor: pointer; white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: transform .12s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease);
}
.btn:hover { background: var(--primary-600); box-shadow: var(--shadow-md); transform: translateY(-1px); text-decoration: none; color: #fff; }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-xs); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: .82rem; border-radius: 8px; }
.btn-lg { padding: 13px 22px; font-size: 1rem; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-ghost:hover { background: var(--surface); color: var(--text); border-color: var(--muted); }
.btn-muted { background: var(--bg-tint); color: var(--text-soft); }
.btn-muted:hover { background: var(--border); color: var(--text); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; color: #fff; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 22px; margin-bottom: 18px;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-flush { padding: 0; overflow: hidden; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); }

/* ---------- grid / stats ---------- */
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; inset-inline-start: 0; inset-block: 14px;
  width: 3px; border-radius: 3px; background: var(--primary); opacity: .0; transition: opacity .2s;
}
.stat:hover::before { opacity: .5; }
.stat .n { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: .85rem; font-weight: 600; }

/* ---------- forms ---------- */
label { display: block; font-weight: 700; font-size: .86rem; color: var(--text-soft); margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=search], input[type=url], textarea, select {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font: inherit; color: var(--text); background: var(--surface);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  appearance: none;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height: 96px; resize: vertical; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b94a3' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 12px center; padding-left: 36px;
}
input[type=color] {
  width: 56px; height: 44px; padding: 4px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); cursor: pointer; background: var(--surface);
}
input[type=file] {
  width: 100%; font-size: .88rem; color: var(--text-soft);
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 12px;
  background: var(--surface-2); cursor: pointer;
}
input[type=file]::file-selector-button {
  font: inherit; font-weight: 700; margin-inline-end: 12px; padding: 8px 14px;
  border: none; border-radius: 8px; background: var(--bg-tint); color: var(--text); cursor: pointer;
}
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); }
.hint { color: var(--muted); font-size: .8rem; margin-top: 5px; }
.field-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.field-row > * { flex: 1; min-width: 150px; }
.field-row > .btn { flex: 0 0 auto; }

/* ---------- auth pages ---------- */
.auth-wrap {
  min-height: calc(100vh - 58px);
  display: grid; place-items: center;
  padding: 40px 18px;
  background:
    radial-gradient(60% 50% at 100% 0%, rgba(225, 29, 72, .10), transparent 70%),
    radial-gradient(50% 50% at 0% 100%, rgba(56, 132, 255, .08), transparent 70%),
    var(--bg);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 32px 30px;
}
.auth-card .logo-badge {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  font-size: 1.6rem; background: linear-gradient(140deg, var(--primary), #ff6b8a);
  box-shadow: 0 8px 20px -6px rgba(225, 29, 72, .5); margin-bottom: 16px;
}
.auth-card h1 { font-size: 1.45rem; margin: 0 0 4px; }
.auth-card .sub { color: var(--muted); font-size: .92rem; margin: 0 0 18px; }
.auth-card .foot { margin: 18px 0 0; font-size: .9rem; color: var(--text-soft); text-align: center; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: start; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: .9rem; }
th { color: var(--muted); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); }
tbody tr { transition: background .12s var(--ease); }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }
.card table, .card .table-wrap { border: none; }
.card .table-wrap { border: 1px solid var(--border); }

/* ---------- badges / alerts ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-bg); color: #0b7a44; }
.badge-off { background: var(--danger-bg); color: #b42318; }
.badge-muted { background: var(--bg-tint); color: var(--text-soft); }

.alert { padding: 12px 15px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 600; font-size: .9rem; display: flex; gap: 9px; align-items: flex-start; border: 1px solid transparent; }
.alert::before { font-weight: 800; }
.alert-error { background: var(--danger-bg); color: #b42318; border-color: #f7cfca; }
.alert-error::before { content: "!"; }
.alert-ok { background: var(--ok-bg); color: #0b7a44; border-color: #b9e6cd; }
.alert-ok::before { content: "\2713"; }

/* ---------- misc dashboard bits ---------- */
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.thumb-sm { width: 42px; height: 42px; object-fit: cover; border-radius: 9px; border: 1px solid var(--border); }
.avatar {
  width: 90px; height: 90px; object-fit: cover; border-radius: 16px; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }

/* AI description controls (product form) */
.ai-controls { border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 8px; background: var(--surface-2); }
.ai-status { margin-top: 8px; font-size: .84rem; font-weight: 600; padding: 7px 10px; border-radius: 8px; }
.ai-status--load { background: var(--warn-bg); color: #92600e; }
.ai-status--ok { background: var(--ok-bg); color: #0b7a44; }
.ai-status--err { background: var(--danger-bg); color: #b42318; }
#aiGenBtn:disabled { opacity: .6; cursor: default; }

/* menu-template picker (restaurant settings) */
.tpl-picker { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tpl-opt {
  display: flex; gap: 12px; align-items: center; margin: 0; padding: 12px;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.tpl-opt:hover { border-color: var(--muted); }
.tpl-opt.is-on { border-color: var(--primary); background: var(--primary-050); }
.tpl-opt input { position: absolute; opacity: 0; pointer-events: none; }
.tpl-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tpl-meta strong { font-size: .92rem; }
.tpl-meta span { font-size: .76rem; color: var(--muted); line-height: 1.4; }
.tpl-thumb {
  flex: 0 0 auto; width: 46px; height: 56px; border-radius: 6px; padding: 5px;
  background: #f3ede4; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px;
}
.tpl-thumb i { display: block; background: #cdbfa8; border-radius: 2px; height: 8px; }
.tpl-thumb i:first-child { height: 14px; background: #b7a98c; }
.tpl-thumb--classic i { height: 9px; }
.tpl-thumb--classic i:first-child { height: 16px; background: var(--primary); opacity: .55; }
.tpl-thumb--cards { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.tpl-thumb--cards i { height: 100%; background: #cdbfa8; }
.tpl-thumb--cards i:first-child { background: var(--primary); opacity: .5; }
.tpl-thumb--simple i { height: 5px; }
.tpl-thumb--simple i:first-child { height: 12px; background: var(--primary); opacity: .5; }
.tpl-thumb--dark { background: #201d16; border-color: #3a352b; }
.tpl-thumb--dark i { background: #4a4436; }
.tpl-thumb--dark i:first-child { height: 16px; background: #d8b877; }
.sortable-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 10px; box-shadow: var(--shadow-xs); transition: box-shadow .15s var(--ease), border-color .15s;
}
.sortable-item:hover { box-shadow: var(--shadow-sm); }
.sortable-item.dragging { opacity: .45; }
.drag-handle { cursor: grab; color: var(--muted); font-size: 1.2rem; line-height: 1; touch-action: none; }
.drag-handle:active { cursor: grabbing; }

/* ---------- hero / marketing ---------- */
.hero { text-align: center; padding: 70px 16px 40px; }
.hero .eyebrow {
  display: inline-block; padding: 5px 13px; border-radius: 999px; background: var(--primary-050);
  color: var(--primary-600); font-weight: 700; font-size: .8rem; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-bottom: 12px; }
.hero p { color: var(--text-soft); font-size: 1.08rem; max-width: 540px; margin: 0 auto 24px; }
.hero .btn { margin: 5px; }
.feature-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 26px; }
.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm); text-align: start;
}
.feature .ic { font-size: 1.5rem; margin-bottom: 8px; }
.feature .t { font-weight: 700; }
.feature .d { color: var(--muted); font-size: .88rem; }

.center-box {
  max-width: 440px; margin: 12vh auto; text-align: center;
  padding: 36px 28px;
}
.center-box h1 { font-size: 3rem; margin: 0; }

/* ---------- QR ---------- */
.qr-box { text-align: center; }
.qr-frame {
  display: inline-block; padding: 16px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.qr-frame img { width: 240px; max-width: 60vw; }

/* ==========================================================================
   Public menu — mobile first
   ========================================================================== */
body.menu-body {
  --hero: var(--primary);
  --paper: #fbf7f2;
  --card: #ffffff;
  --m-ink: #23201d;
  --m-soft: #6f665c;
  --m-faint: #a89e92;
  --m-line: #ede4d8;
  --m-sold: #b23b3b;
  --heading: "Cairo", "Tajawal", system-ui, sans-serif;
  background: var(--paper);
  color: var(--m-ink);
}

.menu-page { max-width: 680px; margin: 0 auto; background: var(--card); min-height: 100vh; box-shadow: 0 0 60px -20px rgba(35,32,29,.18); }

/* ---- hero ---- */
.menu-hero {
  position: relative; overflow: hidden;
  padding: 44px 26px 34px; text-align: center;
  background: var(--hero);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--hero) 14%, var(--paper)), var(--card) 92%);
  border-bottom: 1px solid var(--m-line);
}
@supports not (color: color-mix(in srgb, red, blue)) {
  .menu-hero { background: var(--paper); }
}
.menu-hero__logo {
  width: 96px; height: 96px; object-fit: cover; border-radius: 50%;
  background: #fff; margin: 0 auto 14px; padding: 5px;
  border: 1px solid var(--m-line);
  box-shadow: 0 12px 30px -12px rgba(35,32,29,.35);
}
.menu-hero h1 {
  font-family: var(--heading); font-weight: 900; font-size: 1.85rem;
  margin: 0 0 6px; color: var(--m-ink); letter-spacing: -.01em; text-wrap: balance;
}
.menu-hero__desc { margin: 0 auto; max-width: 42ch; font-size: .95rem; line-height: 1.6; color: var(--m-soft); }
.menu-hero__meta {
  margin-top: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}
.menu-hero__meta span {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .8rem; font-weight: 600; color: var(--m-soft);
  background: color-mix(in srgb, var(--hero) 10%, #fff);
  border: 1px solid var(--m-line); border-radius: 999px; padding: 4px 11px;
}

/* ---- body / tabs ---- */
.menu-sheet { position: relative; padding: 0 22px 8px; }

.menu-tabs {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none;
  padding: 12px 22px; margin: 0 -22px 4px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--m-line);
}
.menu-tabs::-webkit-scrollbar { display: none; }
.menu-tabs a {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 999px;
  font-size: .82rem; font-weight: 700; white-space: nowrap;
  color: var(--m-soft); border: 1px solid var(--m-line); background: var(--paper);
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.menu-tabs a:hover { color: var(--m-ink); text-decoration: none; }
.menu-tabs a.is-active {
  background: var(--hero); color: #fff; border-color: var(--hero);
}

/* ---- sections & rows ---- */
.menu-section { padding: 24px 0 8px; scroll-margin-top: 60px; }
.menu-section__title {
  font-family: var(--heading); font-size: 1.15rem; font-weight: 800;
  margin: 0 0 6px; color: var(--m-ink);
  display: flex; align-items: center; gap: 10px;
}
.menu-section__title span {
  flex: 0 0 auto; width: 22px; height: 3px; border-radius: 3px; background: var(--hero);
}
.menu-section__title::after { content: ""; flex: 1; height: 1px; background: var(--m-line); }

.menu-list { list-style: none; margin: 6px 0 0; padding: 0; }
.menu-row { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--m-line); }
.menu-row:last-child { border-bottom: none; }
.menu-row.is-unavailable { opacity: .52; }
.menu-row__img {
  width: 82px; height: 82px; flex-shrink: 0; object-fit: cover;
  border-radius: 12px; background: var(--paper); border: 1px solid var(--m-line);
}
.menu-row__body { flex: 1; min-width: 0; }
.menu-row__head { display: flex; align-items: baseline; gap: 6px; }
.menu-row__name { font-weight: 700; font-size: 1rem; color: var(--m-ink); }
.menu-row__dots {
  flex: 1; min-width: 14px; align-self: center; margin-top: 6px;
  border-bottom: 1px dotted var(--m-faint);
}
.menu-row__price {
  font-weight: 800; font-size: 1rem; white-space: nowrap; color: var(--m-ink);
  font-variant-numeric: tabular-nums;
}
.menu-row__price i {
  font-style: normal; font-weight: 600; font-size: .78em; color: var(--m-faint);
  margin-inline-start: 3px;
}
.menu-row__desc { margin: 3px 0 0; color: var(--m-soft); font-size: .86rem; line-height: 1.55; }
.menu-row__tag {
  display: inline-block; margin-top: 6px; font-size: .7rem; font-weight: 700;
  color: var(--m-sold); border: 1px solid color-mix(in srgb, var(--m-sold) 35%, #fff);
  background: color-mix(in srgb, var(--m-sold) 8%, #fff);
  padding: 2px 9px; border-radius: 999px;
}

.menu-empty { text-align: center; color: var(--m-soft); padding: 70px 20px; }
.menu-empty .ic { font-size: 2.4rem; }
.menu-credit {
  text-align: center; color: var(--m-faint); font-size: .74rem; letter-spacing: .02em;
  padding: 26px 16px 24px; margin: 10px -22px 0; border-top: 1px solid var(--m-line);
}
.menu-credit a { color: var(--m-soft); font-weight: 700; }

/* ---- contact actions ---- */
.menu-contact { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.menu-contact__btn {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .86rem;
  padding: 9px 16px; border-radius: 999px; background: #fff; color: var(--m-ink);
  border: 1px solid var(--m-line); box-shadow: 0 6px 16px -10px rgba(0,0,0,.4);
}
.menu-contact__btn:hover { text-decoration: none; }
.menu-contact__btn--wa { background: #25d366; color: #fff; border-color: #25d366; }
.tpl-dark .menu-contact__btn { background: rgba(255,255,255,.06); color: var(--m-ink); border-color: var(--m-line); }
.tpl-dark .menu-contact__btn--wa { background: #25d366; color: #fff; }

/* ---- per-product WhatsApp order button ---- */
.order-wa-btn {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  font-weight: 700; font-size: .82rem; padding: 7px 13px; border-radius: 10px;
  background: #25d366; color: #fff;
}
.order-wa-btn:hover { background: #1fb457; text-decoration: none; }
.tpl-cards .order-wa-btn { width: 100%; justify-content: center; margin-top: 10px; }

/* ---- trial lock ---- */
.trial-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  text-align: center; margin: 14px 0 2px; padding: 10px 14px; border-radius: 12px;
  background: var(--warn-bg); color: #8a5a00; font-size: .84rem; font-weight: 600;
  border: 1px solid #f0dcae;
}
.trial-banner--expired { background: var(--danger-bg); color: #b42318; border-color: #f3c9c3; flex-direction: column; gap: 4px; padding: 14px; }
.trial-banner--expired strong { font-size: 1rem; }
.trial-banner .btn { background: var(--hero); }

.menu-row--locked { opacity: 1; }
.menu-row--locked .menu-row__name { color: var(--m-soft); }
.menu-row__img--locked {
  position: relative; display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center; background-color: var(--m-line);
  filter: none;
}
.menu-row__img--locked::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: rgba(20,18,14,.55); backdrop-filter: blur(1px);
}
.menu-row__img--locked .lock-ic {
  position: relative; z-index: 1; font-size: 1.3rem; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
}
.locked-cta { margin-top: 8px; background: var(--hero); }
.tpl-cards .menu-row--locked .menu-row__img--locked { height: 130px; }
.tpl-simple .menu-row--locked .menu-row__img--locked { display: flex; width: 44px; height: 44px; }

/* ---- floating upgrade CTA + sticky contact bar ---- */
.menu-upgrade-fab {
  position: fixed; z-index: 20; left: 50%; transform: translateX(-50%);
  bottom: 16px; padding: 11px 20px; border-radius: 999px; font-weight: 800; font-size: .9rem;
  background: var(--hero); color: #fff; box-shadow: 0 10px 30px -8px rgba(0,0,0,.4);
}
.menu-upgrade-fab:hover { text-decoration: none; filter: brightness(.95); }
.has-contact-bar .menu-upgrade-fab { bottom: 64px; }

.menu-contact-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 19; display: none;
  background: #fff; border-top: 1px solid var(--m-line); padding: 8px;
  gap: 8px;
}
.menu-contact-bar a {
  flex: 1; text-align: center; font-weight: 700; font-size: .88rem; padding: 11px 8px;
  border-radius: 10px; background: var(--bg-tint); color: var(--m-ink);
}
.menu-contact-bar a.is-wa { background: #25d366; color: #fff; }
@media (max-width: 620px) {
  .menu-contact-bar { display: flex; }
  .has-contact-bar .menu-sheet { padding-bottom: 70px; }
}

/* ---- subscribe page ---- */
.subscribe-plans { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 20px; }
.plan { border: 1px solid var(--m-line); border-radius: 16px; padding: 20px; background: var(--card); }
.plan--featured { border-color: var(--hero); box-shadow: 0 12px 30px -14px rgba(0,0,0,.25); }
.plan__name { font-weight: 800; font-size: 1.1rem; }
.plan__price { font-size: 1.6rem; font-weight: 800; margin: 4px 0 12px; }
.plan__price span { font-size: .8rem; font-weight: 600; color: var(--m-soft); }
.plan ul { margin: 0 0 16px; padding-inline-start: 18px; color: var(--m-soft); font-size: .9rem; line-height: 1.9; }

@media (max-width: 560px) {
  .menu-page { box-shadow: none; }
  .menu-hero { padding: 38px 20px 30px; }
  .menu-hero h1 { font-size: 1.6rem; }
  .menu-sheet { padding-inline: 16px; }
  .menu-tabs { margin-inline: -16px; padding-inline: 16px; }
  .menu-credit { margin-inline: -16px; }
  .menu-row__img { width: 72px; height: 72px; }
}

@media (max-width: 620px) {
  .topbar .inner { flex-wrap: wrap; }
  .nav a { padding: 7px 9px; font-size: .82rem; }
  h1 { font-size: 1.4rem; }
}

/* ==========================================================================
   Menu templates — owner-selectable, layered over the classic base above
   ========================================================================== */

/* ---- TEMPLATE: بطاقات / cards — image-forward 2-col grid ---- */
.tpl-cards .menu-list {
  display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); margin-top: 12px;
}
.tpl-cards .menu-row {
  flex-direction: column; gap: 0; padding: 0; border: 1px solid var(--m-line);
  border-radius: 14px; overflow: hidden; background: var(--card);
  box-shadow: 0 1px 2px rgba(35,32,29,.05);
}
.tpl-cards .menu-row__img {
  width: 100%; height: 130px; border: none; border-radius: 0;
}
.tpl-cards .menu-row:not(:has(.menu-row__img)) .menu-row__body { padding-top: 14px; }
.tpl-cards .menu-row__body { padding: 12px 13px 14px; }
.tpl-cards .menu-row__head { flex-wrap: wrap; gap: 2px 8px; }
.tpl-cards .menu-row__dots { display: none; }
.tpl-cards .menu-row__name { font-size: .96rem; }
.tpl-cards .menu-row__price {
  width: 100%; margin-top: 2px; color: var(--hero); font-size: .98rem;
}
.tpl-cards .menu-row__desc {
  font-size: .82rem; display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
@media (max-width: 460px) {
  .tpl-cards .menu-list { grid-template-columns: 1fr; }
  .tpl-cards .menu-row__img { height: 150px; }
}

/* ---- TEMPLATE: قائمة مبسّطة / simple — text only, compact ---- */
.tpl-simple .menu-row__img { display: none; }
.tpl-simple .menu-row { padding: 11px 0; }
.tpl-simple .menu-section { padding: 18px 0 4px; }
.tpl-simple .menu-hero { padding: 34px 22px 26px; }
.tpl-simple .menu-hero__logo { width: 76px; height: 76px; }
.tpl-simple .menu-hero h1 { font-size: 1.5rem; }
.tpl-simple .menu-row__desc { margin-top: 1px; }
.tpl-simple .menu-row__price { color: var(--hero); }

/* ---- TEMPLATE: داكن فاخر / dark ---- */
.tpl-dark {
  --paper: #16130d;
  --card: #1d1a12;
  --m-ink: #f0e9db;
  --m-soft: #b6ab95;
  --m-faint: #6f6653;
  --m-line: #35301f;
  --gold: #d8b877;
}
.tpl-dark .menu-page { box-shadow: 0 0 80px -20px rgba(0,0,0,.6); }
.tpl-dark .menu-hero {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--hero) 24%, #0d0b07), var(--card) 92%);
  border-bottom: 1px solid var(--m-line);
}
@supports not (color: color-mix(in srgb, red, blue)) {
  .tpl-dark .menu-hero { background: #0d0b07; }
}
.tpl-dark .menu-hero__logo { border-color: var(--m-line); box-shadow: 0 12px 30px -12px #000; }
.tpl-dark .menu-hero__meta span {
  background: rgba(255,255,255,.04); border-color: var(--m-line); color: var(--m-soft);
}
.tpl-dark .menu-tabs {
  background: color-mix(in srgb, var(--card) 82%, transparent); border-bottom-color: var(--m-line);
}
.tpl-dark .menu-tabs a { background: rgba(255,255,255,.03); border-color: var(--m-line); color: var(--m-soft); }
.tpl-dark .menu-tabs a.is-active { background: var(--gold); border-color: var(--gold); color: #17130a; }
.tpl-dark .menu-section__title span { background: var(--gold); }
.tpl-dark .menu-section__title::after { background: var(--m-line); }
.tpl-dark .menu-row__img { border-color: var(--m-line); }
.tpl-dark .menu-row__dots { border-bottom-color: var(--m-faint); }
.tpl-dark .menu-row__price { color: var(--gold); }
.tpl-dark .menu-row__price i { color: var(--m-faint); }
.tpl-dark .menu-row__tag {
  color: #ffb4a8; border-color: rgba(255,120,100,.35); background: rgba(255,90,70,.12);
}
.tpl-dark .menu-credit a { color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
