/* ============================================================
   Beauty | بيوتي — Restaurants & Cafe · MPIRE 2026 Rebranding
   ثلاث تجارب: القبّة / التّراس / الكلوب — كل واحدة بلوحتها
   ============================================================ */
:root {
  /* ---- لوحة Interior — الهوية المحايدة (شاشة الاختيار) ----
     القيم من مواصفات العلامة. ملاحظة: شريحة الألوان في العرض التقديمي
     تحوي خطأ نسخ (الأعمدة الأربعة تعرض #4F0B18 نفسه) — راجع BRAND.md */
  --i-dark: #1E0B04;
  --i-mid: #8C7250;
  --i-light: #D9C7A7;

  /* متغيّرات المكان الحالي — يضبطها menu.js من beauty_venues */
  --v-dark: #1E0B04;
  --v-accent: #8C7250;
  --v-light: #D9C7A7;

  --txt: #F6EFE6;
  --muted: rgba(246, 239, 230, 0.62);
  --line: rgba(246, 239, 230, 0.14);
  --line-strong: rgba(246, 239, 230, 0.3);
  --warn: #F0C274;

  --radius: 14px;

  /* ---- الخطوط ----
     العربية: Lama Sans (Baianat) — غير متوفر على Google Fonts،
     يُستضاف ذاتياً في assets/fonts/. البديل المؤقت: IBM Plex Sans Arabic.
     اللاتينية للعناوين: بديل مؤقت عن Freight Neo Pro (تجاري، بلا ترخيص).
     الأرقام والأسعار: Inter بالحجم البصري التلقائي. */
  --font-body: "Lama Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-display: "Lama Sans", "Alegreya Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-latin: "Alegreya Sans", "Inter", Georgia, serif;
  --font-num: "Inter", system-ui, sans-serif;

  --wrap: 780px;
}

/* Lama Sans — يُفعَّل تلقائياً حال إضافة الملفات إلى assets/fonts/
   (لا يكسر شيئاً في غيابها: المتصفح ينتقل للبديل التالي في القائمة) */
