/* ============================================================
   Zima Rug — Persian / Farsi fonts (فونت‌های فارسی)
   For Farsi (RTL) pages. The brand's preferred stack:
     • Titles / prices / rug info  → IRANYekan  (luxury display)
     • Body / product descriptions → IRANSans / Vazir (readable)

   IRANYekan and IRANSans are LICENSED fonts with no free CDN, so
   they are listed FIRST in each stack (used automatically if you
   self-host the licensed .woff2 files in assets/fonts/ and add
   @font-face rules) and fall back to Vazirmatn — the open-source,
   actively-maintained Persian font (the successor to Vazir),
   loaded here from Google Fonts so a real Persian webface is
   always present.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700&display=swap');

/* ------------------------------------------------------------
   Licensed Persian faces — declared so the family names resolve.
   The .woff2 files are NOT shipped (IRANYekan / IRANSans are
   commercial). Upload the licensed files to assets/fonts/ and
   these rules pick them up automatically; until then `local()`
   finds a system install if present and otherwise the browser
   falls through to Vazirmatn (next in each stack). Do not
   substitute a different family.
   ------------------------------------------------------------ */
@font-face {
  font-family: 'IRANYekanX';
  src: local('IRANYekanX'), local('IRAN Yekan X'),
       url('../assets/fonts/IRANYekanX-Medium.woff2') format('woff2');
  font-weight: 500 600;
  font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: local('IRANSansX'), local('IRAN Sans X'),
       url('../assets/fonts/IRANSansX-Regular.woff2') format('woff2');
  font-weight: 400 500;
  font-display: swap;
}

:root {
  /* Persian display — headings, prices, carpet titles. */
  --font-fa-display: 'IRANYekanX', 'IRANYekan', 'Vazirmatn', Tahoma, sans-serif; /* @kind font */
  /* Persian body — paragraphs, product descriptions, UI. */
  --font-fa-body:    'IRANSansX', 'IRANSans', 'Vazirmatn', 'Vazir', Tahoma, sans-serif; /* @kind font */
  /* Always-available open Persian face (the guaranteed fallback). */
  --font-fa-base:    'Vazirmatn', Tahoma, sans-serif; /* @kind font */
}

/* ------------------------------------------------------------
   RTL + Persian type helpers.
   Wrap any Farsi region in <div dir="rtl" class="zr-fa"> … </div>.
   Persian script needs a touch more line-height and sits better
   slightly heavier than Latin — these helpers handle that.
   ------------------------------------------------------------ */
[dir="rtl"], .zr-fa {
  direction: rtl;
  text-align: right;
}

.zr-fa {
  font-family: var(--font-fa-body);
}

/* Persian display heading — IRANYekan look. Persian reads better
   without the Latin -0.015em tightening, so tracking resets to 0. */
.zr-fa-display {
  font-family: var(--font-fa-display);
  font-weight: 500;           /* Persian display sits heavier than the 300 Latin serif */
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--text-heading);
}

.zr-fa-body {
  font-family: var(--font-fa-body);
  font-weight: 400;
  line-height: 2;             /* Farsi body runs taller than Latin */
  letter-spacing: 0;
  color: var(--text-body);
}

/* Persian eyebrow — Farsi has no uppercase, so DON'T transform.
   Keep it small, gold, with gentle tracking only. */
.zr-fa-eyebrow {
  font-family: var(--font-fa-body);
  font-weight: 500;
  font-size: var(--t-body-sm);
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--accent-text);
}

/* Persian numerals render with tabular figures for prices. */
.zr-fa-price {
  font-family: var(--font-fa-display);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-heading);
}
