/* ===== الهوية: ألوان مؤقتة (دافئة) لين توصل ألوان المطعم ===== */
:root {
  --brand: #9a3412;
  --brand-strong: #7c2d12;
  --on-brand: #ffffff;
  --accent: #b45309;
  --bg: #fffaf5;
  --bg-alt: #f8efe4;
  --surface: #ffffff;
  --text: #2a1f1a;
  --muted: #6b5a50;
  --border: #eaded2;
  --wa: #177a42;
  --on-wa: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(60 30 10 / .06), 0 6px 20px rgb(60 30 10 / .07);
  --font: "Tajawal", system-ui, "Segoe UI", Tahoma, sans-serif;
  --font-head: "Reem Kufi", "Tajawal", system-ui, sans-serif;
  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #fb923c;
    --brand-strong: #fdba74;
    --on-brand: #2a1206;
    --accent: #fbbf24;
    --bg: #171210;
    --bg-alt: #1f1916;
    --surface: #26201c;
    --text: #f3ebe4;
    --muted: #b3a397;
    --border: #3a302a;
    --wa: #25d366;
    --on-wa: #062b14;
    --shadow: 0 1px 2px rgb(0 0 0 / .4);
  }
}

:root[data-theme="dark"] {
  --brand: #fb923c;
  --brand-strong: #fdba74;
  --on-brand: #2a1206;
  --accent: #fbbf24;
  --bg: #171210;
  --bg-alt: #1f1916;
  --surface: #26201c;
  --text: #f3ebe4;
  --muted: #b3a397;
  --border: #3a302a;
  --wa: #25d366;
  --on-wa: #062b14;
  --shadow: 0 1px 2px rgb(0 0 0 / .4);
}

/* ===== الأساس ===== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

[hidden] { display: none !important; }

h1, h2, h3 { line-height: 1.35; margin: 0 0 .6em; }
h1, h2 { font-family: var(--font-head); font-weight: 700; }
h1 { font-size: clamp(2.2rem, 9vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand); }
img, svg, iframe { max-width: 100%; }

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 16px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -100px;
  background: var(--brand);
  color: var(--on-brand);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { top: 8px; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ===== الأزرار ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn svg { width: 22px; height: 22px; fill: currentColor; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-whatsapp { background: var(--wa); color: var(--on-wa); }
.btn-whatsapp:hover { background: var(--wa); filter: brightness(1.08); }
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-block { width: 100%; margin-top: 12px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* أيقونة الوضع: الشمس في الداكن، والقمر في الفاتح */
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}

