/* =====================================================
   SAAH — سعة
   الهوية البصرية والتنسيق الكامل للموقع
   الألوان (من الشعار): فحمي #1F2227 · ذهبي #D1B773 · بيج #F7F5F0
   الوضع الليلي/النهاري عبر html[data-theme] — العربي/الإنجليزي عبر dir
   ===================================================== */


/* ---------- 1. المتغيرات ---------- */
:root {
  --green: #1F2227;
  --green-deep: #15171B;
  --gold: #D1B773;
  --gold-soft: #E4D2A2;
  --sand: #F7F5F0;

  --bg: #F7F5F0;
  --bg-alt: #EFEAE0;
  --surface: #FFFFFF;
  --surface-2: #F2EDE4;
  --text: #1C1C1C;
  --muted: #66625B;
  --border: #DED9CF;
  --border-strong: #C9C1B2;
  --primary: #1F2227;
  --primary-hover: #353A42;
  --on-primary: #FFFFFF;
  --accent: #D1B773;
  --accent-text: #8A6E2F;
  --danger: #B3261E;
  --success: #2E7D4F;
  --header-bg: rgba(247, 245, 240, 0.86);
  --overlay: linear-gradient(180deg, rgba(14, 15, 19, 0.15) 0%, rgba(14, 15, 19, 0.72) 100%);
  --shadow: 0 1px 2px rgba(15, 17, 20, 0.04), 0 12px 32px rgba(15, 17, 20, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 17, 20, 0.18);
  --grid-line: rgba(31, 34, 39, 0.09);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 28px;
  --gutter: max(16px, calc((100% - 1200px) / 2));
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 0.3s var(--ease);
  --font: "Tajawal", "Segoe UI", Tahoma, "Geeza Pro", system-ui, -apple-system, Arial, sans-serif;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #111317;
  --bg-alt: #16191E;
  --surface: #1B1E24;
  --surface-2: #23272E;
  --text: #F1EDE4;
  --muted: #A7A196;
  --border: #2D3239;
  --border-strong: #3E444D;
  --primary: #D1B773;
  --primary-hover: #E4D2A2;
  --on-primary: #15171B;
  --accent: #D1B773;
  --accent-text: #E0C98E;
  --danger: #F2867E;
  --success: #6FCF97;
  --header-bg: rgba(17, 19, 23, 0.84);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --grid-line: rgba(209, 183, 115, 0.10);
  color-scheme: dark;
}

/* ---------- 2. الأساسيات ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition), color var(--transition);
}
main { flex: 1 0 auto; }
body.no-scroll { overflow: hidden; }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { letter-spacing: 0; }
p { color: inherit; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
[hidden] { display: none !important; }
strong { font-weight: 700; }

::selection { background: var(--accent); color: #15171B; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.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;
}

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 200;
  background: var(--primary); color: var(--on-primary);
  padding: 10px 18px; border-radius: var(--radius-sm); font-weight: 700;
  transition: top var(--transition);
}
.skip-link:focus { top: 12px; }

/* خلفية افتراضية لكل الصور قبل تحميلها أو عند غيابها */
[class*="__image"]:not([class*="__images"]), .size-panel__3d, .size-panel__plan, .product-space__plan {
  background-color: var(--surface-2);
  background-image:
    radial-gradient(circle at 20% 15%, rgba(209, 183, 115, 0.22), transparent 55%),
    linear-gradient(135deg, var(--surface-2), var(--bg-alt));
  background-size: cover;
  background-position: center;
}

/* ---------- 3. أزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 26px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 15px; line-height: 1.2; white-space: nowrap;
  cursor: pointer; text-align: center;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-hover); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18); transform: translateY(-2px); }
.btn--secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--secondary:hover { border-color: var(--accent); color: var(--accent-text); }
.btn--ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn--ghost:hover { color: var(--text); background: var(--surface-2); }
.btn--danger { background: transparent; color: var(--danger); border-color: currentColor; }
.btn--danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn--sm { min-height: 38px; padding: 8px 16px; font-size: 14px; }
.btn--block { width: 100%; }

.theme-toggle, .lang-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 14px; font-weight: 700; color: var(--text);
  transition: border-color var(--transition), color var(--transition);
}
.lang-toggle { min-width: 44px; padding: 6px 10px; }
.theme-toggle:hover, .lang-toggle:hover { border-color: var(--accent); color: var(--accent-text); }

/* ---------- 4. الهيدر والقائمة ---------- */
#site-header { position: sticky; top: 0; z-index: 60; }

.header {
  position: relative;
  display: flex; align-items: center; gap: 20px;
  min-height: var(--header-h);
  padding: 10px var(--gutter);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.header__logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.header__logo img { height: 44px; width: auto; object-fit: contain; }
/* الشعار أبيض: في الوضع النهاري يوضع على لوحة داكنة صغيرة ليبقى واضحاً */
.header__logo { padding: 6px 12px; border-radius: 12px; background: #1F2227; }
html[data-theme="dark"] .header__logo { padding-inline: 0; background: transparent; }

.menu-toggle {
  display: none; align-items: center; gap: 8px;
  min-height: 40px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border); font-weight: 700; font-size: 14px;
}
.menu-toggle::before { content: "☰"; font-size: 16px; line-height: 1; }
.menu-toggle[aria-expanded="true"]::before { content: "✕"; }

.nav { display: flex; align-items: center; gap: 2px; margin-inline: auto; }
.nav__item { position: relative; display: flex; align-items: center; }
.nav__link {
  padding: 10px 8px 10px 4px; font-weight: 500; font-size: 15px; color: var(--text);
  border-radius: 8px;
}
html[dir="rtl"] .nav__link { padding: 10px 4px 10px 8px; }
.nav__link:hover, .nav__link--active { color: var(--accent-text); }
.nav__link--active { font-weight: 700; }
.nav__toggle {
  width: 26px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 12px; border-radius: 6px;
  transition: transform var(--transition), color var(--transition);
}
.nav__toggle:hover { color: var(--accent-text); }
.nav__toggle[aria-expanded="true"] { transform: rotate(180deg); color: var(--accent-text); }

.nav__sub {
  position: absolute; top: calc(100% + 8px); inset-inline-start: -8px;
  min-width: 250px; max-width: 320px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  z-index: 70;
  animation: dropIn 0.22s var(--ease);
}
.nav__sub::before { content: ""; position: absolute; inset-inline: 0; top: -10px; height: 10px; }
.nav__sublink {
  display: block; padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 14.5px; color: var(--text);
}
.nav__sublink:hover { background: var(--surface-2); color: var(--accent-text); }

@media (hover: hover) and (min-width: 1101px) {
  .nav__item:hover > .nav__sub[hidden] { display: block !important; }
}

.header__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header__login {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px;
  border-radius: 999px; background: var(--primary); color: var(--on-primary);
  font-size: 14px; font-weight: 700;
}
.header__login:hover { background: var(--primary-hover); }

@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- 5. عناصر عامة للأقسام ---------- */
.section { padding: clamp(64px, 9vw, 120px) var(--gutter); }
.section__title { font-size: clamp(28px, 4vw, 46px); margin-bottom: 18px; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 36px; flex-wrap: wrap; }
.section__head .section__title { margin-bottom: 0; }
.section__link { color: var(--accent-text); font-weight: 700; display: inline-flex; gap: 6px; }
.section__link::after { content: "←"; transition: transform var(--transition); }
html[dir="ltr"] .section__link::after { content: "→"; }
.section__link:hover::after { transform: translateX(-4px); }
html[dir="ltr"] .section__link:hover::after { transform: translateX(4px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--accent-text); font-weight: 700; font-size: 14px; margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
html[lang="en"] .eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 12.5px; }

.page-hero {
  position: relative; overflow: hidden;
  padding: clamp(72px, 10vw, 130px) var(--gutter) clamp(48px, 7vw, 84px);
  background:
    radial-gradient(ellipse at 85% 0%, rgba(209, 183, 115, 0.25), transparent 55%),
    linear-gradient(160deg, var(--green) 0%, var(--green-deep) 100%);
  color: #F7F3EA;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent);
  mask-image: linear-gradient(180deg, #000, transparent);
}
.page-hero__title { position: relative; z-index: 1; font-size: clamp(34px, 6vw, 64px); margin-bottom: 14px; }
.page-hero__subtitle { position: relative; z-index: 1; max-width: 640px; font-size: clamp(16px, 2vw, 20px); color: rgba(247, 243, 234, 0.8); }

.empty, .not-found { text-align: center; color: var(--muted); padding: 40px 0; }
.not-found h1 { color: var(--text); font-size: clamp(26px, 4vw, 40px); margin-bottom: 24px; }

/* ---------- 6. الرئيسية: الهيرو ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px var(--gutter) 40px;
  color: #FBF8F2;
}
.hero__image { position: absolute; inset: 0; z-index: -2; transform: scale(1.04); animation: heroZoom 14s ease-out forwards; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 13, 16, 0.75) 0%, rgba(12, 13, 16, 0.25) 70%),
    linear-gradient(0deg, rgba(12, 13, 16, 0.85) 0%, transparent 55%);
}
html[dir="rtl"] .hero::before {
  background:
    linear-gradient(270deg, rgba(12, 13, 16, 0.75) 0%, rgba(12, 13, 16, 0.25) 70%),
    linear-gradient(0deg, rgba(12, 13, 16, 0.85) 0%, transparent 55%);
}
.hero__content { max-width: 720px; animation: fadeUp 0.9s var(--ease) both; }
.hero__title { font-size: clamp(42px, 8vw, 92px); line-height: 1.05; margin-bottom: 22px; }
.hero__title > span { display: block; }
.hero__title-accent { color: var(--gold-soft); }
.hero__subtitle { font-size: clamp(16px, 2vw, 21px); color: rgba(251, 248, 242, 0.85); max-width: 560px; margin-bottom: 34px; }
.hero__buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn--primary { background: var(--gold); color: #15171B; }
.hero .btn--primary:hover { background: var(--gold-soft); }
.hero .btn--secondary { color: #FBF8F2; border-color: rgba(251, 248, 242, 0.45); }
.hero .btn--secondary:hover { border-color: var(--gold-soft); color: var(--gold-soft); }

.hero__stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  margin-top: clamp(48px, 8vh, 90px);
  background: rgba(251, 248, 242, 0.18);
  border-radius: var(--radius); overflow: hidden;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: fadeUp 0.9s 0.2s var(--ease) both;
}
.hero-stat { display: flex; flex-direction: column; gap: 4px; padding: 20px 24px; background: rgba(14, 15, 19, 0.45); }
.hero-stat__value { font-size: clamp(28px, 4vw, 44px); font-weight: 800; color: var(--gold-soft); line-height: 1.1; }
html[dir="rtl"] .hero-stat__value { text-align: right; }
.hero-stat__label { font-size: 14px; color: rgba(251, 248, 242, 0.78); }
.hero__scroll {
  align-self: center; margin-top: 26px; font-size: 13px; color: rgba(251, 248, 242, 0.7);
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
}
.hero__scroll::after { content: ""; width: 1px; height: 34px; background: linear-gradient(currentColor, transparent); animation: scrollLine 1.8s ease-in-out infinite; }

@keyframes heroZoom { to { transform: scale(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes scrollLine { 0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------- 7. فن المعمارية ---------- */
.art { text-align: center; }
.art__text { color: var(--muted); max-width: 640px; margin: 0 auto 48px; font-size: 18px; }
.art__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; text-align: start; }
.art-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.art-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.art-card__image { aspect-ratio: 4 / 3; }
.art-card__num { display: block; padding: 22px 26px 0; font-weight: 800; color: var(--accent-text); font-size: 14px; }
html[dir="rtl"] .art-card__num { text-align: right; }
.art-card__title { padding: 6px 26px 8px; font-size: 22px; }
.art-card__text { padding: 0 26px 28px; color: var(--muted); }

/* قسم الصور المضاف في index.html (features-section):
   images.js ينقله لمكان «فن المعمارية» ويربط نصوصه بالترجمة */
.features-section { padding: clamp(64px, 9vw, 120px) var(--gutter); text-align: center; }
.features-title h2 { font-size: clamp(28px, 4vw, 46px); margin-bottom: 18px; }
.features-title p { color: var(--muted); max-width: 640px; margin: 0 auto 48px; font-size: 18px; }
.features-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; text-align: start; }
.feature-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.feature-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); transition: transform 0.8s var(--ease); }
.feature-card:hover img { transform: scale(1.04); }
.feature-content { position: relative; z-index: 1; background: var(--surface); padding: 22px 26px 28px; flex: 1; }
.feature-content span { display: block; font-weight: 800; color: var(--accent-text); font-size: 14px; margin-bottom: 6px; }
.feature-content h3 { font-size: 22px; margin-bottom: 8px; }
.feature-content p { color: var(--muted); }

