/* =========================================================
   دار النعناع · Dar Naanaa — الأنماط
   الهاتف أولاً: كل القواعد مكتوبة للهاتف، ثم @media للشاشات الأكبر.
   الاتجاه (يمين/يسار) يُدار بخصائص منطقية (inline-start / inline-end)
   حتى يعمل التصميم نفسه بالعربية والفرنسية.
   ========================================================= */

:root {
  --mint: #2F7D5B;
  --mint-dark: #1F4D3A;
  --mint-light: #8FD3B0;
  --clay: #B5532E;
  --saffron: #E3A72F;
  --cream: #FBF6EC;
  --cream-deep: #F3EAD8;
  --ink: #2B2420;
  --ink-soft: #5E534C;

  --font-title: "El Messiri", "Tajawal", system-ui, sans-serif;
  --font-body: "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 6px 20px rgba(31, 77, 58, .10);
  --header-h: 128px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--cream);
  /* نقش زليج خفيف جداً، مرسوم بـ SVG بدون صور */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%232F7D5B' stroke-opacity='.07' stroke-width='1.2'%3E%3Cpath d='M28 6l6.5 15.5L50 28l-15.5 6.5L28 50l-6.5-15.5L6 28l15.5-6.5z'/%3E%3Crect x='17' y='17' width='22' height='22' transform='rotate(45 28 28)'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--mint); }
h1, h2, h3 { font-family: var(--font-title); line-height: 1.25; color: var(--mint-dark); margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 7vw, 3rem); }
h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); }

.container { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 18px; }
.narrow { max-width: 640px; }

:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; border-radius: 6px; }

/* ---------- الرأس ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--mint-dark);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}

.concept-badge {
  background: var(--saffron);
  color: var(--ink);
  text-align: center;
  font-weight: 700;
  font-size: .85rem;
  padding: 4px 10px;
  letter-spacing: .02em;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 10px;
}

.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand-icon { width: 40px; height: 40px; color: #fff; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-title); font-size: 1.35rem; font-weight: 700; }
.brand-sub { font-size: .68rem; letter-spacing: .18em; opacity: .8; direction: ltr; }

.lang-switch {
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  color: var(--mint-dark);
  background: var(--cream);
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  min-height: 44px;
  cursor: pointer;
}
.lang-switch:hover { background: #fff; }

.quick-nav {
  display: flex;
  gap: 6px;
  padding-bottom: 8px;
  overflow-x: auto;
}
.quick-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  white-space: nowrap;
}
.quick-nav a:hover { background: rgba(255,255,255,.22); }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn .ico { width: 20px; height: 20px; flex-shrink: 0; }
.btn-primary { background: var(--mint); color: #fff; }
.btn-primary:hover { background: var(--mint-dark); }
.btn-ghost { background: transparent; color: var(--mint-dark); border-color: var(--mint); }
.btn-ghost:hover { background: rgba(47,125,91,.08); }
.btn-small { min-height: 40px; padding: 6px 14px; font-size: .92rem; }

/* ---------- الواجهة ---------- */
.hero { padding-block: 28px 36px; }
.hero-grid { display: grid; gap: 24px; }
.lead { font-size: 1.12rem; color: var(--ink-soft); margin: 0 0 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions .btn { flex: 1 1 180px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .92rem;
  background: var(--cream-deep);
}
.status-pill:empty { display: none; }
.status-pill::before {
  content: "";
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ink-soft);
}
.status-pill.is-open { background: #E3F3EA; color: var(--mint-dark); }
.status-pill.is-open::before { background: var(--mint); box-shadow: 0 0 0 3px rgba(47,125,91,.25); }
.status-pill.is-closed { background: #F6E3DB; color: #7A3218; }
.status-pill.is-closed::before { background: var(--clay); }

/* ---------- أماكن الصور ---------- */
.photo {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--cream-deep);
  border: 2px dashed rgba(47,125,91,.45);
}
.photo-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}
.photo.has-image { border: 0; }
.photo-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  padding: 16px;
  text-align: center;
  color: var(--mint-dark);
  font-weight: 500;
}
.photo-placeholder small { direction: ltr; font-size: .78rem; opacity: .65; font-family: ui-monospace, monospace; }

