@charset "UTF-8";
/* ==========================================================================
   Areej Perfumes — نظام التصميم الأساسي
   خطوط مستضافة محلياً، خصائص منطقية تدعم RTL و LTR من ملف واحد.
   ========================================================================== */

/* ── الخطوط ───────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/tajawal-400-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200E,
                 U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/tajawal-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+FFFD;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/tajawal-500-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200E,
                 U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/tajawal-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+FFFD;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/tajawal-700-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200E,
                 U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/tajawal-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+FFFD;
}
@font-face {
  font-family: 'Amiri';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/amiri-400-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200E,
                 U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: 'Amiri';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/amiri-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+FFFD;
}
/* خط الهوية الرسمي لأريج — Cinzel Decorative (حسب دليل العلامة) */
@font-face {
  font-family: 'Cinzel Decorative';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cinzel-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+FFFD;
}
@font-face {
  font-family: 'Cinzel Decorative';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/cinzel-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+FFFD;
}

/* ── الرموز التصميمية ─────────────────────────────────────────────────── */

:root {
  /* ══════════════════════════════════════════════════════════════════
     ألوان هوية أريج الرسمية (من دليل العلامة التجارية)
       #5D2D19  البني العميق — اللون الأساسي
       #EABC8A  الذهبي الدافئ — اللون الثانوي
       #E8C6A7  الرملي الفاتح
       #FFFFFF  الأبيض
       #0A0A0A  الأسود
     ما عداها درجات مشتقّة من الخمسة أعلاه لضبط التباين وسهولة القراءة.
     ══════════════════════════════════════════════════════════════════ */

  --brand:        #5D2D19;   /* البني الأساسي */
  --brand-deep:   #45200F;   /* أغمق — للتذييل والأقسام الداكنة */
  --brand-soft:   #7B4326;   /* أفتح — للتحويم */
  --gold:         #EABC8A;   /* الذهبي الرسمي (على الداكن) */
  --gold-ink:     #A2571F;   /* درجة ذهبية داكنة تصلح كنص على الفاتح */
  --sand-brand:   #E8C6A7;   /* الرملي الرسمي */

  /* أسطح مشتقّة */
  --ink:          #5D2D19;
  --ink-2:        #45200F;
  --ink-3:        #6B3820;
  --line-dark:    #7B4326;

  --parchment:    #FCF8F3;
  --paper:        #FFFFFF;
  --sand:         #F5E8D8;   /* تدرّج فاتح للأسطح والتحويم */
  --sand-2:       #EDDAC2;
  --sand-3:       #DCBE9C;

  --gold-2:       #E0A96B;
  --gold-bright:  #F2D3AC;
  --oud:          #5D2D19;
  --clay:         #9C3D2C;
  --sage:         #4C6B51;
  --ocean:        #2F5A6B;

  --text:         #0A0A0A;
  --text-2:       #5A4A3E;
  --text-3:       #8C7A6B;
  --text-invert:  #FDF6EE;
  --on-dark:      #FDF6EE;   /* نص فوق أسطح داكنة دائماً (تذييل، أقسام داكنة) */
  --line:         #E6D6C2;
  --line-2:       #F1E6D7;

  --bg:           #FFFFFF;      /* خلفية الموقع: أبيض نقي (النهار) */
  --surface:      var(--paper);
  --surface-2:    #FDF9F4;

  /* المسافات — مقياس متناسق */
  --sp-1: .25rem;  --sp-2: .5rem;   --sp-3: .75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;    --sp-7: 3rem;    --sp-8: 4rem;
  --sp-9: 6rem;    --sp-10: 8rem;

  /* الأنصاف الأقطار — زوايا هادئة لا دائرية مبالغة */
  --r-xs: 3px; --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 24px; --r-full: 999px;

  /* الظلال — خفيفة ودافئة، لا رمادية */
  --sh-1: 0 1px 2px rgba(93, 45, 25, .07);
  --sh-2: 0 4px 16px -6px rgba(93, 45, 25, .16);
  --sh-3: 0 18px 48px -18px rgba(93, 45, 25, .30);
  --sh-gold: 0 10px 40px -14px rgba(93, 45, 25, .42);

  /* الحركة */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur: .28s;

  /* التخطيط */
  --container: 1280px;
  --container-narrow: 820px;
  --header-h: 76px;

  /* الخطوط */
  --font-body: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Cinzel Decorative', 'Amiri', Georgia, serif;
  --tracking-display: 0;
}