/* ===== الرأس والقائمة (الجوال أولاً) ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: var(--on-brand); }

.header-actions { display: flex; gap: 8px; margin-inline-start: auto; }

.site-nav {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: none;
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 8px 16px 16px; }
.site-nav a {
  display: block;
  padding: 12px 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  border-radius: 8px;
}
.site-nav a:hover { background: var(--bg-alt); color: var(--brand); }

@media (min-width: 768px) {
  .menu-toggle { display: none; }
  .site-nav { position: static; display: block; background: none; border: 0; margin-inline-start: 24px; }
  .site-nav ul { display: flex; gap: 4px; padding: 0; }
  .site-nav a { padding: 8px 12px; }
}

/* ===== الترحيب ===== */
.hero {
  padding: 56px 0 64px;
  text-align: center;
  background:
    radial-gradient(70% 90% at 50% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    var(--bg);
}
.eyebrow { color: var(--accent); font-weight: 700; margin-bottom: .25em; }
.lead { font-size: 1.2rem; color: var(--muted); margin-inline: auto; max-width: 32ch; }
.subtitle { color: var(--muted); margin-inline: auto; max-width: 36ch; }
.section-intro { color: var(--muted); }
.hours-note { margin: 8px 0 0; font-size: .9rem; color: var(--muted); }
.footer-tagline { font-weight: 700; color: var(--text); margin-bottom: 4px !important; }
.about p { margin-bottom: .6em; }
.ramadan-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  font-weight: 700;
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
.hero-actions .btn { flex: 1 1 200px; max-width: 320px; }

@media (min-width: 768px) {
  .hero { padding: 96px 0 104px; }
  .hero-actions .btn { flex: 0 0 auto; }
}

/* ===== الأقسام ===== */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
@media (min-width: 768px) { .section { padding: 80px 0; } }

.notice {
  padding: 10px 14px;
  border: 1px dashed var(--accent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  font-weight: 400;
}

/* ===== المنيو ===== */
.chips {
  position: sticky;
  top: var(--header-h);
  z-index: 10;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -16px 24px;
  padding: 10px 16px;
  background: var(--bg-alt);
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chips a {
  flex: 0 0 auto;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.chips a:hover { border-color: var(--brand); color: var(--brand); }
.chips a.is-active { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

/* مسافة الإيقاف: الرأس محسوب في scroll-padding-top فوق، وهنا نزيد ارتفاع شريط التصنيفات
   عشان عنوان التصنيف يبان تحتهم. الارتفاع يتحسب في script.js، و ٦٤ احتياط لو ما اشتغل */
.menu-category { margin-bottom: 32px; scroll-margin-top: calc(var(--chips-h, 64px) + 8px); }
.menu-category h3 { font-size: 1.35rem; padding-bottom: 6px; border-bottom: 2px solid var(--border); }
.menu-empty { color: var(--muted); }

.menu-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 720px) { .menu-items { grid-template-columns: repeat(2, 1fr); gap: 16px; } }

.menu-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.menu-item img, .menu-item .img-placeholder {
  width: 88px;
  height: 88px;
  border-radius: 10px;
  object-fit: cover;
}
.img-placeholder {
  display: grid;
  place-items: center;
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 2rem;
}
.menu-item h4 { margin: 0; font-size: 1.05rem; }
.menu-item p { margin: 2px 0 6px; color: var(--muted); font-size: .95rem; line-height: 1.6; }
.price { font-weight: 700; color: var(--brand); }

/* ===== رمضان ===== */
.ramadan { background: color-mix(in srgb, var(--accent) 8%, var(--bg)); }
.ramadan-grid { display: grid; gap: 24px; }
@media (min-width: 900px) {
  .ramadan-grid { grid-template-columns: 1fr 1fr; }
  .ramadan-grid .menu-items { grid-template-columns: 1fr; }
}

/* ===== الدوام والموقع ===== */
.hours-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .hours-grid { grid-template-columns: 1fr 1.3fr; gap: 56px; } }

.hours-card {
  padding: 16px 20px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.hours-card h3 { font-size: 1.05rem; margin-bottom: .4em; }
.hours-list { margin: 0; }
.hours-list > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.hours-list > div:last-child { border-bottom: 0; }
.hours-list dt { font-weight: 700; }
.hours-list dd { margin: 0; color: var(--muted); }

.map {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
}
.map iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ===== عن المطعم ===== */
.about { max-width: 720px; text-align: center; }

/* ===== التذييل ===== */
.site-footer {
  border-top: 1px solid var(--border);
  /* مساحة تحت عشان زر الواتساب ما يغطي آخر سطر */
  padding: 28px 0 calc(96px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: .95rem;
}
.footer-inner { display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; }
.footer-inner p { margin: 0; }
.footer-contact { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.site-footer a { color: var(--muted); text-decoration: none; font-weight: 400; }
.site-footer a:hover { color: var(--brand); }
@media (min-width: 768px) {
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: start; }
  .footer-contact { flex-direction: row; gap: 24px; }
}

/* ===== زر الواتساب الثابت ===== */
.wa-float {
  position: fixed;
  inset-inline-end: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 0 20px 0 18px;
  border-radius: 999px;
  background: var(--wa);
  color: var(--on-wa);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 20px rgb(0 0 0 / .25);
}
.wa-float svg { width: 26px; height: 26px; fill: currentColor; }
.wa-float:hover { filter: brightness(1.08); }