/* ---------- 8. المنهجية والريادة ---------- */
.method, .leading { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.method { background: var(--bg-alt); }
.method__text, .leading__text { color: var(--muted); font-size: 18px; margin-bottom: 32px; }
.method__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-card__value { display: block; font-size: 34px; font-weight: 800; color: var(--accent-text); line-height: 1.1; margin-bottom: 8px; }
html[dir="rtl"] .stat-card__value { text-align: right; }
.stat-card__title { font-size: 16px; margin-bottom: 6px; }
.stat-card__text { font-size: 14px; color: var(--muted); line-height: 1.6; }
.method__source { font-size: 13px; color: var(--muted); margin-bottom: 28px; }
.method__images { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; height: clamp(360px, 46vw, 560px); }
.method__image { border-radius: var(--radius-lg); min-height: 0; }
.method__image:first-child { grid-row: span 2; }

.leading__pillars { display: grid; gap: 4px; margin-bottom: 32px; }
.pillar { display: grid; grid-template-columns: 56px 1fr; gap: 4px 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.pillar:last-child { border-bottom: 0; }
.pillar__num { grid-row: span 2; font-size: 26px; font-weight: 800; color: var(--accent-text); line-height: 1.2; }
html[dir="rtl"] .pillar__num { text-align: right; }
.pillar__title { font-size: 19px; }
.pillar__text { color: var(--muted); }
.leading__images { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.leading__image { border-radius: var(--radius-lg); aspect-ratio: 3 / 4; }
.leading__image:first-child { grid-column: span 2; aspect-ratio: 16 / 9; }
.leading__badge {
  position: absolute; bottom: -22px; inset-inline-start: 24px;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 22px; border-radius: var(--radius);
  background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-lg); font-weight: 700;
}
.leading__badge-value { font-size: 38px; font-weight: 800; line-height: 1; }

/* ---------- 9. شبكة المنتجات وبطاقتها ---------- */
.featured { padding-top: clamp(80px, 10vw, 130px); }
.products-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.product-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.product-card__image { aspect-ratio: 4 / 3; transition: transform 0.8s var(--ease); }
.product-card:hover .product-card__image { transform: scale(1.04); }
.product-card__body { position: relative; z-index: 1; background: var(--surface); flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 24px; }
.product-card__name { font-size: 22px; }
.product-card__tagline { color: var(--muted); font-size: 15px; flex: 1; }
.product-card__area { font-size: 14px; color: var(--muted); margin-top: 6px; }
.product-card__price { font-weight: 800; font-size: 19px; color: var(--accent-text); margin-bottom: 14px; }
.product-card .btn { align-self: flex-start; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter {
  min-height: 42px; padding: 8px 20px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 500; transition: all var(--transition);
}
.filter:hover { border-color: var(--accent); }
.filter--active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); font-weight: 700; }

/* ---------- 10. الأسئلة الشائعة ---------- */
.faq { max-width: calc(880px + 2 * var(--gutter)); margin-inline: auto; width: 100%; }
#faq.faq { background: transparent; }
.faq__intro { color: var(--muted); margin-bottom: 32px; font-size: 18px; }
.faq__list { border-top: 1px solid var(--border); }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__question {
  display: flex; align-items: center; gap: 14px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-weight: 700; font-size: 17px;
}
.faq__question::-webkit-details-marker { display: none; }
.faq__question::after {
  content: "+"; margin-inline-start: auto; flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 400; color: var(--accent-text);
  transition: transform var(--transition), background-color var(--transition);
}
.faq__item[open] .faq__question::after { transform: rotate(45deg); background: var(--surface-2); }
.faq__question:hover { color: var(--accent-text); }
.faq__num { color: var(--accent-text); font-size: 14px; font-weight: 800; }
.faq__answer { padding: 0 0 22px; color: var(--muted); max-width: 760px; }
.faq__item[open] .faq__answer { animation: fadeUp 0.35s var(--ease); }
.faq__more {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 36px; padding: 24px 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
}
.faq__more p { font-weight: 500; }

/* ---------- 11. النشرة البريدية والشهادات ---------- */
.newsletter {
  margin: 0 var(--gutter); padding: clamp(48px, 7vw, 80px) clamp(24px, 6vw, 80px);
  border-radius: var(--radius-lg); text-align: center;
  background:
    radial-gradient(ellipse at 10% 0%, rgba(209, 183, 115, 0.35), transparent 50%),
    linear-gradient(150deg, var(--green), var(--green-deep));
  color: #F7F3EA;
}
.newsletter .eyebrow { color: var(--gold-soft); justify-content: center; }
.newsletter__text { color: rgba(247, 243, 234, 0.8); max-width: 540px; margin: 0 auto 30px; }
.newsletter__form { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 560px; margin: 0 auto; }
.newsletter__form .form__input { flex: 1 1 260px; background: rgba(255, 255, 255, 0.95); color: #1C1C1C; border-color: transparent; border-radius: 999px; padding-inline: 22px; }
.newsletter__form .btn--primary { background: var(--gold); color: #15171B; }
.newsletter__form .btn--primary:hover { background: var(--gold-soft); }
.newsletter__form .form__error, .newsletter__form .form__success { flex-basis: 100%; }
.newsletter .form__error { color: #FFB4AB; }
.newsletter .form__success { color: #A8E6C1; }

.certs { text-align: center; }
.certs__text { color: var(--muted); margin: 0 auto 36px; max-width: 600px; }
.certs__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.cert { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.cert__logo { width: 64px; height: 64px; border-radius: 50%; }
.cert__name { font-size: 17px; }
.cert__desc { font-size: 14px; color: var(--muted); }
.cert--empty { grid-column: 1 / -1; color: var(--muted); border-style: dashed; background: transparent; }

/* ---------- 12. من نحن ---------- */
.about-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-story__image { border-radius: var(--radius-lg); aspect-ratio: 4 / 5; max-height: 600px; width: 100%; }
.about-story__text { font-size: 18px; color: var(--muted); }

.vision { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; background: var(--bg-alt); }
.vision__item { padding: clamp(28px, 4vw, 48px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); position: relative; overflow: hidden; }
.vision__item::after { content: ""; position: absolute; inset-inline-end: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(209, 183, 115, 0.25), transparent 70%); }
.vision__item .section__title { font-size: clamp(24px, 3vw, 32px); }
.vision__text { color: var(--muted); font-size: 17px; }

.journey__list { position: relative; display: grid; gap: 0; max-width: 820px; margin-top: 24px; padding-inline-start: 28px; border-inline-start: 2px solid var(--border); }
.journey__item { position: relative; padding: 0 0 36px; }
.journey__item:last-child { padding-bottom: 0; }
.journey__item::before {
  content: ""; position: absolute; inset-inline-start: -36px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 5px var(--bg);
}
.journey__year { display: inline-block; font-size: 28px; font-weight: 800; color: var(--accent-text); line-height: 1.2; margin-bottom: 4px; }
.journey__text { color: var(--muted); font-size: 17px; }

.partners { text-align: center; background: var(--bg-alt); }
.partners__text { color: var(--muted); max-width: 600px; margin: 0 auto 36px; }
.partners__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.partner {
  height: 110px; border-radius: var(--radius); border: 1px dashed var(--border-strong); background: var(--surface);
  display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700;
}
.partner::after { content: attr(aria-label); opacity: 0.6; }

.values__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.value { padding: 32px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); transition: transform var(--transition), border-color var(--transition); }
.value:hover { transform: translateY(-4px); border-color: var(--accent); }
.value__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--accent), #26251f);
  color: #fff;
}

.value__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.value__title { font-size: 21px; margin-bottom: 8px; }
.value__text { color: var(--muted); }

.cta {
  margin: 0 var(--gutter) clamp(64px, 9vw, 110px);
  padding: clamp(48px, 7vw, 84px) clamp(24px, 6vw, 80px);
  border-radius: var(--radius-lg); text-align: center; position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(ellipse at 90% 100%, rgba(209, 183, 115, 0.35), transparent 50%),
    linear-gradient(150deg, var(--green), var(--green-deep));
  color: #F7F3EA;
}
.cta__title { font-size: clamp(28px, 4.4vw, 48px); margin-bottom: 14px; }
.cta__text { color: rgba(247, 243, 234, 0.82); max-width: 560px; margin: 0 auto 30px; font-size: 18px; }
.cta .btn--primary { background: var(--gold); color: #15171B; }
.cta .btn--primary:hover { background: var(--gold-soft); }
.cta .btn--secondary { color: #F7F3EA; border-color: rgba(247, 243, 234, 0.45); }
.cta__buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- 13. التواصل ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.contact__form-wrap, .contact__direct { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 44px); }
.contact__direct { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 22px; }
.contact__heading { display: flex; align-items: center; gap: 12px; font-size: 22px; margin-bottom: 26px; }
.contact__direct .contact__heading { margin-bottom: 4px; }
.contact__num { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); color: var(--accent-text); font-size: 14px; }
.contact__item { display: flex; flex-direction: column; gap: 2px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.contact__label { font-size: 13px; color: var(--muted); }
.contact__value { font-weight: 700; font-size: 17px; word-break: break-word; }
html[dir="rtl"] .contact__value[dir="ltr"] { text-align: right; }
a.contact__value:hover { color: var(--accent-text); }

/* ---------- 14. النماذج ---------- */
.form { display: grid; gap: 4px; }
.form__field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; min-width: 0; }
.form__label { font-weight: 700; font-size: 14.5px; }
.form__input {
  width: 100%; min-height: 50px; padding: 12px 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--bg); color: var(--text); font-size: 16px;
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}
.form__input::placeholder { color: var(--muted); opacity: 0.7; }
.form__input:hover { border-color: var(--accent); }
.form__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(209, 183, 115, 0.22); }
.form__input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.12); }
select.form__input {
  appearance: none; -webkit-appearance: none; padding-inline-end: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%;
  background-size: 6px 6px; background-repeat: no-repeat;
}
html[dir="rtl"] select.form__input { background-position: 16px 52%, 22px 52%; }
.form__textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.form__phone { display: flex; align-items: stretch; }
.form__prefix {
  display: inline-flex; align-items: center; padding: 0 14px; font-weight: 700;
  border: 1px solid var(--border-strong); border-inline-end: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--surface-2); color: var(--muted);
}
.form__phone .form__input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.form__checks { border: 0; display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px; }
.form__checks legend { margin-bottom: 10px; width: 100%; }
.form__check {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  min-height: 44px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--bg); font-weight: 500;
  transition: border-color var(--transition), background-color var(--transition);
}
.form__check:hover { border-color: var(--accent); }
.form__check:has(input:checked) { border-color: var(--accent); background: var(--surface-2); }
.form__check input, .cfg-choice input, .cfg-size input { accent-color: var(--accent); width: 18px; height: 18px; }
.form__checks .form__error { flex-basis: 100%; }
.form__error { color: var(--danger); font-size: 13.5px; min-height: 0; }
.form__error:empty { display: none; }
.form__success { color: var(--success); font-weight: 700; }
.form__success:empty { display: none; }
.form__submit { margin-top: 10px; justify-self: start; min-width: 180px; }