/* ── الوضع الليلي ──────────────────────────────────────────────────────
   كل ألوان الموقع رموز (variables)؛ نعيد تعريفها هنا فقط فيتحوّل الموقع كله
   بتناسق — لا تغيير لون خلفية فقط. النهار هو الافتراضي. */
html[data-theme="dark"] {
  color-scheme: dark;
  --brand:        #EABC8A;
  --brand-soft:   #F2D3AC;
  --gold:         #EABC8A;
  --gold-ink:     #EABC8A;
  --gold-2:       #E0A96B;
  --gold-bright:  #F6DDBB;
  --sand-brand:   #3A2D24;
  --ink:          #EABC8A;
  --parchment:    #14100D;
  --paper:        #1D1713;
  --sand:         #2A211B;
  --sand-2:       #352A22;
  --sand-3:       #4A3A2E;
  --text:         #F4ECE3;
  --text-2:       #CDBBAA;
  --text-3:       #9C8B7B;
  --text-invert:  #1A110C;
  --line:         #3B2E25;
  --line-2:       #2D231C;
  --bg:           #14100D;
  --surface:      #1D1713;
  --surface-2:    #231B16;
  --brand-deep:   #0E0B09;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .5);
  --sh-2: 0 4px 16px -6px rgba(0, 0, 0, .6);
  --sh-3: 0 18px 48px -18px rgba(0, 0, 0, .75);
  --sh-gold: 0 10px 40px -14px rgba(0, 0, 0, .8);
}
html[data-theme="dark"] img:not([src$=".svg"]):not(.brand__logo) { filter: brightness(.94); }
html[data-theme="dark"] .payment-chip img { filter: none; }
html, body { transition: background-color .25s var(--ease), color .25s var(--ease); }

html[lang="ar"] {
  --font-display: 'Amiri', 'Cinzel Decorative', Georgia, serif;
  --tracking-display: 0;
}
html[lang="en"] {
  --tracking-display: .01em;
}

/* ── إعادة الضبط ──────────────────────────────────────────────────────── */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* نسيج ورقي خفيف جداً — يكسر ملمس الشاشة المسطّح */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
svg { fill: none; }

input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; padding: 0; }

table { border-collapse: collapse; width: 100%; }

hr { border: 0; border-top: 1px solid var(--line); }

:focus-visible {
  outline: 2px solid var(--gold-ink);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

::selection { background: var(--sand-brand); color: var(--brand); }

/* شريط تمرير هادئ */
* { scrollbar-width: thin; scrollbar-color: var(--sand-3) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--sand-2); border-radius: 99px; border: 3px solid var(--bg); }
*::-webkit-scrollbar-thumb:hover { background: var(--sand-3); }

