:root {
  --accent: #d7a24b;
  --accent-strong: #f3c779;
  --accent-soft: rgba(215, 162, 75, 0.18);
  --success: #4ade80;
  --danger: #ff6b6b;
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
  --shell: min(1240px, calc(100% - 32px));
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-theme="amber"] { --accent: #d7a24b; --accent-strong: #f6c87a; --accent-soft: rgba(215, 162, 75, 0.16); }
body[data-theme="red"] { --accent: #d95b5b; --accent-strong: #f28a8a; --accent-soft: rgba(217, 91, 91, 0.16); }
body[data-theme="green"] { --accent: #3bb273; --accent-strong: #7de4ab; --accent-soft: rgba(59, 178, 115, 0.16); }
body[data-theme="blue"] { --accent: #4c7df0; --accent-strong: #8aacff; --accent-soft: rgba(76, 125, 240, 0.16); }

body[data-mode="dark"] {
  --bg: #0a0b0f;
  --bg-soft: #11131a;
  --bg-card: rgba(18, 20, 29, 0.8);
  --bg-card-solid: #131722;
  --text: #f5f7fb;
  --text-soft: #b5bccb;
  --text-muted: #81889a;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.14);
  --hero-overlay: linear-gradient(180deg, rgba(8,9,13,.72), rgba(8,9,13,.92));
}

body[data-mode="light"] {
  --bg: #f6f7fb;
  --bg-soft: #eef1f7;
  --bg-card: rgba(255, 255, 255, 0.86);
  --bg-card-solid: #ffffff;
  --text: #111318;
  --text-soft: #515969;
  --text-muted: #81889a;
  --line: rgba(17,19,24,0.08);
  --line-strong: rgba(17,19,24,0.14);
  --hero-overlay: linear-gradient(180deg, rgba(246,247,251,.76), rgba(246,247,251,.95));
  --shadow: 0 20px 45px rgba(16, 24, 40, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(circle at top left, var(--accent-soft), transparent 30%), var(--bg);
  min-height: 100vh;
}
button, input, a { font: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.shell { width: var(--shell); margin: 0 auto; }
.page-backdrop {
  position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 15% 0%, rgba(255,255,255,0.05), transparent 30%), radial-gradient(circle at 100% 10%, var(--accent-soft), transparent 30%);
}
.hero {
  position: relative;
  min-height: 680px;
  background-image: var(--hero-overlay), var(--cover);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero-overlay { position: absolute; inset: 0; backdrop-filter: blur(4px); }
.topbar {
  position: relative;
  z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 0 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 14px; font-weight: 700;
}
.brand-mark {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  color: #120d05; background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  font-size: 1.35rem; box-shadow: 0 12px 30px rgba(0,0,0,.22);
}
.brand strong { display: block; font-size: 1.1rem; }
.brand small { display: block; color: var(--text-soft); font-size: .83rem; margin-top: 2px; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.icon-button, .theme-toggle {
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  color: var(--text);
  backdrop-filter: blur(20px);
  border-radius: 999px;
  padding: 11px 15px;
  min-width: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  transition: .25s ease;
}
.icon-button:hover, .theme-toggle:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.22); }
.theme-toggle-text { font-size: .92rem; }
.hero-content {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  gap: 28px; align-items: stretch;
  padding: 34px 0 72px;
}
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  border-radius: 30px;
}
.hero-copy { padding: 34px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  color: var(--accent-strong); font-size: .76rem; font-weight: 700; letter-spacing: .08em;
}
.hero-branding { display: flex; gap: 18px; align-items: center; margin: 26px 0 8px; }
.restaurant-logo {
  flex: 0 0 74px; width: 74px; height: 74px; border-radius: 22px;
  display: grid; place-items: center; font-size: 2rem; font-weight: 800;
  color: #120d05; background: linear-gradient(135deg, var(--accent-strong), var(--accent));
}
.status-line { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--text-soft); font-size: .95rem; }
.status, .mini-state {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: .84rem;
  border: 1px solid var(--line);
}
.status.open, .mini-state.open { color: #c9ffd8; background: rgba(46, 160, 67, .16); }
.status.closed, .mini-state.closed { color: #ffd3d3; background: rgba(205, 59, 59, .15); }
.hero-copy h1 { margin: 12px 0 0; font-size: clamp(2rem, 3.5vw, 3.25rem); line-height: 1.03; }
.hero-subtitle { margin: 8px 0 0; color: var(--text-soft); font-size: 1.05rem; }
.display-title { margin: 24px 0 0; font-size: clamp(2rem, 3vw, 3.5rem); line-height: 1.08; }
.hero-description { margin: 16px 0 0; max-width: 60ch; color: var(--text-soft); font-size: 1.04rem; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 28px; }
.primary-action {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent)); color: #120d05;
  font-weight: 800; border-radius: 999px; padding: 14px 22px;
  box-shadow: 0 14px 30px rgba(0,0,0,.22);
}
.service-note {
  padding: 12px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-soft);
  background: rgba(255,255,255,.03);
}
.feature-pills {
  margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.feature-pill {
  padding: 16px; border-radius: 22px; background: rgba(255,255,255,.03); border: 1px solid var(--line);
}
.feature-pill strong { display: block; font-size: .95rem; margin-bottom: 6px; }
.feature-pill small { color: var(--text-soft); line-height: 1.5; display: block; }
.hero-preview { padding: 24px; }
.preview-header, .preview-qr { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.preview-header small, .preview-qr small { display: block; color: var(--text-soft); margin-top: 4px; }
.preview-search {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 20px 0 16px;
  border-radius: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.04);
}
.preview-search input { background: transparent; border: 0; color: var(--text-soft); width: 100%; }
.preview-search input:focus { outline: none; }
.preview-tabs, .category-tabs {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.preview-tabs span, .category-tab {
  padding: 11px 14px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--text-soft); background: rgba(255,255,255,.03);
}
.preview-tabs .active, .category-tab.active {
  color: #120d05; background: linear-gradient(135deg, var(--accent-strong), var(--accent)); border-color: transparent; font-weight: 700;
}
.preview-products { display: grid; gap: 12px; margin-top: 18px; }
.preview-product {
  display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center;
  padding: 12px; border-radius: 18px; background: rgba(255,255,255,.03); border: 1px solid var(--line);
}
.preview-product img { width: 76px; height: 76px; object-fit: cover; border-radius: 16px; }
.preview-product h3 { margin: 0 0 6px; font-size: 1rem; }
.preview-product small { display: block; color: var(--text-soft); line-height: 1.45; margin-bottom: 6px; }
.preview-product strong { color: var(--accent-strong); }
.preview-qr {
  margin-top: 16px; padding: 16px; border-radius: 20px; border: 1px solid var(--line); background: rgba(255,255,255,.03);
}
.qr-badge {
  width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center;
  font-weight: 800; color: #120d05; background: linear-gradient(135deg, var(--accent-strong), var(--accent));
}
.menu-surface {
  position: relative; margin-top: -38px; z-index: 3;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 32px; padding: 26px; backdrop-filter: blur(22px); box-shadow: var(--shadow);
}
.menu-tools { display: grid; gap: 18px; }
.search-box {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 20px;
  background: var(--bg-card-solid); border: 1px solid var(--line);
}
.search-box input { width: 100%; border: 0; background: transparent; color: var(--text); }
.search-box input:focus { outline: none; }
.category-tab { cursor: pointer; color: var(--text-soft); }
.category-tab span { margin-right: 6px; }
.featured-section, .menu-section { margin-top: 28px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading span { color: var(--accent-strong); font-size: .79rem; font-weight: 800; letter-spacing: .08em; }
.section-heading h2 { margin: 6px 0 0; font-size: 1.6rem; }
.section-heading small { color: var(--text-soft); }
.featured-row {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
}
.featured-card, .product-card {
  border-radius: 24px; overflow: hidden; background: var(--bg-card-solid); border: 1px solid var(--line); cursor: pointer;
  box-shadow: 0 16px 40px rgba(0,0,0,.12); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.featured-card:hover, .product-card:hover, .featured-card:focus-visible, .product-card:focus-visible {
  transform: translateY(-2px); border-color: rgba(255,255,255,.18); outline: none;
}
.featured-card img { width: 100%; height: 260px; object-fit: cover; }
.featured-content { padding: 18px; }
.featured-content h3, .product-copy h3 { margin: 10px 0 8px; font-size: 1.12rem; }
.featured-content p, .product-copy p { margin: 0; color: var(--text-soft); line-height: 1.6; }
.product-badge, .mini-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px;
  color: #120d05; background: linear-gradient(135deg, var(--accent-strong), var(--accent)); font-size: .78rem; font-weight: 800;
}
.mini-badge { font-size: .72rem; padding: 6px 10px; }
.price-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.price-row strong { color: var(--accent-strong); font-size: 1.1rem; }
.price-row del { color: var(--text-muted); }
.product-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.product-card { display: grid; grid-template-columns: 180px 1fr; align-items: stretch; }
.product-image-wrap { position: relative; }
.product-image-wrap img { width: 100%; height: 100%; min-height: 190px; object-fit: cover; }
.product-copy { padding: 20px; }
.product-title-line { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.allergen-preview { display: block; margin-top: 12px; color: var(--text-muted); }
.sold-out {
  position: absolute; top: 14px; left: 14px; padding: 8px 12px; border-radius: 999px;
  background: rgba(17,19,24,.74); color: #fff; font-size: .78rem; font-weight: 800;
}
.detail-plus {
  position: absolute; right: 14px; bottom: 14px; width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.5rem; color: #120d05;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
}
.unavailable { opacity: .7; cursor: not-allowed; }
.empty-state {
  padding: 48px 20px; text-align: center; border-radius: 24px; border: 1px dashed var(--line-strong); color: var(--text-soft);
}
.empty-state span { font-size: 2rem; display: block; margin-bottom: 12px; }
.reassurance-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 22px 0 40px;
}
.reassurance-card {
  padding: 18px 20px; border-radius: 22px; background: var(--bg-card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.reassurance-card strong { display: block; margin-bottom: 8px; }
.reassurance-card small { display: block; color: var(--text-soft); line-height: 1.55; }
.footer { padding: 18px 0 34px; color: var(--text-soft); }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 24px; backdrop-filter: blur(20px);
}
.footer-brand { flex: 0 0 auto; }
.footer-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.modal {
  position: fixed; inset: 0; display: none; z-index: 40;
}
.modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.56); backdrop-filter: blur(12px); }
.modal-sheet {
  position: relative; z-index: 1; width: min(940px, calc(100% - 24px)); margin: min(7vh, 40px) auto 0;
  display: grid; grid-template-columns: minmax(260px, 340px) 1fr; overflow: hidden;
  border-radius: 30px; background: var(--bg-card-solid); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.modal-sheet img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.modal-body { padding: 24px; }
.modal-body h2 { margin: 12px 0 12px; font-size: 1.7rem; }
.modal-body p { color: var(--text-soft); line-height: 1.7; }
.allergens, .modal-options { display: grid; gap: 10px; margin-top: 18px; }
.allergens span, .option-group label {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line); color: var(--text-soft);
}
.option-group { display: grid; gap: 10px; }
.option-group strong { margin-top: 8px; }
.modal-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line);
}
.modal-footer strong { font-size: 1.35rem; color: var(--accent-strong); }
.modal-footer button {
  border: 0; border-radius: 999px; padding: 14px 18px; cursor: pointer; font-weight: 700;
  color: #120d05; background: linear-gradient(135deg, var(--accent-strong), var(--accent));
}
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(0,0,0,.45); color: #fff; font-size: 1.6rem; cursor: pointer; z-index: 2;
}
[hidden] { display: none !important; }