@font-face {
  font-family: "Lama Sans";
  src: url("../fonts/LamaSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Lama Sans";
  src: url("../fonts/LamaSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Lama Sans";
  src: url("../fonts/LamaSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* الأرقام والأسعار دائماً لاتينية بحجم بصري تلقائي */
[dir="ltr"], .num, .price-num, .cmp-tel span {
  font-family: var(--font-num);
  font-optical-sizing: auto;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--v-dark);
  color: var(--txt);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s ease;
  overflow-x: hidden;
}

.view { display: none; }
/* بلا fill-mode: الحالة المستقرة مرئية دائماً حتى لو عُطّلت الحركات */
.view.active { display: block; animation: fade 0.45s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .view.active { animation: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* شريط النمط الزخرفي على الحافة */
.pattern-band {
  position: fixed;
  top: 0; left: 0;
  width: 118px; height: 100vh;
  color: var(--v-accent);
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
}
.pattern-svg { display: block; width: 100%; height: 100%; }
@media (max-width: 620px) { .pattern-band { width: 62px; opacity: 0.12; } }

/* ============ 1) واجهة اختيار المكان ============ */
#view-venues {
  min-height: 100vh;
  background: var(--i-dark);
  padding: 46px 20px 30px;
}
.v-hero { text-align: center; max-width: var(--wrap); margin: 0 auto 34px; }
/* إخفاء بصري مع إبقاء النص لقارئات الشاشة */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* الشعار الرسمي — أحادي اللون دائماً، بلا ظلال أو تدرّجات */
.gate-logo { color: var(--i-mid); line-height: 0; }
.gate-logo svg { width: 56px; height: auto; display: inline-block; }

.v-brand {
  line-height: 0;
  margin-top: 22px;
  color: var(--i-light);
}
.v-brand svg { width: min(230px, 62vw); height: auto; display: inline-block; }
.v-sub {
  font-family: var(--font-display);
  color: var(--i-mid);
  font-size: 0.78rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 10px;
}
.v-lead { color: var(--muted); font-size: 0.92rem; margin-top: 20px; line-height: 1.9; }

.venue-grid {
  display: grid;
  gap: 14px;
  max-width: var(--wrap);
  margin: 0 auto;
}
@media (min-width: 760px) { .venue-grid { grid-template-columns: repeat(3, 1fr); } }

.venue-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  min-height: 178px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.venue-card:hover, .venue-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  outline: none;
}
.venue-card .vc-pattern {
  position: absolute; inset: 0;
  opacity: 0.22;
  pointer-events: none;
}
.venue-card .vc-inner { position: relative; z-index: 2; }
.venue-card .vc-en {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.9rem;
  line-height: 1.05;
  letter-spacing: 1px;
}
.venue-card .vc-ar { font-size: 1.05rem; font-weight: 600; margin-top: 4px; opacity: 0.92; }
.venue-card .vc-tag { font-size: 0.8rem; margin-top: 10px; opacity: 0.78; line-height: 1.7; }
.venue-card .vc-count {
  position: absolute; top: 20px; left: 22px; z-index: 2;
  font-size: 0.7rem; letter-spacing: 1px;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 3px 11px;
  opacity: 0.75;
}
/* مكان لم تُضف أصنافه بعد — معروض بلا تفاعل */
.venue-card.empty {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}
.venue-card.empty:hover { transform: none; box-shadow: none; }
.vc-count.soon {
  border-style: dashed;
  letter-spacing: 2px;
}

.v-foot { text-align: center; margin-top: 40px; color: var(--i-mid); }

/* ============ 2) شاشة المكان: الأقسام ============ */
.hero, .searchbox, #homeContent, #searchArea,
.cat-topbar, .chips, .items-wrap, #mainFoot {
  position: relative; z-index: 1;
  max-width: var(--wrap);
  margin-inline: auto;
}
.hero {
  text-align: center;
  padding: 40px 20px 26px;
}
.back-btn.ghost {
  position: absolute; top: 22px; right: 18px;
  background: none; border: 1px solid var(--line);
  color: var(--v-accent);
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
}
.back-btn.ghost svg { width: 18px; height: 18px; }
.brand-ar {
  font-size: clamp(1.7rem, 7vw, 2.4rem);
  font-weight: 700;
  color: var(--txt);
}
.brand-latin {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 9vw, 3.2rem);
  letter-spacing: 4px;
  color: var(--v-accent);
  line-height: 1.05;
  margin-top: 4px;
}
.tagline { color: var(--muted); font-size: 0.88rem; margin-top: 12px; line-height: 1.8; }
.announce {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.82rem;
  color: var(--v-light);
}
.announce .spark { color: var(--v-accent); flex: none; }
/* الشريط زر يفتح نافذة الفطور */
.announce {
  cursor: pointer;
  font-family: inherit;
  background: none;
  transition: border-color 0.18s, background 0.18s;
}
.announce:hover, .announce:focus-visible {
  border-color: var(--v-accent);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

/* ---------- أيقونات التواصل والموقع ---------- */
.social-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 18px 0 22px;
}
.social-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--v-accent);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  transition: color 0.18s, border-color 0.18s, transform 0.18s, background 0.18s;
}
.social-btn svg { width: 21px; height: 21px; }
.social-btn:hover, .social-btn:focus-visible {
  color: var(--v-light);
  border-color: var(--v-accent);
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-2px);
  outline: none;
}