/* ── الطباعة ──────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: var(--tracking-display);
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.9rem); }
h2 { font-size: clamp(1.65rem, 1.1rem + 2.1vw, 2.7rem); }
h3 { font-size: clamp(1.3rem, 1rem + 1.1vw, 1.75rem); }
h4 { font-size: 1.15rem; }

p { text-wrap: pretty; }

strong, b { font-weight: 700; }

small { font-size: .8125rem; }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
}

.eyebrow {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-ink);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.eyebrow::after {
  content: '';
  flex: 1;
  max-width: 64px;
  height: 1px;
  background: linear-gradient(to inline-end, var(--gold-2), transparent);
}
.eyebrow--center { justify-content: center; }
.eyebrow--center::before {
  content: '';
  flex: 1;
  max-width: 64px;
  height: 1px;
  background: linear-gradient(to inline-start, var(--gold-2), transparent);
}

.lead { font-size: 1.0625rem; color: var(--text-2); line-height: 1.85; }

.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }

.text-gold   { color: var(--gold-ink); }
.text-muted  { color: var(--text-3); }
.text-soft   { color: var(--text-2); }
.text-center { text-align: center; }
.text-start  { text-align: start; }
.text-end    { text-align: end; }

/* ── التخطيط ──────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, .4rem + 2.4vw, 2.5rem);
  position: relative;
  z-index: 1;
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.section--sm { padding-block: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.section--tint { background: var(--sand); }
.section--dark { background: var(--brand-deep); color: var(--on-dark); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--on-dark); }
.section--dark .text-muted { color: rgba(247, 242, 233, .55); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
}
.section-head__text { max-width: 46ch; }
.section-head h2 { margin-block: var(--sp-2) var(--sp-1); }
.section-head p { color: var(--text-2); font-size: .95rem; }

.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.grid--products { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: clamp(1rem, .6rem + 1.2vw, 1.75rem); }

.stack { display: flex; flex-direction: column; }
.stack > * + * { margin-block-start: var(--gap, var(--sp-4)); }

.row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.row--center { justify-content: center; }
.row--tight { gap: var(--sp-2); }

.hide { display: none !important; }
@media (max-width: 900px) { .hide-md { display: none !important; } }
@media (max-width: 640px) { .hide-sm { display: none !important; } }
@media (min-width: 901px) { .show-md { display: none !important; } }

.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-block-start: -100%;
  inset-inline-start: var(--sp-4);
  z-index: 200;
  background: var(--ink);
  color: var(--text-invert);
  padding: var(--sp-3) var(--sp-5);
  border-radius: 0 0 var(--r-md) var(--r-md);
}
.skip-link:focus { inset-block-start: 0; }

/* ── الزخرفة ──────────────────────────────────────────────────────────── */

.rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  border: 0;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  color: var(--sand-3);
}
.ornament::before, .ornament::after {
  content: '';
  height: 1px;
  width: clamp(40px, 12vw, 120px);
  background: linear-gradient(90deg, transparent, currentColor);
}
.ornament::after { background: linear-gradient(270deg, transparent, currentColor); }
.ornament svg { width: 18px; height: 18px; }

/* ── الأزرار ──────────────────────────────────────────────────────────── */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--text-invert);
  --btn-bd: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: .8rem 1.6rem;
  min-height: 46px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-full);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background-color var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
  white-space: nowrap;
  user-select: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn--gold  { --btn-bg: var(--gold); --btn-bd: var(--gold); --btn-fg: var(--brand); }
.btn--gold:hover { box-shadow: var(--sh-gold); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: var(--line); }
.btn--ghost:hover { --btn-bd: var(--brand); --btn-fg: var(--brand); }
.btn--outline-gold { --btn-bg: transparent; --btn-fg: var(--gold-ink); --btn-bd: var(--sand-3); }
.btn--outline-gold:hover { --btn-bg: var(--gold); --btn-fg: var(--brand); --btn-bd: var(--gold); }
.btn--light { --btn-bg: var(--paper); --btn-fg: var(--text); --btn-bd: var(--line); }
.btn--on-dark { --btn-bg: transparent; --btn-fg: var(--on-dark); --btn-bd: rgba(247,242,233,.32); }
.btn--on-dark:hover { --btn-bd: var(--gold-bright); --btn-fg: var(--gold-bright); }
.btn--danger { --btn-bg: var(--clay); --btn-bd: var(--clay); --btn-fg: #fff; }
.btn--sm { padding: .5rem 1rem; min-height: 36px; font-size: .8125rem; }
.btn--lg { padding: 1rem 2.2rem; min-height: 54px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--icon { padding: 0; width: 44px; min-height: 44px; border-radius: 50%; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--loading { color: transparent !important; pointer-events: none; }
.btn--loading::after {
  content: '';
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--btn-fg);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--gold-ink);
  font-size: .9rem;
  font-weight: 500;
  padding-block-end: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), gap var(--dur) var(--ease);
}
.link-more:hover { border-color: currentColor; gap: var(--sp-3); }
.link-more svg { width: 16px; height: 16px; }
html[dir="rtl"] .link-more svg { transform: scaleX(-1); }