/* ---------- الأقسام ---------- */
.section { padding-block: 40px; }
.section-tint { background: rgba(243, 234, 216, .75); }
.section-note { color: var(--ink-soft); font-size: .95rem; margin: 0 0 16px; }

/* ---------- القائمة ---------- */
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 16px;
  scrollbar-width: thin;
}
.tab {
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 2px solid var(--mint);
  background: transparent;
  color: var(--mint-dark);
  cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--mint); color: #fff; }

.menu-list { display: grid; gap: 12px; }
.dish {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  align-items: start;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.dish-name { font-family: var(--font-title); font-size: 1.15rem; font-weight: 700; margin: 0; color: var(--ink); }
.dish-desc { grid-column: 1 / -1; margin: 0; color: var(--ink-soft); font-size: .95rem; }
.dish-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--clay);
  white-space: nowrap;
}
.dish-tag {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #FDF1D8;
  color: #7A5410;
  font-size: .78rem;
  font-family: var(--font-body);
  vertical-align: middle;
}
.dish .btn { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }

/* ---------- الصور ---------- */
.gallery {
  display: grid;
  gap: 12px;
  grid-auto-flow: column;
  grid-auto-columns: 72%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
}
.gallery .photo { aspect-ratio: 1 / 1; scroll-snap-align: start; }

/* ---------- الساعات ---------- */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.hours-table th, .hours-table td { padding: 12px 16px; text-align: start; border-bottom: 1px solid var(--cream-deep); }
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: 0; }
.hours-table th { font-weight: 500; }
.hours-table td { font-weight: 700; direction: ltr; text-align: end; white-space: pre; }
.hours-table tr.is-today { background: #E3F3EA; }
.hours-table tr.is-today th { font-weight: 700; color: var(--mint-dark); }

/* ---------- الموقع ---------- */
.location-grid { display: grid; gap: 16px; }
.map-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  background: var(--cream-deep);
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-label {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  background: var(--saffron);
  color: var(--ink);
  font-weight: 700;
  font-size: .85rem;
  padding: 3px 10px;
  border-radius: 999px;
  pointer-events: none;
}
.address-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.address { font-family: var(--font-title); font-size: 1.3rem; font-weight: 700; margin: 0 0 6px; }

/* ---------- زر واتساب العائم ---------- */
.wa-float {
  position: fixed;
  bottom: 18px;
  inset-inline-end: 18px;
  z-index: 60;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.wa-float svg { width: 30px; height: 30px; }

/* ---------- التذييل ---------- */
.site-footer {
  background: var(--mint-dark);
  color: rgba(255,255,255,.88);
  text-align: center;
  padding: 28px 0 90px; /* مساحة تحت حتى لا يغطي الزر العائم النص */
  font-size: .95rem;
}
.site-footer p { margin: 4px 0; }
.site-footer strong { color: #fff; letter-spacing: .03em; }

/* ---------- الفرنسية: الأرقام والنصوص اللاتينية ---------- */
html[lang="fr"] .brand-name { font-size: 1.25rem; }

/* ---------- شاشات أكبر (لوحة وحاسوب) ---------- */
@media (min-width: 640px) {
  .gallery { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; }
  .menu-list { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  :root { --header-h: 120px; }
  .hero { padding-block: 48px 56px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px; }
  .hero-actions .btn { flex: 0 0 auto; }
  .location-grid { grid-template-columns: 1.6fr 1fr; align-items: start; }
  .map-wrap { aspect-ratio: 16 / 10; }
  .section { padding-block: 56px; }
}

/* الهاتف أفقياً: نصغّر الرأس حتى يبقى مكان للمحتوى، والشارة تبقى ظاهرة */
@media (max-height: 480px) and (orientation: landscape) {
  :root { --header-h: 80px; }
  .quick-nav { display: none; }
  .header-bar { padding-block: 4px; }
  .brand-icon { width: 32px; height: 32px; }
}