@media (max-width: 1080px) {
  .hero-content, .featured-row, .reassurance-grid { grid-template-columns: 1fr; }
  .product-list { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar { padding-top: 18px; }
  .brand-mark { width: 46px; height: 46px; border-radius: 14px; }
  .theme-toggle-text { display: none; }
  .hero { min-height: auto; }
  .hero-content { grid-template-columns: 1fr; padding-bottom: 28px; }
  .hero-copy, .hero-preview, .menu-surface { padding: 18px; border-radius: 24px; }
  .hero-branding { align-items: flex-start; }
  .restaurant-logo { width: 58px; height: 58px; border-radius: 18px; font-size: 1.45rem; }
  .display-title { font-size: 2rem; }
  .feature-pills { grid-template-columns: 1fr; }
  .menu-surface { margin-top: -18px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .featured-card img { height: 220px; }
  .product-card { grid-template-columns: 1fr; }
  .product-image-wrap img { min-height: 220px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .modal-sheet { grid-template-columns: 1fr; margin-top: 12px; }
  .modal-sheet img { min-height: 220px; }
  .modal-footer { flex-direction: column; align-items: stretch; }
}

/* v3 feature additions */
body { --accent: var(--custom-accent, #d7a24b); }
body[data-radius="medium"] { --radius: 16px; --radius-sm: 12px; }
body[data-radius="square"] { --radius: 6px; --radius-sm: 4px; }
body[data-font-scale="compact"] { font-size: 14px; }
body[data-font-scale="large"] { font-size: 17px; }
body[data-background-style="plain"] { background-image: none; }
body[data-background-style="texture"] { background-image: linear-gradient(135deg, rgba(255,255,255,.025) 25%, transparent 25%), linear-gradient(225deg, rgba(255,255,255,.025) 25%, transparent 25%); background-size: 24px 24px; }
body[data-card-style="outline"] .glass-card,
body[data-card-style="outline"] .menu-surface,
body[data-card-style="outline"] .featured-card,
body[data-card-style="outline"] .product-card,
body[data-card-style="outline"] .campaign-card { box-shadow: none; background: transparent; border-color: var(--line-strong); }
body[data-card-style="minimal"] .glass-card,
body[data-card-style="minimal"] .menu-surface,
body[data-card-style="minimal"] .featured-card,
body[data-card-style="minimal"] .product-card { box-shadow: none; border-color: transparent; }
body[data-hero-style="compact"] .hero { min-height: 470px; }
body[data-hero-style="compact"] .hero-content { grid-template-columns: 1fr; max-width: 900px; }
body[data-hero-style="compact"] .hero-preview { display: none; }

.brand-logo-image { width: 54px; height: 54px; object-fit: contain; border-radius: 16px; background: var(--bg-card); border: 1px solid var(--line); padding: 6px; }
.restaurant-logo-image { width: 74px; height: 74px; object-fit: contain; border-radius: 22px; background: var(--bg-card-solid); border: 1px solid var(--line); padding: 8px; }
.language-menu { position: relative; }
.language-button { border: 1px solid var(--line-strong); background: var(--bg-card); color: var(--text); border-radius: 999px; padding: 11px 15px; cursor: pointer; }
.language-dropdown { position: absolute; right: 0; top: calc(100% + 10px); min-width: 160px; padding: 8px; border-radius: 18px; background: var(--bg-card-solid); border: 1px solid var(--line); box-shadow: var(--shadow); display: none; z-index: 20; }
[dir="rtl"] .language-dropdown { right: auto; left: 0; }
.language-dropdown.open { display: grid; }
.language-dropdown a { padding: 11px 12px; border-radius: 12px; color: var(--text-soft); }
.language-dropdown a:hover, .language-dropdown a.active { background: var(--accent-soft); color: var(--text); }

.campaign-section { margin-bottom: 28px; }
.campaign-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.campaign-card { position: relative; min-height: 250px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background-image: var(--campaign-image); background-size: cover; background-position: center; box-shadow: var(--shadow); }
.campaign-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,8,12,.92), rgba(6,8,12,.25)); }
[dir="rtl"] .campaign-overlay { background: linear-gradient(270deg, rgba(6,8,12,.92), rgba(6,8,12,.25)); }
.campaign-content { position: relative; z-index: 1; width: min(520px, 78%); padding: 28px; color: #fff; }
.campaign-content h3 { margin: 16px 0 10px; font-size: 1.7rem; }
.campaign-content p { margin: 0; color: rgba(255,255,255,.78); line-height: 1.65; }
.campaign-content small { display: inline-block; margin-top: 18px; color: rgba(255,255,255,.62); }

.modal-options-heading { margin: 22px 0 12px; font-size: 1.05rem; }
.option-group { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; background: var(--input-bg, rgba(255,255,255,.03)); }
.option-group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.option-group-head small { color: var(--accent-strong); }
.option-choice { display: grid !important; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; cursor: pointer; }
.option-choice input { accent-color: var(--accent); }
.option-choice small { color: var(--accent-strong); }
.option-choice:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.modal-footer > div small { display: block; color: var(--text-muted); margin-bottom: 4px; }

.waiter-call-button { position: fixed; right: 24px; bottom: 24px; z-index: 35; display: flex; align-items: center; gap: 12px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; padding: 12px 18px 12px 12px; color: #120d05; background: linear-gradient(135deg, var(--accent-strong), var(--accent)); box-shadow: 0 18px 40px rgba(0,0,0,.3); cursor: pointer; }
[dir="rtl"] .waiter-call-button { right: auto; left: 24px; padding: 12px 12px 12px 18px; }
.waiter-call-button:disabled { opacity: .75; cursor: wait; }
.waiter-call-button.sent { box-shadow: 0 0 0 6px var(--accent-soft), 0 18px 40px rgba(0,0,0,.3); }
.waiter-call-button strong, .waiter-call-button small { display: block; text-align: left; }
[dir="rtl"] .waiter-call-button strong, [dir="rtl"] .waiter-call-button small { text-align: right; }
.waiter-call-button small { opacity: .7; font-size: .75rem; margin-top: 2px; }
.waiter-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(18,13,5,.12); font-size: 1.3rem; }
.toast { position: fixed; left: 50%; bottom: 100px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; min-width: min(380px, calc(100% - 32px)); padding: 15px 18px; border-radius: 16px; background: #183b2b; color: #d8ffe7; border: 1px solid rgba(89,220,145,.28); box-shadow: var(--shadow); transition: .25s ease; text-align: center; }
.toast.error { background: #4a2020; color: #ffdcdc; border-color: rgba(255,107,107,.28); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

[dir="rtl"] .status-line, [dir="rtl"] .price-row, [dir="rtl"] .top-actions, [dir="rtl"] .hero-branding { direction: rtl; }
[dir="rtl"] .product-title-line, [dir="rtl"] .section-heading, [dir="rtl"] .modal-footer { flex-direction: row-reverse; }

@media (max-width: 900px) { .campaign-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .brand-logo-image { width: 46px; height: 46px; }
  .restaurant-logo-image { width: 58px; height: 58px; }
  .campaign-card { min-height: 220px; }
  .campaign-content { width: 92%; padding: 22px; }
  .waiter-call-button { right: 14px; bottom: 14px; }
  [dir="rtl"] .waiter-call-button { right: auto; left: 14px; }
}