/* ---------- 15. المدونة والمقال ---------- */
.blog__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card {
  display: flex; flex-direction: column; gap: 8px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding-bottom: 24px; transition: transform var(--transition), box-shadow var(--transition);
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.post-card__image { aspect-ratio: 16 / 10; margin-bottom: 10px; }
.post-card__type, .post-card__date, .post-card__title, .post-card__text, .post-card__link { margin-inline: 24px; }
.post-card__type { align-self: flex-start; font-size: 12.5px; font-weight: 700; color: var(--accent-text); background: var(--surface-2); padding: 4px 12px; border-radius: 999px; }
.post-card__date { font-size: 13.5px; color: var(--muted); }
.post-card__title { font-size: 20px; }
.post-card__text { color: var(--muted); flex: 1; font-size: 15px; }
.post-card__link { font-weight: 700; color: var(--accent-text); margin-top: 6px; }
.post-card__link:hover { text-decoration: underline; text-underline-offset: 4px; }

.article { max-width: calc(820px + 2 * var(--gutter)); margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--gutter) 0; }
.article__back { display: inline-flex; color: var(--accent-text); font-weight: 700; margin-bottom: 24px; }
.article__back::before { content: "→"; margin-inline-end: 8px; }
html[dir="ltr"] .article__back::before { content: "←"; }
.article__date { display: block; color: var(--muted); margin-bottom: 8px; }
.article__title { font-size: clamp(30px, 5vw, 52px); margin-bottom: 28px; }
.article__image { aspect-ratio: 16 / 9; border-radius: var(--radius-lg); margin-bottom: 36px; }
.article__body p { font-size: 18.5px; line-height: 1.95; margin-bottom: 20px; color: var(--text); }
.related { border-top: 1px solid var(--border); margin-top: clamp(48px, 7vw, 80px); }