/* ── الشارات ──────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: .3rem .7rem;
  border-radius: var(--r-full);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.4;
  background: var(--sand);
  color: var(--text-2);
  white-space: nowrap;
}
.badge svg { width: 12px; height: 12px; }
.badge--gold    { background: var(--gold); color: var(--brand); }
.badge--dark    { background: var(--ink); color: var(--text-invert); }
.badge--sale    { background: var(--clay); color: #fff; }
.badge--new     { background: var(--sage); color: #fff; }
.badge--out     { background: var(--text-3); color: #fff; }
.badge--verify  { background: rgba(76, 107, 81, .12); color: var(--sage); }
.badge--soft    { background: var(--sand-brand); color: var(--brand); }
.badge--outline { background: transparent; border: 1px solid var(--line); color: var(--text-2); }

.badge-status { padding: .35rem .8rem; font-size: .75rem; font-weight: 500; border-radius: var(--r-full); }
.badge-status--amber  { background: #FBF0D9; color: #8A6516; }
.badge-status--blue   { background: #DFEAF2; color: #2F5A6B; }
.badge-status--violet { background: #E8E2F2; color: #5B4A82; }
.badge-status--green  { background: #DFEBE1; color: #3C5A41; }
.badge-status--red    { background: #F6E1DE; color: #8C4034; }
.badge-status--gray   { background: var(--sand); color: var(--text-2); }

/* ── أزرار الأيقونة والقوائم المنسدلة ─────────────────────────────────── */
/* مشتركة بين ترويسة الموقع ولوحة التحكم — لهذا مكانها هنا لا layout.css */

.icon-btn {
  position: relative;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--text-2);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--sand); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn__count {
  position: absolute;
  inset-block-start: 4px;
  inset-inline-end: 2px;
  min-width: 18px; height: 18px;
  padding-inline: 4px;
  display: grid; place-items: center;
  background: var(--brand);
  color: var(--text-invert);
  border-radius: var(--r-full);
  font-size: .65rem;
  font-weight: 700;
  border: 2px solid var(--bg);
}
.icon-btn__count:empty, .icon-btn__count[data-count="0"] { display: none; }

.dropdown { position: relative; }
.dropdown__menu {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 230px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  box-shadow: var(--sh-3);
  padding: var(--sp-2);
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: all .2s var(--ease);
  z-index: 95;
}
.dropdown.is-open .dropdown__menu { opacity: 1; visibility: visible; transform: none; }
.dropdown__menu a, .dropdown__menu button {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: .6rem .75rem;
  border-radius: var(--r-sm);
  font-size: .9rem;
  color: var(--text-2);
  text-align: start;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.dropdown__menu a:hover, .dropdown__menu button:hover { background: var(--sand); color: var(--text); }
.dropdown__menu a.is-active { background: var(--sand); font-weight: 600; }
.dropdown__menu a.is-active small { color: var(--text-3); font-weight: 400; }
.dropdown__menu svg { width: 17px; height: 17px; color: var(--text-3); }
.dropdown__head { padding: .6rem .75rem; border-bottom: 1px solid var(--line-2); margin-block-end: var(--sp-2); }
.dropdown__head strong { display: block; font-size: .9rem; }
.dropdown__head span { font-size: .75rem; color: var(--text-3); }
.dropdown__sep { height: 1px; background: var(--line-2); margin: var(--sp-2) 0; }

/* ── البطاقات ─────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.card--pad { padding: var(--sp-5); }
.card--hover:hover { border-color: var(--sand-3); box-shadow: var(--sh-2); transform: translateY(-3px); }

.panel {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
}

/* ── النماذج ──────────────────────────────────────────────────────────── */

.field { display: block; margin-block-end: var(--sp-4); }
.field__label {
  display: block;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-2);
  margin-block-end: .4rem;
  letter-spacing: .01em;
}
.field__label .req { color: var(--clay); }
.field__hint { font-size: .75rem; color: var(--text-3); margin-block-start: .35rem; }
.field__error { font-size: .78rem; color: var(--clay); margin-block-start: .35rem; display: flex; gap: 4px; align-items: center; }