/* ---------- نافذة فطور بيوتي ---------- */
#breakfastDlg {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(420px, calc(100vw - 32px));
  color: var(--txt);
}
#breakfastDlg::backdrop { background: rgba(6, 3, 2, 0.72); backdrop-filter: blur(4px); }
.bf-inner {
  position: relative;
  background: var(--v-dark);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 62px 26px 30px;
  overflow: hidden;
  text-align: center;
}
/* شريط زخرفي رفيع على الحافة العليا — لا يمرّ خلف النص (قاعدة الهوية) */
.bf-pattern {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 84px;
  color: var(--v-accent);
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent);
  mask-image: linear-gradient(to bottom, #000 35%, transparent);
}
.bf-inner > * { position: relative; z-index: 1; }
.bf-close {
  position: absolute; top: 10px; left: 14px;
  background: none; border: none;
  color: var(--muted);
  font-size: 1.7rem; line-height: 1;
  cursor: pointer;
}
.bf-close:hover { color: var(--v-light); }
.bf-kicker {
  font-family: var(--font-latin);
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--v-accent);
}
.bf-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 8px 0 16px;
  color: var(--v-light);
}
.bf-body p {
  color: var(--txt);
  font-size: 0.95rem;
  line-height: 2;
  margin-bottom: 8px;
  opacity: 0.92;
}
.bf-body p:last-child { margin-bottom: 0; }

.searchbox { position: relative; padding: 0 20px; margin-bottom: 26px; }
.searchbox input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--txt);
  font-family: inherit;
  padding: 13px 46px 13px 18px;
  font-size: 0.94rem;
  outline: none;
  transition: border-color 0.2s;
}
.searchbox input:focus { border-color: var(--v-accent); }
.searchbox .s-icon {
  position: absolute; top: 50%; right: 36px;
  transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--muted);
  pointer-events: none;
}

.section-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--v-accent);
  padding: 0 20px;
  margin-bottom: 14px;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 20px;
}
@media (min-width: 620px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
.cat-card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 14px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s, transform 0.18s, background 0.18s;
}
.cat-card:hover, .cat-card:focus-visible {
  border-color: var(--v-accent);
  transform: translateY(-3px);
  outline: none;
}
.cat-card .ico { color: var(--v-accent); }
.cat-card .ico svg { width: 30px; height: 30px; }
.cat-card .ico .emoji-icon { font-size: 27px; }
.cat-card h3 { font-size: 0.95rem; font-weight: 600; margin-top: 10px; }
.cat-card .count { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 5px; }

/* ============ 3) شاشة الأصناف ============ */
.cat-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 20px 14px;
}
.cat-topbar h2 { font-size: 1.25rem; font-weight: 700; flex: 1; }
.topbar-venue {
  font-family: var(--font-display);
  font-size: 0.66rem; letter-spacing: 2px;
  color: var(--v-accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.back-btn {
  background: none; border: 1px solid var(--line);
  color: var(--v-accent);
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; flex: none; cursor: pointer;
}
.back-btn svg { width: 17px; height: 17px; }

.chips {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 0 20px 16px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: inherit;
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
}
.chip.on { background: var(--v-accent); border-color: var(--v-accent); color: var(--v-dark); font-weight: 700; }

.items-wrap { padding: 0 20px 20px; }
.group-head {
  font-family: var(--font-display);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--v-accent);
  margin: 22px 0 10px;
}
.item-row {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.item-row:last-child { border-bottom: none; }
.item-row.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 100% { background: transparent; } 30% { background: rgba(255,255,255,0.07); } }
.item-thumb {
  width: 58px; height: 58px; border-radius: 10px;
  object-fit: cover; flex: none;
  border: 1px solid var(--line);
}
.item-main { flex: 1; min-width: 0; }
.item-name-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.item-name { font-size: 1rem; font-weight: 600; line-height: 1.5; }
.item-badge {
  flex: none; font-size: 0.66rem; font-weight: 700;
  color: var(--v-dark); background: var(--v-accent);
  border-radius: 999px; padding: 2px 9px;
}
.result-cat-tag {
  font-size: 0.66rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px;
}
.leader { flex: 1; min-width: 16px; border-bottom: 1px dotted var(--line-strong); transform: translateY(-4px); }
.item-desc { color: var(--muted); font-size: 0.83rem; line-height: 1.7; margin-top: 3px; }

/* تفاصيل الصنف */
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; margin-top: 8px; }
.meta-fact {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 10px;
  white-space: nowrap;
}
.meta-fact .mi { font-size: 0.85rem; line-height: 1; }
.meta-fact.allergy {
  color: var(--warn);
  background: rgba(240, 194, 116, 0.1);
  border-color: rgba(240, 194, 116, 0.28);
  white-space: normal;
}
.item-note {
  flex-basis: 100%;
  font-size: 0.75rem; line-height: 1.7; color: var(--muted);
  border-inline-start: 2px solid var(--line-strong);
  padding-inline-start: 9px;
}