/* ---------- 16. الهوية البصرية ---------- */
.brand-block { display: grid; gap: 18px; border-bottom: 1px solid var(--border); padding-block: clamp(48px, 6vw, 80px); }
.brand-block > p { color: var(--muted); max-width: 680px; font-size: 17px; }
.brand-block__logo {
  height: 240px; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: #1F2227 url("../images/saah-logo.png") center / auto 55% no-repeat;
}
.brand-block__colors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.swatch {
  display: flex; align-items: flex-end; height: 170px; padding: 16px; border-radius: var(--radius);
  font-weight: 700; font-size: 14px; border: 1px solid var(--border); direction: ltr;
}
.swatch--primary { background: #1F2227; color: #F7F5F0; }
.swatch--primary::after { content: "Charcoal · #1F2227"; }
.swatch--secondary { background: #D1B773; color: #1F2227; }
.swatch--secondary::after { content: "Gold · #D1B773"; }
.swatch--accent { background: #8A6E2F; color: #F7F5F0; }
.swatch--accent::after { content: "Bronze · #8A6E2F"; }
.swatch--neutral { background: #F7F5F0; color: #1C1C1C; }
.swatch--neutral::after { content: "Sand · #F7F5F0"; }

/* ---------- 17. الأقسام والأنظمة ---------- */
.departments { display: grid; gap: 0; }
.department {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr;
  column-gap: clamp(32px, 6vw, 80px); align-items: start;
  padding: clamp(56px, 8vw, 100px) var(--gutter);
  border-bottom: 1px solid var(--border);
}
.department:nth-child(even) { background: var(--bg-alt); }
.department__image { grid-row: 1 / span 4; border-radius: var(--radius-lg); aspect-ratio: 4 / 3; align-self: center; }
.department:nth-child(even) .department__image { grid-column: 2; }
.department:nth-child(even) > :not(.department__image) { grid-column: 1; }
.department__code { color: var(--accent-text); font-weight: 800; font-size: 14px; letter-spacing: 0.1em; margin: 8px 0 10px; }
html[dir="rtl"] .department__code { text-align: right; }
.department__title { font-size: clamp(28px, 4vw, 42px); margin-bottom: 14px; }
.department__text { color: var(--muted); font-size: 18px; margin-bottom: 26px; }
.department .btn { justify-self: start; }

.system { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.system:nth-of-type(odd) { background: var(--bg-alt); }
.system:nth-of-type(odd) .system__image { order: 2; }
.system__image { border-radius: var(--radius-lg); aspect-ratio: 4 / 3; }
.system__title { font-size: clamp(28px, 4vw, 42px); margin-bottom: 14px; }
.system__text { color: var(--muted); font-size: 18px; margin-bottom: 22px; }
.system__list { display: grid; gap: 12px; }
.system__list li { position: relative; padding-inline-start: 34px; font-weight: 500; }
.system__list li::before {
  content: "✓"; position: absolute; inset-inline-start: 0; top: 2px;
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--accent-text); font-size: 12px; font-weight: 800;
}

.services__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 12px; counter-reset: svc; }
.service { padding: 28px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); counter-increment: svc; transition: transform var(--transition), border-color var(--transition); }
.service:hover { transform: translateY(-4px); border-color: var(--accent); }
.service::before { content: "0" counter(svc); display: block; font-weight: 800; color: var(--accent-text); margin-bottom: 14px; }
.service__title { font-size: 19px; margin-bottom: 8px; }
.service__text { color: var(--muted); font-size: 15px; }

/* ---------- 18. الصفحات القانونية ---------- */
.legal { max-width: calc(820px + 2 * var(--gutter)); margin: 0 auto; }
.legal .page-hero__title { color: var(--text); font-size: clamp(32px, 5vw, 50px); margin-bottom: 10px; }
.legal__date { color: var(--muted); font-size: 14px; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.legal p:not(.legal__date) { font-size: 17.5px; line-height: 1.95; margin-bottom: 20px; }

/* ---------- 19. صفحة المنتج ---------- */
.product-hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: calc(92vh - var(--header-h));
  display: flex; align-items: flex-end;
  padding: 120px var(--gutter) clamp(48px, 7vw, 80px); color: #FBF8F2;
}
.product-hero__image { position: absolute; inset: 0; z-index: -2; }
.product-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(12, 13, 16, 0.88) 0%, rgba(12, 13, 16, 0.2) 65%); }
.product-hero__content { max-width: 720px; animation: fadeUp 0.9s var(--ease) both; }
.product-hero__badge { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--gold); color: #15171B; font-weight: 700; font-size: 13px; margin-bottom: 16px; }
.product-hero__title { font-size: clamp(42px, 8vw, 88px); line-height: 1.05; margin-bottom: 14px; }
.product-hero__tagline { font-size: clamp(17px, 2vw, 22px); color: rgba(251, 248, 242, 0.85); margin-bottom: 30px; max-width: 580px; }
.product-hero__buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.product-hero .btn--primary, .closing-banner .btn--primary, .product-cta .btn--primary { background: var(--gold); color: #15171B; }
.product-hero .btn--primary:hover, .product-cta .btn--primary:hover { background: var(--gold-soft); }
.product-hero .btn--secondary, .product-cta .btn--secondary { color: #FBF8F2; border-color: rgba(251, 248, 242, 0.45); }
.product-hero .btn--secondary:hover, .product-cta .btn--secondary:hover { border-color: var(--gold-soft); color: var(--gold-soft); }
.product-hero__micro { margin-top: 14px; font-size: 13.5px; color: rgba(251, 248, 242, 0.7); }

.product-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.product-stats--bar { margin: -40px var(--gutter) 0; position: relative; z-index: 2; box-shadow: var(--shadow-lg); }
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px; padding: 22px 24px; background: var(--surface); }
.stat__value { font-size: clamp(18px, 2.2vw, 24px); font-weight: 800; color: var(--text); line-height: 1.3; }
.stat__label { font-size: 13.5px; color: var(--muted); }

.product-story { max-width: calc(940px + 2 * var(--gutter)); margin: 0 auto; text-align: center; }
.product-story .eyebrow { justify-content: center; }
.product-story__text { font-size: clamp(22px, 3.2vw, 34px); font-weight: 500; line-height: 1.6; }

.highlight { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); min-height: 70vh; }
.highlight:nth-of-type(even) { direction: ltr; }
html[dir="ltr"] .highlight:nth-of-type(even) { direction: rtl; }
.highlight:nth-of-type(even) > * { direction: initial; }
html[dir="rtl"] .highlight:nth-of-type(even) > * { direction: rtl; }
html[dir="ltr"] .highlight:nth-of-type(even) > * { direction: ltr; }
.highlight__image { min-height: 60vh; }
.highlight__content { display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 6vw, 96px); background: var(--bg-alt); }
.highlight__title { font-size: clamp(30px, 4.4vw, 50px); margin-bottom: 16px; }
.highlight__text { color: var(--muted); font-size: 18px; max-width: 460px; }