.input, .select, .textarea {
  width: 100%;
  padding: .78rem 1rem;
  min-height: 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: .95rem;
  color: var(--text);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-soft);
  box-shadow: 0 0 0 3px rgba(93, 45, 25, .12);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--clay); }
.textarea { min-height: 130px; resize: vertical; line-height: 1.7; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23857A6B' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 18px;
  background-position: left 1rem center;
  padding-inline-end: 2.6rem;
}
html[dir="ltr"] .select { background-position: right 1rem center; padding-inline-end: 2.6rem; }

.check {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  cursor: pointer;
  font-size: .9rem;
  color: var(--text-2);
  line-height: 1.6;
}
.check input[type="checkbox"], .check input[type="radio"] {
  appearance: none;
  width: 20px; height: 20px;
  flex: none;
  margin-block-start: 2px;
  border: 1.5px solid var(--sand-3);
  border-radius: var(--r-xs);
  background: var(--surface);
  cursor: pointer;
  transition: all .18s var(--ease);
  position: relative;
}
.check input[type="radio"] { border-radius: 50%; }
.check input:checked {
  background: var(--brand);
  border-color: var(--brand);
}
.check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 6px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: #fff;
  border-radius: 50%;
}
.check input:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 2px; }

.input-group { display: flex; gap: var(--sp-2); }
.input-group .input { flex: 1; }

/* ── النجوم ───────────────────────────────────────────────────────────── */

