/* IranSansX Web - نیازمند لایسنس از fontiran.com */
/* مسیرها را با محل قرارگیری فایل‌های خودت هماهنگ کن */
@font-face {
  font-family: 'IRANSansX';
  src: url('/fonts/iransansx/woff2/IRANSansX-Thin.woff2') format('woff2'),
       url('/fonts/iransansx/woff/IRANSansX-Thin.woff') format('woff');
  font-weight: 100; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: url('/fonts/iransansx/woff2/IRANSansX-UltraLight.woff2') format('woff2'),
       url('/fonts/iransansx/woff/IRANSansX-UltraLight.woff') format('woff');
  font-weight: 200; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: url('/fonts/iransansx/woff2/IRANSansX-Light.woff2') format('woff2'),
       url('/fonts/iransansx/woff/IRANSansX-Light.woff') format('woff');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: url('/fonts/iransansx/woff2/IRANSansX-Regular.woff2') format('woff2'),
       url('/fonts/iransansx/woff/IRANSansX-Regular.woff') format('woff');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: url('/fonts/iransansx/woff2/IRANSansX-Medium.woff2') format('woff2'),
       url('/fonts/iransansx/woff/IRANSansX-Medium.woff') format('woff');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: url('/fonts/iransansx/woff2/IRANSansX-DemiBold.woff2') format('woff2'),
       url('/fonts/iransansx/woff/IRANSansX-DemiBold.woff') format('woff');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: url('/fonts/iransansx/woff2/IRANSansX-Bold.woff2') format('woff2'),
       url('/fonts/iransansx/woff/IRANSansX-Bold.woff') format('woff');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: url('/fonts/iransansx/woff2/IRANSansX-ExtraBold.woff2') format('woff2'),
       url('/fonts/iransansx/woff/IRANSansX-ExtraBold.woff') format('woff');
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: url('/fonts/iransansx/woff2/IRANSansX-Black.woff2') format('woff2'),
       url('/fonts/iransansx/woff/IRANSansX-Black.woff') format('woff');
  font-weight: 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: url('/fonts/iransansx/woff2/IRANSansX-ExtraBlack.woff2') format('woff2'),
       url('/fonts/iransansx/woff/IRANSansX-ExtraBlack.woff') format('woff');
  font-weight: 950; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: url('/fonts/iransansx/woff2/IRANSansX-Heavy.woff2') format('woff2'),
       url('/fonts/iransansx/woff/IRANSansX-Heavy.woff') format('woff');
  font-weight: 1000; font-style: normal; font-display: swap;
}

/* ===== پایه: فونت و راست‌چین ===== */
html[lang|="fa"], body {
  direction: rtl;
}
body, button, input, select, textarea {
  font-family: 'IRANSansX', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== فارسی‌سازی اعدادِ لاتین (ss01) به صورت سراسری ===== */
body {
  -webkit-font-feature-settings: "ss01";
  -moz-font-feature-settings: "ss01";
  font-feature-settings: "ss01";
}

/* اگر جایی باید اعداد لاتین بماند، این کلاس را بده:
   <span class="en-num">Version 2.0</span> (بدون تغییر کد HTML هم می‌تونی با سلکتورهای زیر کنترل کنی) */
.en-num, .latin, .ltr, pre, code, kbd, samp {
  -webkit-font-feature-settings: normal !important;
  -moz-font-feature-settings: normal !important;
  font-feature-settings: normal !important;
  direction: ltr;
}

/* ===== کلاس‌های کمکی مطابق راهنمای فونتiran ===== */
/* اعداد فارسی */
.fa-num,
.ss01 { /* سازگاری با نمونهٔ مستندات */
  -webkit-font-feature-settings: "ss01";
  -moz-font-feature-settings: "ss01";
  font-feature-settings: "ss01";
}
/* اعداد فارسی هم‌عرض (مونواسپیس)؛ مناسب جدول/لیست قیمت */
.fa-num-mono,
.ss03 {
  -webkit-font-feature-settings: "ss01","ss03";
  -moz-font-feature-settings: "ss01","ss03";
  font-feature-settings: "ss01","ss03";
}
/* تغییر تراز عمودی اعداد برای وسط‌نشینی بهتر در باکس‌ها */
.fa-num-center,
.ss04 {
  -webkit-font-feature-settings: "ss01","ss04";
  -moz-font-feature-settings: "ss01","ss04";
  font-feature-settings: "ss01","ss04";
}

/* ===== اِعمال خودکار ویژگی‌های عددی روی بخش‌های کلیدی سایت (بدون تغییر مارکاپ) ===== */
/* قیمت‌ها و اعدادی که چشم می‌گیرند → فارسی + هم‌عرض + تراز عمودی */
.product__prices,
.product-card__prices,
.block-products__body .product-card__prices,
.block-product-columns__column .product-card__prices,
.reviews-list__pagination .page-link,
.input-number__input,
.spec__row .spec__value,
.spec__row .spec__name {
  -webkit-font-feature-settings: "ss01","ss03","ss04";
  -moz-font-feature-settings: "ss01","ss03","ss04";
  font-feature-settings: "ss01","ss03","ss04";
}

/* شمارنده‌ها/دیدگاه‌ها/برچسب‌ها → فارسی + هم‌عرض */
.product-card__rating-legend,
.product__rating-legend,
.tags__list a,
.breadcrumb .page-link,
.pagination .page-link {
  -webkit-font-feature-settings: "ss01","ss03";
  -moz-font-feature-settings: "ss01","ss03";
  font-feature-settings: "ss01","ss03";
}

/* هر چیزی که صراحتاً LTR شده است را از فارسی‌سازی عدد مستثنی کن (برای کد/لینک‌های انگلیسی) */
.ltr * {
  -webkit-font-feature-settings: normal;
  -moz-font-feature-settings: normal;
  font-feature-settings: normal;
}

/* ===== وزن‌های کاربردی که در استایل‌های فعلی استفاده شده‌اند ===== */
.text-thin        { font-weight: 100; }
.text-UltraLight  { font-weight: 200; }
.text-light       { font-weight: 300; }
.text-regular     { font-weight: 400; }
.text-medium      { font-weight: 500; }
.text-demibold    { font-weight: 600; }
.text-bold        { font-weight: 700; }
.text-extrabold   { font-weight: 800; }
.text-black       { font-weight: 900; }
.text-extrablack  { font-weight: 950; }
.text-heavy       { font-weight: 1000; }

/* اختیاری: اگر صفحه/بخشی انگلیسی است، این کلاس را بده تا هم LTR شود هم اعداد لاتین بماند */
.en {
  direction: ltr;
  -webkit-font-feature-settings: normal;
  -moz-font-feature-settings: normal;
  font-feature-settings: normal;
}