.product-space { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px clamp(32px, 5vw, 64px); align-items: start; }
.product-space > .eyebrow, .product-space > .section__title { grid-column: 1 / -1; margin-bottom: 0; }
.product-space__plan { grid-row: span 2; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.product-space__list { display: grid; gap: 0; border-top: 1px solid var(--border); }
.space-item { display: flex; flex-direction: column; padding: 16px 0; border-bottom: 1px solid var(--border); }
.space-item__name { font-weight: 700; font-size: 17px; }
.space-item__desc { color: var(--muted); font-size: 14.5px; }
.product-space .product-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* مخطط أرضي مرسوم بـ CSS لحين إضافة صور المخططات */
.product-space__plan, .size-panel__plan {
  position: relative;
  background-color: var(--surface);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
}
.product-space__plan::before, .size-panel__plan::before {
  content: ""; position: absolute; inset: 18% 12%;
  border: 3px solid var(--accent); border-radius: 4px;
  background:
    linear-gradient(90deg, transparent calc(58% - 1px), var(--accent) calc(58% - 1px), var(--accent) calc(58% + 1px), transparent calc(58% + 1px)) ,
    linear-gradient(0deg, transparent calc(45% - 1px), rgba(209, 183, 115, 0.7) calc(45% - 1px), rgba(209, 183, 115, 0.7) calc(45% + 1px), transparent calc(45% + 1px)) 58% 0 / 42% 100% no-repeat;
}
.product-space__plan::after, .size-panel__plan::after {
  content: ""; position: absolute; bottom: calc(18% - 2px); inset-inline-start: 22%; width: 12%; height: 4px; background: var(--surface);
}

.product-sizes { background: var(--bg-alt); }
.size-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.size-tab {
  min-height: 44px; padding: 8px 22px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); font-weight: 700;
  transition: all var(--transition);
}
.size-tab:hover { border-color: var(--accent); }
.size-tab--active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.size-panel { display: grid; gap: 22px; animation: fadeUp 0.45s var(--ease); }
.size-panel__images { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.size-panel__3d, .size-panel__plan { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.size-panel__3d { position: relative; overflow: hidden; }
.size-panel__3d::before {
  content: ""; position: absolute; left: 50%; top: 52%; width: 46%; height: 28%;
  transform: translate(-50%, -50%) skewY(-14deg);
  background: linear-gradient(135deg, var(--accent), var(--green));
  border-radius: 6px; box-shadow: 30px 30px 0 -6px rgba(0, 0, 0, 0.12);
}
/* لما تتوفر صورة الوحدة يختفي الرسم المؤقت */
.size-panel__3d[style*="background-image"]::before,
.size-panel__3d[style*="background-image"]::after { display: none; }
.size-panel__3d::after {
  content: "3D"; position: absolute; top: 16px; inset-inline-start: 18px;
  font-weight: 800; font-size: 13px; color: var(--accent-text); letter-spacing: 0.12em;
}
.size-panel__desc { color: var(--muted); font-size: 17px; max-width: 720px; }
.size-panel .btn { justify-self: start; }

.gallery__track { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.gallery__slide { position: relative; animation: fadeIn 0.5s ease; }
.gallery__image { aspect-ratio: 16 / 8; }
.gallery__label {
  position: absolute; top: 18px; inset-inline-start: 18px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: rgba(14, 15, 19, 0.6); color: #FBF8F2;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.gallery__caption {
  position: absolute; inset-inline: 0; bottom: 0; padding: 60px 24px 20px;
  background: linear-gradient(0deg, rgba(12, 13, 16, 0.78), transparent);
  color: #FBF8F2; font-weight: 500; font-size: 17px;
}
.gallery__controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; }
.gallery__btn {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border-strong);
  font-size: 24px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.gallery__btn:hover { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
html[dir="rtl"] .gallery__btn { transform: scaleX(-1); }
.gallery__counter { font-weight: 700; color: var(--muted); min-width: 70px; text-align: center; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.features { background: var(--bg-alt); }
.features__intro { color: var(--muted); max-width: 640px; font-size: 18px; margin-bottom: 36px; }
.features__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.feature { padding: 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.feature__tag { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--accent-text); background: var(--surface-2); padding: 4px 12px; border-radius: 999px; margin-bottom: 16px; }
.feature__title { font-size: 19px; margin-bottom: 8px; }
.feature__text { color: var(--muted); font-size: 15px; }

.product-cta { margin-top: clamp(64px, 9vw, 110px); }
.product-cta__image { position: absolute; inset: 0; z-index: -2; }
.product-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(150deg, rgba(21, 23, 27, 0.92), rgba(21, 23, 27, 0.7)); }
.product-cta .eyebrow { color: var(--gold-soft); justify-content: center; }

.closing-banner { position: relative; isolation: isolate; overflow: hidden; min-height: 50vh; display: flex; align-items: center; justify-content: center; padding: 60px var(--gutter); }
.closing-banner__image { position: absolute; inset: 0; z-index: -2; }
.closing-banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(12, 13, 16, 0.55); }
.closing-banner__text { color: #FBF8F2; font-size: clamp(34px, 7vw, 84px); font-weight: 800; text-align: center; line-height: 1.1; }

#productPage:has(.sticky-bar) { padding-bottom: 96px; }
.sticky-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter);
  background: var(--header-bg); border-top: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  animation: slideUp 0.5s var(--ease) both;
}
.sticky-bar__title { font-weight: 800; font-size: 16px; }
.sticky-bar__sub { color: var(--muted); font-size: 13.5px; }
.sticky-bar__buttons { display: flex; gap: 10px; flex-shrink: 0; }
.sticky-bar .btn { min-height: 44px; padding: 10px 20px; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }

/* ---------- 20. حاسبة السعر ---------- */
.configurator { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.configurator__backdrop { position: absolute; inset: 0; background: rgba(12, 13, 16, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.configurator--enter .configurator__backdrop { animation: fadeIn 0.25s ease; }
.configurator__dialog {
  position: relative; width: min(1120px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.configurator--enter .configurator__dialog { animation: popIn 0.35s var(--ease); }
.configurator__dialog:focus { outline: none; }
.configurator__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px clamp(20px, 3vw, 32px); border-bottom: 1px solid var(--border); background: var(--surface); }
.configurator__head .eyebrow { margin-bottom: 4px; }
.configurator__title { font-size: clamp(22px, 3vw, 30px); }
.configurator__close { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); font-size: 26px; line-height: 1; flex-shrink: 0; transition: all var(--transition); }
.configurator__close:hover { background: var(--surface-2); border-color: var(--accent); }
.configurator__body { overflow-y: auto; padding: clamp(20px, 3vw, 32px); }
@keyframes popIn { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: none; } }

.cfg-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 28px; align-items: start; }
.cfg-steps { display: grid; gap: 22px; }
.cfg-step { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: var(--surface); display: grid; gap: 10px; min-width: 0; }
.cfg-step__title { font-weight: 800; font-size: 17px; padding: 0 6px; display: flex; gap: 10px; align-items: center; }
.cfg-step__title span { color: var(--accent-text); font-size: 14px; }
.cfg-sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cfg-size {
  position: relative; display: grid; gap: 2px; padding: 16px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1.5px solid var(--border-strong); background: var(--bg); transition: all var(--transition);
}
.cfg-size input { position: absolute; top: 14px; inset-inline-end: 14px; }
.cfg-size:hover { border-color: var(--accent); }
.cfg-size--active { border-color: var(--accent); background: var(--surface-2); box-shadow: 0 0 0 3px rgba(209, 183, 115, 0.2); }
.cfg-size__name { font-weight: 800; font-size: 17px; }
.cfg-size__area { color: var(--muted); font-size: 14px; }
.cfg-size__price { font-weight: 700; color: var(--accent-text); }
.cfg-choice {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--border); background: var(--bg); transition: all var(--transition);
}
.cfg-choice:hover { border-color: var(--accent); }
.cfg-choice:has(input:checked) { border-color: var(--accent); background: var(--surface-2); }
.cfg-choice__body { display: grid; }
.cfg-choice__name { font-weight: 700; }
.cfg-choice__desc { font-size: 13.5px; color: var(--muted); }
.cfg-choice__price { font-weight: 700; white-space: nowrap; font-size: 14.5px; }
.cfg-step .form__field { margin-bottom: 4px; }

.cfg-summary { position: sticky; top: 0; display: grid; gap: 12px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.cfg-summary__title { font-size: 19px; }
.cfg-summary__unit { color: var(--accent-text); font-weight: 700; margin-top: -6px; }
.cfg-summary__lines { display: grid; gap: 8px; padding: 12px 0; border-block: 1px solid var(--border); }
.cfg-summary__lines li, .cfg-summary__row { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.cfg-summary__lines li span:last-child, .cfg-summary__row span:last-child { white-space: nowrap; font-weight: 500; }
.cfg-summary__row { color: var(--muted); }
.cfg-summary__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.cfg-summary__total strong { font-size: 26px; color: var(--accent-text); white-space: nowrap; }
.cfg-summary__note { font-size: 12.5px; color: var(--muted); }
.cfg-success { max-width: 560px; margin: 0 auto; text-align: center; display: grid; gap: 16px; }
.cfg-success .cfg-summary { position: static; text-align: start; }
.cfg-success__icon { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-size: 34px; display: flex; align-items: center; justify-content: center; animation: popIn 0.5s var(--ease); }
.cfg-success__title { font-size: 28px; }
.cfg-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- 21. الفوتر ---------- */
.footer {
  display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 40px;
  padding: clamp(56px, 8vw, 90px) var(--gutter) 28px;
  background: var(--green-deep); color: #E9E4D9;
  margin-top: auto;
}
html[data-theme="dark"] .footer { background: #0C0D10; border-top: 1px solid var(--border); }
.footer__brand { display: grid; gap: 8px; align-content: start; font-size: 15px; }
.footer__brand p { color: rgba(233, 228, 217, 0.75); }
html[dir="rtl"] .footer__brand p[dir="ltr"] { text-align: right; }
.footer__logo {
  display: block; width: 170px; height: 82px; margin-bottom: 8px;
  font-size: 0; color: transparent;
  background: url("../images/saah-logo.png") right center / contain no-repeat;
}
html[dir="ltr"] .footer__logo { background-position: left center; }
.footer__desc { max-width: 340px; margin-bottom: 8px; }
.footer__title { font-size: 15px; color: var(--gold-soft); margin-bottom: 16px; }
.footer__list { display: grid; gap: 10px; }
.footer__link { color: rgba(233, 228, 217, 0.78); font-size: 15px; }
.footer__link:hover { color: #FFFFFF; }
.footer__bottom {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px;
  padding-top: 24px; margin-top: 8px; border-top: 1px solid rgba(233, 228, 217, 0.14);
}
.footer__copy { margin-inline-start: auto; color: rgba(233, 228, 217, 0.55); font-size: 14px; }

/* ---------- 22. صفحة الدخول ---------- */
.auth {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 90px 16px 40px; text-align: center; position: relative;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(209, 183, 115, 0.22), transparent 60%),
    var(--bg);
}
.auth__top { position: absolute; top: 18px; inset-inline: 16px; display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; }
.auth__home { color: var(--accent-text); font-weight: 700; }
.auth__badge { width: 68px; height: 68px; border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 30px; background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow); }
.auth__brand { font-size: clamp(24px, 4vw, 32px); margin-top: 8px; }
.auth__subtitle { color: var(--muted); margin-bottom: 18px; }
.auth__form { width: min(440px, 100%); text-align: start; padding: clamp(24px, 4vw, 36px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.auth__title { font-size: 22px; margin-bottom: 18px; }
.auth__form .form__submit { width: 100%; justify-self: stretch; }
.auth__secure { color: var(--muted); font-size: 13.5px; margin-top: 8px; }
.auth__secure::before { content: "🔒 "; }

/* ---------- 23. لوحة التحكم ---------- */
.admin { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.admin__bar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px var(--gutter); background: var(--green-deep); color: #F1EDE4;
}
.admin__brand { font-weight: 800; font-size: 18px; color: var(--gold-soft); }
.admin__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin__link { color: rgba(241, 237, 228, 0.85); font-weight: 500; font-size: 14px; }
.admin__link:hover { color: #fff; }
.admin__user { font-size: 13px; color: rgba(241, 237, 228, 0.65); }
.admin__bar .lang-toggle { background: transparent; color: #F1EDE4; border-color: rgba(241, 237, 228, 0.3); }
.admin__bar .btn--secondary { color: #F1EDE4; border-color: rgba(241, 237, 228, 0.35); min-height: 40px; padding: 6px 16px; font-size: 14px; }
.admin__bar .btn--secondary:hover { border-color: var(--gold-soft); color: var(--gold-soft); }
.admin__tabs { display: flex; gap: 4px; overflow-x: auto; padding: 0 var(--gutter); background: var(--surface); border-bottom: 1px solid var(--border); scrollbar-width: none; }
.admin__tabs::-webkit-scrollbar { display: none; }
.admin-tab {
  position: relative; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 16px 18px; font-weight: 700; font-size: 15px; color: var(--muted);
  border-bottom: 3px solid transparent; transition: color var(--transition), border-color var(--transition);
}
.admin-tab:hover { color: var(--text); }
.admin-tab--active { color: var(--accent-text); border-bottom-color: var(--accent); }
.admin-tab__badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.admin__panel { flex: 1; padding: clamp(24px, 4vw, 44px) var(--gutter) 80px; display: grid; gap: 20px; align-content: start; }
.admin__panel:focus { outline: none; }
.admin__toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 150%); z-index: 90;
  padding: 12px 22px; border-radius: 999px; background: var(--primary); color: var(--on-primary);
  font-weight: 700; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
.admin__toast:empty { display: none; }
.admin__toast--show { transform: translate(-50%, 0); opacity: 1; }

.admin-head { display: grid; gap: 6px; }
.admin-head--row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-head__title { font-size: clamp(24px, 3vw, 32px); }
.admin-head__note { color: var(--muted); font-size: 14.5px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.admin-stat { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.admin-stat--accent { border-color: var(--accent); background: linear-gradient(135deg, var(--surface), var(--surface-2)); }
.admin-stat__value { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1.2; }
html[dir="rtl"] .admin-stat__value { text-align: right; }
.admin-stat__label { color: var(--muted); font-size: 14px; }
.admin-card { padding: clamp(18px, 3vw, 28px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: grid; gap: 14px; }
.admin-card--danger { border-color: var(--danger); }
.admin-card--danger .btn { justify-self: start; }
.admin-card__title { font-size: 19px; }
.admin-card__sub { font-size: 15.5px; color: var(--accent-text); margin-top: 6px; }
.admin-empty { padding: 40px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.admin-activity { display: grid; }
.admin-activity__item { width: 100%; display: flex; justify-content: space-between; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--border); text-align: start; font-size: 15px; }
.admin-activity li:last-child .admin-activity__item { border-bottom: 0; }
.admin-activity__item:hover { color: var(--accent-text); }
.admin-activity__item time { color: var(--muted); font-size: 13px; white-space: nowrap; }
.admin-list { display: grid; gap: 14px; }
.admin-item { display: grid; gap: 12px; padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.admin-item--unread { border-inline-start: 4px solid var(--accent); }
.admin-item__top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-item__meta { font-size: 13px; color: var(--muted); }
.admin-item__title { font-size: 18px; }
.admin-item__phone { font-size: 14px; font-weight: 500; color: var(--muted); }
.admin-item__sub { color: var(--muted); font-size: 14.5px; }
.admin-item__sub a:hover, .admin-item__details a:hover { color: var(--accent-text); }
.admin-item__side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.admin-item__total { font-size: 20px; color: var(--accent-text); }
.admin-status { min-height: 38px; padding-block: 6px; font-size: 14px; font-weight: 700; width: auto; }
.admin-status--new { border-color: var(--accent); }
.admin-status--won { border-color: var(--success); color: var(--success); }
.admin-status--lost { color: var(--muted); }
.admin-item__details summary { cursor: pointer; font-weight: 700; color: var(--accent-text); font-size: 14.5px; }
.admin-item__details[open] { display: grid; gap: 8px; }
.admin-item__details[open] summary { margin-bottom: 4px; }
.admin-item__message { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg); white-space: pre-wrap; }
.admin-item__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-dl { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 14.5px; }
.admin-dl dt { color: var(--muted); font-size: 13px; }
.admin-dl dd { font-weight: 500; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.admin-table th, .admin-table td { padding: 10px 14px; text-align: start; border-bottom: 1px solid var(--border); }
.admin-table tbody tr:last-child > * { border-bottom: 0; }
.admin-table thead th { background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 13px; }
.admin-table tbody th { font-weight: 500; }
.admin-table .form__input { min-height: 40px; padding: 6px 10px; max-width: 170px; }
.admin-table__saah { font-weight: 700; color: var(--accent-text); white-space: nowrap; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.admin-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; }
.admin-settings { display: grid; gap: 20px; }
.admin-subs { display: grid; }
.admin-subs li { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.admin-subs li a { font-weight: 500; }
.admin-subs li time { color: var(--muted); font-size: 13px; margin-inline-start: auto; }

/* ---------- 24. التجاوب ---------- */
@media (max-width: 1100px) {
  .menu-toggle { display: inline-flex; order: 3; }
  .header__actions { margin-inline-start: auto; }
  .nav {
    display: none; position: absolute; top: 100%; inset-inline: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    padding: 12px var(--gutter) 24px; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
  }
  .nav--open { display: flex; animation: dropIn 0.25s var(--ease); }
  .nav__item { flex-wrap: wrap; border-bottom: 1px solid var(--border); }
  .nav__link { flex: 1; padding: 14px 4px; font-size: 17px; }
  .nav__toggle { width: 44px; height: 44px; }
  .nav__sub { position: static; width: 100%; max-width: none; min-width: 0; box-shadow: none; border: 0; padding: 0 0 10px; background: transparent; animation: none; }
  .nav__sub::before { display: none; }

  .products-grid, .blog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features__grid, .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .method, .leading, .about-story, .system, .contact, .product-space, .cfg-grid { grid-template-columns: minmax(0, 1fr); }
  .system:nth-of-type(odd) .system__image { order: 0; }
  .method__images { height: 380px; }
  .leading__badge { bottom: 16px; }
  .art__cards, .values__grid, .features-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; }
  .vision { grid-template-columns: minmax(0, 1fr); }
  .partners__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact__direct { position: static; }
  .department { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .department__image, .department:nth-child(even) .department__image { grid-row: auto; grid-column: auto; margin-bottom: 24px; }
  .department:nth-child(even) > :not(.department__image) { grid-column: auto; }
  .highlight, .highlight:nth-of-type(even) { grid-template-columns: minmax(0, 1fr); direction: inherit; min-height: 0; }
  html[dir="ltr"] .highlight:nth-of-type(even) { direction: ltr; }
  .highlight__image { min-height: 46vh; }
  .product-space__plan { grid-row: auto; }
  .product-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .size-panel__images { grid-template-columns: minmax(0, 1fr); }
  .cfg-summary { position: static; }
  .brand-block__colors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  :root { --header-h: 64px; }
  body { font-size: 15.5px; }
  .header { gap: 10px; }
  .header__logo img { height: 36px; }
  .theme-toggle { font-size: 12.5px; padding: 6px 10px; }
  .header__login { display: none; }
  .nav { max-height: calc(100vh - 64px); }

  .hero { padding-top: 80px; }
  .hero__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-stat { padding: 14px 12px; }
  .hero-stat__label { font-size: 12px; }
  .method__stats { grid-template-columns: minmax(0, 1fr); }
  .method__images { height: 300px; }
  .products-grid, .blog__grid, .features__grid, .services__grid { grid-template-columns: minmax(0, 1fr); }
  .footer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 20px; }
  .footer__copy { margin-inline-start: 0; width: 100%; }
  .faq__more { padding: 20px; }
  .newsletter, .cta { border-radius: var(--radius); }
  .product-stats--bar { margin-top: -28px; }
  .stat { padding: 16px; }
  .gallery__image { aspect-ratio: 4 / 3; }

  .sticky-bar { flex-direction: column; align-items: stretch; gap: 8px; padding-block: 10px; }
  .sticky-bar__info { display: none; }
  .sticky-bar__buttons > * { flex: 1; }
  .sticky-bar .btn { padding: 10px 12px; font-size: 14px; }
  #productPage:has(.sticky-bar) { padding-bottom: 72px; }

  .configurator { padding: 0; align-items: flex-end; }
  .configurator__dialog { max-height: 94vh; max-height: 94dvh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .cfg-choice { grid-template-columns: auto 1fr; }
  .cfg-choice__price { grid-column: 2; }

  .admin__bar { padding-block: 10px; }
  .admin__user { display: none; }
  .admin-item__side { align-items: flex-start; }
  .form__submit { width: 100%; }
}

@media (max-width: 380px) {
  .footer { grid-template-columns: minmax(0, 1fr); }
  .theme-toggle { max-width: 96px; white-space: normal; line-height: 1.2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media print {
  #site-header, #site-footer, .sticky-bar, .hero__scroll, .newsletter { display: none !important; }
  body { background: #fff; color: #000; }
}
.partners__grid .partner {
    height: 120px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.partners__grid .partner img {
    width: 70%;
    height: 70%;
    object-fit: contain;
    display: block;
}
.partners__grid .partner {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* الأبيض فقط للخانات اللي فيها شعار */
.partners__grid .partner:has(img) {
    background: white;
    border-radius: 12px;
}

/* حجم الشعارات */
.partners__grid .partner img {
    width: 70%;
    height: 70%;
    object-fit: contain;
    display: block;
}
/* زر واتساب العائم */
.whatsapp-float {
  position: fixed;
  left: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
}

.whatsapp-float:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 9px 28px rgba(0, 0, 0, 0.4);
}

@media (max-width: 600px) {
  .whatsapp-float {
    left: 16px;
    bottom: 16px;
    width: 54px;
    height: 54px;
  }

  .whatsapp-float svg {
    width: 30px;
    height: 30px;
  }
}
/* ===== تصور مساحة المنتج ===== */

.product-space__visual {
  margin: 36px 0;
  min-height: 430px;
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(rgba(120, 120, 120, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 120, 120, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

.space-plan-wrap {
  position: relative;
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px;
}

.space-plan-shape {
  position: relative;
  min-width: 180px;
  min-height: 130px;
  border: 2px solid var(--accent);
  border-radius: 4px;
  background: rgba(209, 183, 115, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width .4s ease, height .4s ease;
}

.space-plan-area {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.space-plan-area strong {
  font-size: clamp(24px, 3vw, 38px);
  color: var(--text);
}

.space-plan-area span {
  font-size: 14px;
  color: var(--muted);
}

.space-measure {
  position: absolute;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

.space-measure--length {
  bottom: 12px;
  left: 15%;
  right: 15%;
  border-top: 1px solid var(--accent);
  text-align: center;
}

.space-measure--length span {
  position: relative;
  top: -12px;
  padding: 0 10px;
  background: var(--bg);
}

.space-measure--width {
  top: 15%;
  bottom: 15%;
  right: 12px;
  border-right: 1px solid var(--accent);
}

.space-measure--width span {
  position: absolute;
  top: 50%;
  right: -8px;
  transform: translate(50%, -50%) rotate(-90deg);
  white-space: nowrap;
  padding: 0 10px;
  background: var(--bg);
}

@media (max-width: 700px) {
  .product-space__visual {
    min-height: 330px;
    padding: 20px;
  }

  .space-plan-wrap {
    height: 280px;
    padding: 40px;
  }

  .space-plan-shape {
    min-width: 120px;
    min-height: 100px;
  }
}
/* ==========================================
   Configurator - اختيار المقاس
   ========================================== */

.cfg-step__title {
  font-size: clamp(24px, 3vw, 34px);
  margin: 0 0 8px;
  font-weight: 800;
}

.cfg-step__text {
  color: var(--muted);
  margin: 0 0 28px;
  line-height: 1.7;
}

/* شبكة خيارات المقاسات */
.choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 28px;
}

/* بطاقة المقاس */
.choice {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;

  min-height: 190px;
  padding: 22px;

  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);

  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;

  overflow: hidden;
}

.choice:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

/* نخفي زر الراديو الافتراضي */
.choice input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* الخيار المحدد */
.choice--active {
  border: 2px solid var(--accent);
  background:
    linear-gradient(
      145deg,
      rgba(209, 183, 115, 0.14),
      transparent 65%
    ),
    var(--surface);
}

/* علامة صغيرة للخيار المحدد */
.choice--active::after {
  content: "✓";
  position: absolute;
  top: 16px;
  left: 16px;

  width: 28px;
  height: 28px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

/* كود المنتج */
.choice__code {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* اسم المقاس */
.choice__name {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-top: 4px;
}

/* الوصف والأبعاد */
.choice__desc {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  flex: 1;
}

/* السعر */
.choice__price {
  display: block;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);

  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}

/* الجوال */
@media (max-width: 850px) {
  .choices {
    grid-template-columns: 1fr;
  }

  .choice {
    min-height: auto;
  }
}
/* إزالة أي إطار خلف بطاقات المقاسات */
fieldset.choices {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 24px 0 28px !important;
  min-width: 0;
  background: transparent !important;
}

fieldset.choices legend {
  display: none !important;
}
/* ==========================================
   Configurator Progress Steps
   ========================================== */

.progress {
  list-style: none;
  margin: 0;
  padding: 22px 45px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  direction: rtl;
}

.progress__step {
  position: relative;
  flex: 1;
  max-width: 170px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

/* الدائرة */
.progress__step::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  margin: 0 auto 9px;
  border-radius: 50%;
  background: #ddd7ca;
  position: relative;
  z-index: 2;
}

/* الخط الواصل */
.progress__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: #ddd7ca;
  z-index: 1;
}

/* الخطوات المكتملة */
.progress__step--done {
  color: var(--text);
}

.progress__step--done::before {
  background: var(--accent);
}

.progress__step--done::after {
  background: var(--accent) !important;
}

/* الخطوة الحالية */
.progress__step--current {
  color: var(--text);
  font-weight: 800;
}

.progress__step--current::before {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(209, 183, 115, 0.18);
}

/* رقم الخطوة */
.configurator__counter {
  margin: 4px 0 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

/* الجوال */
@media (max-width: 700px) {
  .progress {
    padding: 18px 12px 10px;
  }

  .progress__step {
    font-size: 10px;
  }

  .progress__step::before {
    width: 10px;
    height: 10px;
  }

  .progress__step:not(:last-child)::after {
    top: 4px;
  }
}
/* ===== Saah Space Plan ===== */

.space-plan-shape {
  position: relative;
  overflow: hidden;
  background: #fffdf8;
  border: 2px solid var(--accent);
  border-radius: 4px;
}

.space-plan-zones {
  position: absolute;
  inset: 0;
  display: grid;
  width: 100%;
  height: 100%;
}

/* منتج فيه غرفتين */
.space-plan-zones--2 {
  grid-template-columns: 1.4fr 1fr;
}

/* 3 مساحات */
.space-plan-zones--3 {
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.space-plan-zones--3 .space-plan-zone:first-child {
  grid-row: 1 / 3;
}

/* 4 مساحات */
.space-plan-zones--4 {
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: 1fr 1fr;
}

/* 5 مساحات */
.space-plan-zones--5 {
  grid-template-columns: 1.5fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.space-plan-zones--5 .space-plan-zone:first-child {
  grid-row: 1 / 3;
}

/* 6 مساحات */
.space-plan-zones--6 {
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.space-plan-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid rgba(184, 143, 50, 0.55);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

.space-plan-zone:nth-child(even) {
  background: rgba(209, 183, 115, 0.10);
}

/* المساحة الكلية في زاوية المخطط */
.space-plan-area {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 5;
  padding: 6px 9px;
  background: rgba(255, 253, 248, 0.92);
  border-radius: 6px;
  text-align: center;
  pointer-events: none;
}

.space-plan-area strong {
  display: block;
  font-size: 18px;
  line-height: 1;
  color: var(--ink);
}

.space-plan-area span {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  color: var(--muted);
}

/* الجوال */
@media (max-width: 700px) {
  .space-plan-zone {
    padding: 4px;
    font-size: 9px;
  }

  .space-plan-area strong {
    font-size: 14px;
  }
}
/* ===== Saah Sizes Comparison ===== */

.sizes-compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 32px;
}

.size-compare-card {
  appearance: none;
  width: 100%;
  padding: 26px;
  border: 1px solid rgba(38, 37, 31, 0.14);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  text-align: right;
  font: inherit;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.size-compare-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
}

.size-compare-card--active {
  border: 2px solid var(--accent);
  background:
    linear-gradient(
      145deg,
      rgba(209, 183, 115, 0.16),
      rgba(255, 255, 255, 0.96) 55%
    );
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.size-compare-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  margin-bottom: 18px;
}

.size-compare-card__code {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.size-compare-card__check {
  display: flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.size-compare-card__name {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
}

.size-compare-card__desc {
  min-height: 48px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.size-compare-card__specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 18px 0;
  border-top: 1px solid rgba(38, 37, 31, 0.10);
  border-bottom: 1px solid rgba(38, 37, 31, 0.10);
}

.size-compare-card__specs div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.size-compare-card__specs strong {
  font-size: 17px;
}

.size-compare-card__specs span {
  color: var(--muted);
  font-size: 12px;
}

.size-compare-card__price {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
}

.size-compare-card__price span {
  color: var(--muted);
  font-size: 12px;
}

.size-compare-card__price strong {
  font-size: 20px;
}

.size-selected-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding: 20px 24px;
  border-radius: 16px;
  background: rgba(209, 183, 115, 0.10);
}

.size-selected-action p {
  margin: 0;
}

@media (max-width: 900px) {
  .sizes-compare {
    grid-template-columns: 1fr;
  }

  .size-compare-card__desc {
    min-height: 0;
  }
}

@media (max-width: 600px) {
  .size-compare-card {
    padding: 20px;
  }

  .size-selected-action {
    flex-direction: column;
    align-items: stretch;
  }

  .size-selected-action .btn {
    width: 100%;
  }
}
/* ===== Saah 3D Suite Preview ===== */

.suite-3d-view {
  position: relative;
  min-height: 390px;
  margin-top: 28px;
  padding: 35px;
  overflow: hidden;
  border: 1px solid rgba(38, 37, 31, 0.10);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 45%, rgba(209,183,115,.18), transparent 38%),
    linear-gradient(145deg, #f8f5ed, #eee8dc);
}

.suite-3d-scene {
  position: relative;
  width: 100%;
  height: 280px;
  perspective: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* المبنى */
.suite-building {
  --building-width: 330px;

  position: relative;
  width: var(--building-width);
  height: 145px;

  transform-style: preserve-3d;
  transform: rotateX(-8deg) rotateY(-25deg);
  transition:
    width .45s ease,
    transform .45s ease;
}

/* اختلاف طول المجسم حسب المقاس */
.suite-3d-scene--suite-30 .suite-building {
  --building-width: 270px;
}

.suite-3d-scene--suite-40 .suite-building {
  --building-width: 350px;
}

/* الواجهة الأمامية */
.suite-face--front {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 5px;

  background:
    linear-gradient(
      105deg,
      #b89b58 0%,
      #88764d 34%,
      #3b3a32 75%,
      #20211f 100%
    );

  box-shadow: 0 25px 45px rgba(0,0,0,.18);
}

/* الجانب */
.suite-face--side {
  position: absolute;
  top: 0;
  right: -44px;

  width: 45px;
  height: 145px;

  transform-origin: left center;
  transform: rotateY(90deg);

  background: linear-gradient(
    90deg,
    #252622,
    #151614
  );
}

/* السقف */
.suite-face--roof {
  position: absolute;
  top: -44px;
  left: 0;

  width: 100%;
  height: 45px;

  transform-origin: bottom center;
  transform: rotateX(90deg);

  background: linear-gradient(
    90deg,
    #c9ae69,
    #4b493d
  );
}

/* نافذة */
.suite-window {
  position: absolute;
  top: 32px;
  right: 35px;

  width: 105px;
  height: 72px;

  border: 3px solid rgba(218,190,116,.9);

  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,.28),
      rgba(28,36,38,.92)
    );

  box-shadow:
    inset 0 0 20px rgba(255,255,255,.08);
}

.suite-window::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;

  width: 1px;
  height: 100%;

  background: rgba(218,190,116,.75);
}

/* الباب */
.suite-door {
  position: absolute;
  bottom: 0;
  left: 38px;

  width: 55px;
  height: 100px;

  border: 2px solid rgba(218,190,116,.65);

  background:
    linear-gradient(
      120deg,
      #292a27,
      #111210
    );
}

/* ظل المبنى */
.suite-building::after {
  content: "";
  position: absolute;

  left: 15px;
  right: -45px;
  bottom: -32px;

  height: 30px;

  background: rgba(0,0,0,.17);
  filter: blur(13px);

  transform: rotateX(75deg);
}

/* معلومات المجسم */
.suite-3d-info {
  position: absolute;
  right: 28px;
  bottom: 25px;

  display: flex;
  flex-direction: column;
  gap: 3px;
}

.suite-3d-info span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.suite-3d-info strong {
  font-size: 20px;
}

.suite-3d-info small {
  color: var(--muted);
}


/* ===== المقاس المزدوج ===== */

.suite-3d-scene--suite-40d .suite-building {
  --building-width: 285px;

  transform:
    translateX(75px)
    rotateX(-8deg)
    rotateY(-25deg);
}

.suite-building--second {
  position: absolute;

  transform:
    translateX(-135px)
    translateY(45px)
    rotateX(-8deg)
    rotateY(-25deg);

  z-index: 2;
}


/* ===== Mobile ===== */

@media (max-width: 700px) {

  .suite-3d-view {
    min-height: 330px;
    padding: 20px;
  }

  .suite-3d-scene {
    height: 230px;
    transform: scale(.78);
  }

  .suite-3d-info {
    right: 20px;
    bottom: 18px;
  }

}
/* ===== 3D dimensions ===== */

.suite-3d-view {
  position: relative;
}

/* خطوط القياس */
.suite-dimension {
  position: absolute;
  color: #b9933f;
  font-size: 14px;
  font-weight: 700;
  z-index: 5;
  pointer-events: none;
}

/* قياس الطول */
.suite-dimension--length {
  width: 42%;
  left: 29%;
  bottom: 45px;
  text-align: center;
  border-bottom: 1px solid #c9a64d;
  line-height: 0;
}

.suite-dimension--length span {
  background: #f5f0e6;
  padding: 0 10px;
}

/* قياس العرض */
.suite-dimension--width {
  right: 12%;
  top: 34%;
  height: 32%;
  border-right: 1px solid #c9a64d;
  display: flex;
  align-items: center;
}

.suite-dimension--width span {
  background: #f5f0e6;
  padding: 6px 4px;
  transform: translateX(50%);
}

/* نهايات خطوط القياس */
.suite-dimension--length::before,
.suite-dimension--length::after {
  content: "";
  position: absolute;
  bottom: -5px;
  height: 10px;
  border-left: 1px solid #c9a64d;
}

.suite-dimension--length::before {
  left: 0;
}

.suite-dimension--length::after {
  right: 0;
}

.suite-dimension--width::before,
.suite-dimension--width::after {
  content: "";
  position: absolute;
  right: -5px;
  width: 10px;
  border-top: 1px solid #c9a64d;
}

.suite-dimension--width::before {
  top: 0;
}

.suite-dimension--width::after {
  bottom: 0;
}
/* إخفاء المجسم الإضافي في المقاس المزدوج */
.suite-building--second {
  display: none !important;
}
/* ===== إصلاح صفحة المقاسات في الوضع الداكن ===== */

[data-theme="dark"] .product-sizes .size-card,
[data-theme="dark"] .product-sizes .size-tab {
  background: #1b1e22;
  color: #f5f1e8;
  border-color: rgba(214, 181, 103, 0.35);
}

[data-theme="dark"] .product-sizes .size-card *,
[data-theme="dark"] .product-sizes .size-tab * {
  color: inherit;
}

[data-theme="dark"] .product-sizes .size-card--active,
[data-theme="dark"] .product-sizes .size-tab--active {
  background: linear-gradient(
    135deg,
    rgba(214, 181, 103, 0.18),
    #1b1e22 65%
  );
  border-color: #d6b567;
}

[data-theme="dark"] .size-panel,
[data-theme="dark"] .suite-3d-view {
  background: #1b1e22;
  color: #f5f1e8;
}

[data-theme="dark"] .size-panel__desc,
[data-theme="dark"] .size-panel small {
  color: #b9b3a7;
}
/* ===== Dark mode: selected size card ===== */

[data-theme="dark"] .size-card,
[data-theme="dark"] .size-tab {
  background: #1b1e22 !important;
  color: #f5f1e8 !important;
}

[data-theme="dark"] .size-card--active,
[data-theme="dark"] .size-tab--active {
  background: linear-gradient(
    135deg,
    rgba(214, 181, 103, 0.22) 0%,
    #242321 45%,
    #1b1e22 100%
  ) !important;

  color: #f5f1e8 !important;
  border-color: #d6b567 !important;
}

[data-theme="dark"] .size-card--active *,
[data-theme="dark"] .size-tab--active * {
  color: #f5f1e8 !important;
}

[data-theme="dark"] .size-card--active .check,
[data-theme="dark"] .size-tab--active .check {
  background: #d6b567 !important;
  color: #111418 !important;
}
/* ===== 3D model proportional dimensions ===== */

.suite-building {
  scale: var(--model-length, 1) 1;
}

.suite-face--side,
.suite-face--roof {
  transform-origin: left center;
  scale: var(--model-depth, 1) 1;
}