.item-price {
  flex: none; text-align: left;
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
}
.price-pair { display: flex; align-items: baseline; gap: 6px; }
.plabel { font-size: 0.66rem; color: var(--muted); }
.price-num {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1rem;
  color: var(--v-light);
  white-space: nowrap;
}
.cur { font-size: 0.68rem; margin-inline-start: 3px; color: var(--muted); font-weight: 500; }
.price-note { font-size: 0.72rem; color: var(--muted); }

.search-results { padding: 0 20px 10px; }
.no-results { text-align: center; color: var(--muted); padding: 48px 16px; line-height: 2; }
.no-results svg { width: 34px; height: 34px; opacity: 0.6; }

/* ============ التذييل ============ */
footer {
  position: relative; z-index: 1;
  margin-top: 34px;
  padding: 28px 20px 26px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.contact-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-bottom: 18px; }
.contact-chip {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--v-light); text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 999px; padding: 8px 16px;
  font-size: 0.84rem;
}
.contact-chip:hover { border-color: var(--line-strong); }
.contact-chip svg { width: 16px; height: 16px; color: var(--v-accent); }

.complaints {
  max-width: 320px; margin: 0 auto 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}
.cmp-head { font-size: 0.71rem; color: var(--muted); letter-spacing: 0.4px; margin-bottom: 9px; }
.cmp-tel {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--v-light); text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.02rem; letter-spacing: 1px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
  border-radius: 999px; padding: 9px 20px;
  transition: border-color 0.15s;
}
.cmp-tel:hover, .cmp-tel:focus-visible { border-color: var(--v-accent); }
.cmp-tel svg { width: 16px; height: 16px; color: var(--v-accent); flex: none; }
.cmp-stars { margin-top: 9px; color: var(--warn); font-size: 0.78rem; letter-spacing: 3px; }

.foot-brand {
  font-family: var(--font-display);
  font-weight: 900; letter-spacing: 4px;
  color: var(--v-accent); font-size: 0.95rem;
}
/* حين يُستبدل النص بالشعار المرسوم */
.foot-brand.is-logo { line-height: 0; }
.foot-brand.is-logo svg { width: 108px; height: auto; display: inline-block; }
.v-foot .foot-brand.is-logo { color: var(--i-mid); }
.foot-note { color: var(--muted); font-size: 0.74rem; margin-top: 6px; }

/* ============ متفرقات ============ */
#toTop {
  position: fixed; bottom: 22px; left: 18px;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--v-accent); color: var(--v-dark);
  border: none; cursor: pointer;
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
  z-index: 20;
}
#toTop.show { opacity: 1; pointer-events: auto; }
#toTop svg { width: 20px; height: 20px; }

.skel {
  background: linear-gradient(100deg, rgba(255,255,255,0.04) 30%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: var(--radius);
}
.vskel { min-height: 178px; border-radius: 18px; }
@keyframes shimmer { to { background-position: -150% 0; } }

.err-box { text-align: center; color: var(--muted); padding: 50px 20px; line-height: 2.1; }
.err-box button {
  margin-top: 14px;
  background: var(--v-accent); color: var(--v-dark);
  border: none; border-radius: 999px;
  padding: 9px 22px; font-family: inherit; font-weight: 700; cursor: pointer;
}