.stars { display: inline-flex; align-items: center; gap: 2px; }
.stars svg { width: 15px; height: 15px; }
.stars .star-full   { fill: #D9922F; stroke: none; }
.stars .star-half   { fill: url(#half-gold); stroke: none; }
.stars .star-empty  { fill: var(--sand-2); stroke: none; }
.stars--lg svg { width: 22px; height: 22px; }

.rating-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rating-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.rating-input label { cursor: pointer; line-height: 0; }
.rating-input label svg { width: 30px; height: 30px; fill: var(--sand-2); transition: fill .15s var(--ease), transform .15s var(--ease); }
.rating-input label:hover svg,
.rating-input label:hover ~ label svg,
.rating-input input:checked ~ label svg { fill: #D9922F; }
.rating-input label:hover svg { transform: scale(1.14); }
.rating-input input:focus-visible + label svg { outline: 2px solid var(--gold-ink); outline-offset: 2px; }

/* ── التنبيهات والفلاش ────────────────────────────────────────────────── */

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  font-size: .9rem;
  border: 1px solid;
  line-height: 1.65;
}
.alert svg { width: 20px; height: 20px; flex: none; margin-block-start: 1px; }
.alert--success { background: #E8F1E9; border-color: #C3DBC7; color: #35543A; }
.alert--error   { background: #F9E6E3; border-color: #E8C4BD; color: #8C4034; }
.alert--info    { background: #E4EDF2; border-color: #C4D9E3; color: #2F5A6B; }
.alert--warning { background: #FBF2DC; border-color: #ECDBB0; color: #7A5A15; }

#toast-stack {
  position: fixed;
  inset-block-end: var(--sp-5);
  inset-inline-start: var(--sp-5);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  pointer-events: none;
  max-width: min(380px, calc(100vw - 2rem));
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: .9rem 1.15rem;
  background: var(--ink);
  color: var(--text-invert);
  border-radius: var(--r-md);
  box-shadow: var(--sh-3);
  font-size: .9rem;
  pointer-events: auto;
  animation: toastIn .32s var(--ease-out);
  border-inline-start: 3px solid var(--gold);
}
.toast--error   { border-inline-start-color: #E08072; }
.toast--success { border-inline-start-color: #7FB98A; }
.toast--warning { border-inline-start-color: #E8C46C; }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.is-out { animation: toastOut .28s var(--ease) forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ── النوافذ المنبثقة ─────────────────────────────────────────────────── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: var(--sp-4);
  background: rgba(69, 32, 15, .55);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__box {
  background: var(--surface);
  border-radius: var(--r-lg);
  width: min(560px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--sh-3);
  transform: translateY(16px) scale(.98);
  transition: transform var(--dur) var(--ease-out);
}
.modal.is-open .modal__box { transform: none; }
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border-bottom: 1px solid var(--line-2);
}
.modal__body { padding: var(--sp-5); }
.modal__foot { padding: var(--sp-5); border-top: 1px solid var(--line-2); display: flex; gap: var(--sp-3); justify-content: flex-end; }
.modal__close { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--text-3); }
.modal__close:hover { background: var(--sand); color: var(--text); }
.modal__close svg { width: 18px; height: 18px; }

/* ── التنقل بين الصفحات ───────────────────────────────────────────────── */

.pagination { display: flex; justify-content: center; align-items: center; gap: var(--sp-2); margin-block-start: var(--sp-7); flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 42px; height: 42px;
  display: grid; place-items: center;
  padding-inline: .7rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: .9rem;
  color: var(--text-2);
  background: var(--surface);
  transition: all var(--dur) var(--ease);
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .is-active { background: var(--ink); border-color: var(--ink); color: var(--text-invert); font-weight: 500; }
.pagination .is-gap { border: 0; background: none; }
.pagination svg { width: 16px; height: 16px; }
html[dir="rtl"] .pagination svg { transform: scaleX(-1); }

/* ── فتات الخبز ───────────────────────────────────────────────────────── */

.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: .45rem;
  font-size: .8125rem; color: var(--text-3);
  padding-block: var(--sp-4);
}
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--gold-ink); }
.breadcrumb li { display: flex; align-items: center; gap: .45rem; }
.breadcrumb li + li::before { content: '/'; color: var(--sand-3); }

/* ── الحالات الفارغة ──────────────────────────────────────────────────── */

.empty {
  text-align: center;
  padding: clamp(2.5rem, 2rem + 3vw, 5rem) var(--sp-4);
  max-width: 460px;
  margin-inline: auto;
}
.empty__icon {
  width: 72px; height: 72px;
  margin: 0 auto var(--sp-5);
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--sand);
  color: var(--brand-soft);
}
.empty__icon svg { width: 32px; height: 32px; }
.empty h3 { margin-block-end: var(--sp-2); }
.empty p { color: var(--text-2); margin-block-end: var(--sp-5); }

/* ── الهيكل العظمي أثناء التحميل ──────────────────────────────────────── */

.skeleton {
  background: linear-gradient(90deg, var(--sand) 25%, var(--sand-2) 37%, var(--sand) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ── ظهور تدريجي عند التمرير ──────────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .65s var(--ease-out), transform .65s var(--ease-out);
}
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ── التبويبات ────────────────────────────────────────────────────────── */

.tabs {
  display: flex;
  gap: var(--sp-5);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: var(--sp-3) 0;
  font-size: .95rem;
  font-weight: 500;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  margin-block-end: -1px;
  white-space: nowrap;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--brand); border-color: var(--brand); }
.tab__count { font-size: .75rem; color: var(--text-3); }

/* ── الشرائح الأفقية ──────────────────────────────────────────────────── */

.scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: var(--sp-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-block-end: var(--sp-3);
  margin-inline: calc(-1 * clamp(1rem, .4rem + 2.4vw, 2.5rem));
  padding-inline: clamp(1rem, .4rem + 2.4vw, 2.5rem);
  scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; }
@media (min-width: 900px) {
  .scroller { grid-auto-columns: minmax(255px, 1fr); }
}

/* ── الطباعة الورقية ──────────────────────────────────────────────────── */

@media print {
  body::before, .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .container { max-width: 100%; }
}
