/* =====================================================================
 *  style.css — استایل واحد سایت شفا شهد
 *  تم: روشن کرم + قهوه‌ای-عسلی ( Organic Nectar ) | طبیعی، ارگانیک، موبایل‌فرست، RTL
 *  مفهوم محوری: «آفتاب روی شانهٔ زنبور» — لوکس مینیمال نیست، صمیمی و طبیعی است.
 *  بخش‌بندی:
 *    ۱) Reset  ۲) فونت‌ها  ۳) متغیرها  ۴) تایپوگرافی  ۵) layout
 *    ۶) دکمه‌ها  ۷) میکرواینتراکشن‌ها  ۸) navbar  ۹) hero
 *    ۱۰) کارت محصول  ۱۱) فرم‌ها  ۱۲) فوتر  ۱۳) flash
 *    ۱۴) گالری پوشه‌ای  ۱۵) ادمین  ۱۶) responsive  ۱۷) reduced-motion
 * ===================================================================== */

/* توکن‌ها و کامپوننت‌ها دیگر با @import وارد نمی‌شوند.
   دلیل: هر کامپوننت هم با @import اینجا و هم با <link> در قالب‌ها بارگذاری
   می‌شد، پس selectorهای یکسان دو بار با مقادیر متعارض اعلام می‌شدند و نتیجهٔ
   نهایی به ترتیب بارگذاری وابسته می‌شد. ترتیب فعلی که در همهٔ قالب‌ها یکسان
   است و باید حفظ شود:
     tokens.css → style.css → nav → buttons → cards → footer → theme-toggle → utilities
   برای ساخت bundle از assets/css/bundle.css استفاده می‌شود (npm run build:css). */

/* ----------------------------- ۱) Reset ----------------------------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* scroll-behavior removed: GSAP handles smooth scroll */
  scroll-padding-top: calc(var(--nav-height, 72px) + var(--s-2));
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Vazirmatn', 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  direction: rtl;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* حلقهٔ فوکوس استاندارد — فقط با کیبورد/��اب‌نگاری ظاهر می‌شود (نه با کلیک موس).
 * تعریف گلوبال for A11y: در صورت حذف accidentally، این layer پاس‌ال‌حفاظ است.
 *
 * رنگ از --shafa-gold-text استفاده می‌کند نه --shafa-gold-satin:
 * WCAG 2.2 SC 1.4.11 حداقل ۳:۱ برای نشانگر فوکوس می‌خواهد.
 * طلای ساتن (#C5A059) فقط ۲٫۳۲:۱ روی بوم دارد — کاربر کیبوردی
 * عملاً نمی‌تواند ببیند کجاست. #8A641A معادل ۵٫۰۶:۱ است. */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--shafa-gold-text);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* لینک داخل متن — بدون underline پیش‌فرض، با رنگ brand و underline در hover */
.text-link-strong {
  color: var(--shafa-gold-text);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
  transition: color var(--t-base) var(--ease);
}
.text-link-strong:hover { color: var(--secondary); }

/* CTA strip برای مهمانان — متن کوتاه دعوت به ثبت‌نام */
.guest-cta-strip { padding: var(--s-3) 0; background: var(--accent-soft); border-radius: var(--radius); }

/* فرم خروج ایمن (POST + CSRF) — ظاهر دکمه با لینک‌های هم‌خانواده هماهنگ است */
.logout-form { display: inline; margin: 0; }
/* در بافت‌های بلوکی (footer, drawer) فرم به‌صورت block و تمام‌عرض می‌چیند */
.footer__col .logout-form { display: block; }
.footer__logout { display: block; width: 100%; text-align: inherit;
  color: var(--muted); padding: 4px 0; transition: color var(--t-base) var(--ease); }
.footer__logout:hover { color: var(--accent-strong); }
/* دکمه‌ی خروج در drawer موبایل: هم‌اندازه‌ی سایر آیتم‌های drawer (با آیکون) */
.drawer .logout-form { display: flex; }
.drawer .logout-form > button { width: 100%; text-align: inherit; }

/* اسکرول‌بار ظریف تم روشن */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* پرش به محتوا */
.skip-link {
  position: absolute; top: -100px; inset-inline-start: 1rem; z-index: 9999;
  background: var(--accent); color: var(--on-accent); padding: .75rem 1.25rem;
  border-radius: 999px; font-weight: 500;
}

/* =====================================================================
 *  Phase 17 — Personalization Components CSS
 * ===================================================================== */

/* --- Nav greeting (compact, only name shown) --- */
.nav__user-name {
  font-weight: 500;
  color: var(--accent-strong);
  font-size: var(--fs-sm, 0.9rem);
}

/* --- Section wrappers for personalized content --- */
.section-personalized {
  background: var(--bg);
}

.section-personalized .products-grid {
  gap: var(--s-3);
}

/* --- Repurchase prompt panel --- */
.section-repurchase .panel {
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(177, 95, 0, 0.06);
}

/* --- Eyebrow + section-head refinements for personalized sections --- */
.section-personalized .section-head .eyebrow {
  font-size: var(--fs-caption);
  letter-spacing: var(--shafa-tracking-normal);
}

/* --- Cross-sell / Related on product page --- */
.section-cross-sell,
.section-related {
  background: linear-gradient(180deg, var(--surface-alt) 0%, var(--surface) 100%);
  border-radius: var(--radius);
  padding: var(--s-6) 0;
}

/* --- Desktop: hide greeting on very small screens if needed --- */
@media (max-width: 480px) {
  .nav__user-name {
    font-size: 0.85rem;
  }
}

/* ----------------------------- ۲) فونت‌ها ----------------------------- */
/* Vazirmatn و Inter خود-میزبانی می‌شوند؛ فونت‌های نمایشی از توکن‌های CSS خوانده می‌شوند. */
/* Metric overrides below are Vazirmatn's REAL metrics, read from the shipped
   font binaries (unitsPerEm 2048; sTypoAscender 2100; sTypoDescender -1100;
   sTypoLineGap 0; fsSelection bit7 USE_TYPO_METRICS = 1).
   Inter is normalised to the same values so both families share one baseline
   grid in mixed Persian/Latin lines. Safe here because every line-height in
   this project is explicit (there is no `line-height: normal` anywhere), so
   overrides move the baseline inside the line box without changing box height. */
/* فونت‌ها subset شده‌اند (scripts/perf/subset_fonts.py): 482KB → 94KB.
   Vazirmatn: فارسی+عربی+لاتین+ارقام | Inter: فقط لاتین (فقط برای `.latin`
   و label‌های utility استفاده می‌شود). هر دو با ascent/descent override
   یکسان تا در خط‌های ترکیبی فارسی/لاتین baseline مشترک داشته باشند.
    font-display: swap روی همهٔ وزن‌ها؛ بدون preload — اندازه‌گیری
    (scripts/perf/preload_ab.cjs) نشان داد preload فونت FCP را ~۷۰٪
    بدتر می‌کند بی‌آنکه LCP را بهبود دهد. */
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  ascent-override: 102.54%;
  descent-override: 53.71%;
  line-gap-override: 0%;
  src: url('../fonts/subset/Vazirmatn-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  ascent-override: 102.54%;
  descent-override: 53.71%;
  line-gap-override: 0%;
  src: url('../fonts/subset/Vazirmatn-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  ascent-override: 102.54%;
  descent-override: 53.71%;
  line-gap-override: 0%;
  src: url('../fonts/subset/Vazirmatn-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  ascent-override: 102.54%;
  descent-override: 53.71%;
  line-gap-override: 0%;
  src: url('../fonts/subset/Inter-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  ascent-override: 102.54%;
  descent-override: 53.71%;
  line-gap-override: 0%;
  src: url('../fonts/subset/Inter-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  ascent-override: 102.54%;
  descent-override: 53.71%;
  line-gap-override: 0%;
  src: url('../fonts/subset/Inter-Bold.woff2') format('woff2');
}
.latin, .latin * { font-family: 'Inter', sans-serif; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
/* live viewer counter rewritten by activity-widget.js — digits change in place,
   so they must not reflow. Font family stays Vazirmatn (content is Persian). */
[data-activity-badge] { font-variant-numeric: tabular-nums; }


/* Material Symbols → SVG sprite (جایگزین Font-based — B7 optimization) */
/* فونت 320KB حذف شد؛ فقط sprite.svg 63KB بارگذاری می‌شود */
 /* کلاس آیکون — معادل قواعد CSS در CDN گوگل */
 .material-symbols-outlined {
   display: inline-block;
   vertical-align: middle;
   width: 1em;
   height: 1em;
   font-size: 24px;
   line-height: 1;
   color: currentColor;
   overflow: visible;
 }
 .material-symbols-outlined.icon-16 { font-size: 16px; }
 .material-symbols-outlined.icon-ml-4 { margin-left: 4px; }
 .material-symbols-outlined.svg-sprite {
   fill: currentColor;
 }


/* ----------------------------- ۳) متغیرها ----------------------------- */
/* Design tokens: imported from assets/css/base/tokens.css via @import above
 * (inlined into dist at build time via postcss-import) plus loaded via <link>
 * in dev. Legacy token overrides removed in Phase 2A. */

/* ----------------------------- ۴) تایپوگرافی -----------------------------
 * اسکیل ماژولار (۱.۲۵۰) + اندازهٔ نمایش/کپشن اضافه‌شده. همهٔ حدول و متن‌ها
 * از توکن می‌خوانند تا یک منبع واحد برای سلسله‌مراتب بصری باشد.
 * سلسله‌مراتب: display > hero > h1 > h2 > h3 > body > small > caption
 */
h1, h2, h3, h4 { line-height: var(--shafa-lh-heading); font-weight: 700; letter-spacing: var(--shafa-tracking-tight); font-family: 'Vazirmatn', 'Inter', system-ui, sans-serif; text-wrap: balance; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-body); }
p  { line-height: var(--lh-base); text-wrap: pretty; }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent-strong); }
.text-caption { font-size: var(--fs-caption); line-height: var(--lh-caption); color: var(--muted); }
.text-display { font-family: var(--font-display); font-size: var(--fs-display); font-weight: 700; line-height: var(--lh-tight); }
.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; }
.brand-display, .hero__title, .section-head h2, .manifesto { font-family: 'Vazirmatn', 'Inter', system-ui, sans-serif; }
.eyebrow {
  font-size: var(--fs-small); font-weight: 500;
  color: var(--shafa-gold-text); letter-spacing: var(--shafa-tracking-normal); text-transform: none;
  display: inline-flex; align-items: center; gap: .4rem;
}
.eyebrow::before {
  content: ''; width: 18px; height: 2px; border-radius: 999px; background: var(--shafa-gold-satin); display: inline-block;
}
.num-tabular { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ----------------------------- ۵) layout ----------------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--s-4); }
.container--narrow { max-width: var(--shafa-container-narrow); }
.section { padding-block: var(--space-section); }
.section--surface { background: var(--surface); }
.grid { display: grid; gap: var(--s-4); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* واکنش‌گرایی .grid-* — بدون این بلوک، این کلاس‌ها در موبایل ۳۶۰px
   چهار/سه/دو ستون ~۷۸/۱۱۰/۱۶۵px می‌ساختند و محتوا سرریز می‌کرد.
   توجه: این media query باید بعد از هر تعریف پایهٔ دیگری برای همین
   کلاس‌ها بیاید؛ به همین دلیل نسخهٔ تکراری در utilities.css حذف شد. */
@media (max-width: 768px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.section-head { margin-bottom: var(--s-6); }
.section-head h2 { margin-bottom: var(--s-3); }
.section-head p { color: var(--text-soft); max-width: 64ch; }
.section-head--centered,
.section-head.text-center,
.section-head.text-center-mb-7,
.section-head.text-center-mb-5 {
  text-align: center;
}
.section-head--centered h2,
.section-head--centered p,
.section-head.text-center h2,
.section-head.text-center p,
.section-head.text-center-mb-7 h2,
.section-head.text-center-mb-7 p,
.section-head.text-center-mb-5 h2,
.section-head.text-center-mb-5 p {
  margin-inline: auto !important;
  text-align: center !important;
}
.section-head__lead { max-width: 40rem; margin: var(--s-3) auto 0; text-align: center; margin-inline: auto; }

/* Scroll performance: contain layout/style for major sections (paint removed from products-grid to avoid lazy-load interference) */
.section,
.hero-premium,
.features-section,
.process-grid,
.stats-section,
.best-seller,
.products-grid {
  contain: layout style;
}
.testimonials-grid {
  contain: layout style;
}

/* ----------------------------- ۶) دکمه‌ها -----------------------------
 * سیستم دکمهٔ استاندارد برند شفا شهد. همهٔ دکمه‌ها وARIANTها از min-height
 * مشترک (۴۸px / sm:۴۰px) و توکن‌ها می‌خوانند تا قرارداد touch-target حفظ شود.
 * وARIANTها:  --primary (سبز کوهستانی) | --gold (طلایی) | --ghost (خطی) | --block
 *             | --sm | [disabled] | .is-loading (با spinner)
 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: var(--touch-lg); padding: 10px 22px;
  border-radius: var(--radius-pill); font-weight: 500; font-size: var(--fs-body);
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform 350ms cubic-bezier(0.34, 1.56, 0.64, 1),
              background var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
  touch-action: manipulation;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn:active { transform: scale(.97); }
.btn--primary {
  background: var(--shafa-green-alpine);
  color: var(--on-accent);
  font-weight: 500;
  border-color: transparent;
  box-shadow: var(--shafa-shadow-sm);
}
.btn--primary:hover {
  background: var(--shafa-green-hover);
  transform: translateY(-1px);
  box-shadow: var(--shafa-shadow-md);
}
.btn--ghost {
  background: transparent; color: var(--accent-strong);
  border-color: var(--border-strong);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--surface-2); transform: translateY(-2px); }
.btn--block { width: 100%; }
.btn--sm { min-height: var(--touch-sm); padding: 6px 16px; font-size: var(--fs-small); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn--lg { min-height: var(--touch-lg); padding: 12px 28px; font-size: var(--fs-body); font-weight: 500; }

/* Ripple effect for buttons */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(255,255,255,0.25) 0%, transparent 60%);
  opacity: 0;
  transform: scale(0);
  transition: transform 500ms ease, opacity 300ms ease;
  pointer-events: none;
  z-index: -1;
}
.btn:active::after {
  opacity: 1;
  transform: scale(2);
  transition: transform 0ms, opacity 0ms;
}

/* Promote animated hero elements to compositor layers */
.hero-premium__content,
.hero-premium__art,
.hero-premium__social,
.hero-premium__trust,
.hero-premium__scroll,
#pdp-main-img-tag {
  transform: translateZ(0);
}

/* Remove will-change after animation completes to free GPU memory */
.scroll-reveal.is-visible {
  will-change: auto;
}

/* ----------------------------- ۷) میکرواینتراکشن‌ها ----------------------------- */
/* آندرلاین طلایی RTL روی لینک منو */
/* لینک ناوبری — تعریف یکپارچه (پیش از این دو بار اعلام می‌شد؛ ادغام شد) */
.nav-link { position: relative; color: var(--text-soft); font-weight: 500;
            transition: color 300ms ease; padding: 4px 2px; }
.nav-link::after {
  content: ''; position: absolute; right: 0; bottom: -6px;
  width: 100%; height: 2px; background: var(--accent);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-link:hover { color: var(--accent-strong); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--accent-strong); font-weight: 700; }

/* badge سبد — پالس یک‌بار هنگام افزودن */
.cart-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px; margin-right: 6px;
  border-radius: var(--radius-pill);   background: var(--shafa-green-alpine); color: var(--shafa-on-emerald);
  font-size: var(--fs-caption); font-weight: 700; font-variant-numeric: tabular-nums;
}
.cart-badge[hidden] { display: none; } /* سبد خالی → badge پنهان (override روی inline-flex) */
.cart-badge.bump { animation: badge-bump 400ms cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes badge-bump {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.25); }
  60%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* قاب قطرهٔ عسل — امضای برند (نسخهٔ روشن: مستطیل گوشهٔ گرد بزرگ + مرز موم) */
.hex-frame {
  border: 2px solid var(--shafa-border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
  position: relative;
}
.hex-frame:hover { border-color: var(--border-strong); }

/* skeleton shimmer عسلی */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--accent-soft) 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* focus-visible — دسترسی
   (تعریف گلوبال در خط ۶۱ منبع حقیقت است؛ اینجا فقط offset متفاوت است.
    رنگ از --shafa-gold-text استفاده می‌شود چون طلای ساتن با آلفا ۰٫۵
    فقط حدود ۲٫۳:۱ کنتراست دارد و از حد WCAG 2.2 برای فوکوس (۳:۱) کمتر است.) */

/* Button focus ring */
.btn:focus-visible {
  outline: 3px solid var(--shafa-gold-text);
  outline-offset: 3px;
}

/* Product card focus — outline بیرون از کارت، روی پس‌زمینهٔ بخش: ۵٫۰۶:۱ */
.product-card:focus-within {
  outline: 2px solid var(--shafa-gold-text);
  outline-offset: 4px;
}

/* ===== subtle micro-interactions retained; heavy decorative animations removed ===== */

/* اسکرول‌ریویل (scroll-reveal)
   حالت پنهان اولیه فقط وقتی اعمال می‌شود که سیستم motion واقعاً init شده باشد
   (کلاس js-motion روی <html>). در غیر این صورت — از جمله خطای بارگذاری GSAP،
   شکست ScrollTrigger، یا هر خطای JS — محتوا پیش‌فرض مرئی است.
   این تضمین می‌کند انیمیشن «ارتقاءدهنده» باشد نه «شرط لازم برای دیده‌شدن». */
html.js-motion .scroll-reveal {
  opacity: 0; transform: translateY(30px);
}
[data-gsap-init] .scroll-reveal {
  transition: none !important;
}
html.js-motion .scroll-reveal.is-visible { opacity: 1; transform: translateY(0); }
.scroll-reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ----------------------------- ۷.۵) breadcrumb ----------------------------- */
.breadcrumb {
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.breadcrumb__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-2);
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--fs-small);
  color: var(--muted);
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--shafa-gold-text);
}
.breadcrumb__sep {
  color: var(--border);
  user-select: none;
}
.breadcrumb__item--current span {
  color: var(--text);
  font-weight: 500;
}

/* ----------------------------- ۸) navbar -----------------------------
 * نوار چسبان + drawer موبایل. z-index و touch-target از توکن‌ها می‌خوانند.
 * اعلام‌های تکراری .nav-link ادغام شد (پیش از این ۳ بار اعلان می‌شد).
 */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-height, 72px); padding: 0 var(--s-4);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--t-base) var(--ease),
              backdrop-filter var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}
.nav--filled {
  background: rgba(var(--bg-rgb), .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
  box-shadow: 0 2px 0 rgba(var(--accent-rgb), .10);
}
.nav__logo { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.25rem; font-family: var(--font-display); }
.nav__logo img { width: 36px; height: 36px; }
/* رنگ/گرادیان .brand-name در components/nav.css تعریف شده — اینجا دیگر
   تعریف دوم وجود ندارد. دو تعریف هم‌زمان یعنی هر ویرایشی روی اولی بی‌اثر. */
.nav__links { display: flex; align-items: center; gap: var(--s-5); }
.nav__actions { display: flex; align-items: center; gap: var(--s-4); }

/* جستجوی نوار (pill + آیکون) */
.nav__search { position: relative; display: flex; align-items: center; }
.nav__search-label {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.nav__search input {
  background: var(--surface-2); border: none; border-radius: var(--radius-pill);
  /* آیکون جستجو در inline-end است (چپ در RTL)؛ فضای رزروشده هم باید همان‌جا باشد.
     نسخهٔ قبلی 44px را روی inline-start (راست) می‌گذاشت و متن فارسی روی آیکون می‌افتاد. */
  padding-block: 8px; padding-inline: 16px 44px;
  font-size: .9rem; width: 200px; color: var(--text);
  outline: none; transition: box-shadow var(--t-base) var(--ease), width var(--t-base) var(--ease);
}
.nav__search input::placeholder { color: var(--muted); }
.nav__search input:focus { box-shadow: var(--focus-ring); width: 240px; }
.nav__search .material-symbols-outlined {
  position: absolute; inset-inline-end: 14px; pointer-events: none; color: var(--text-soft); font-size: 20px;
}

/* دسکتاپ: فقط جستجوی دسکتاپ */
.nav__search--desktop { display: flex; }
.nav__search--mobile { display: none; }
.nav__search--drawer { display: flex; }

/* دکمهٔ «خرید آنلاین» در نوار — کوچک‌تر و مینیمال */
.nav__cta { min-height: var(--touch-sm); padding: 6px 18px; font-size: var(--fs-small); font-weight: 700; }
@media (min-width: 769px) and (max-width: 900px) {
  .nav__search--desktop { display: none; }
  .nav__search--mobile { display: none; }
}

/* موبایل: جستجوی prominent + حذف جستجو از drawer */
@media (max-width: 768px) {
  .nav__search--desktop { display: none; }
  .nav__search--mobile { display: flex; }
  .nav__search--drawer { display: none; }
  .nav__search input { width: 100%; }
  .nav__search input:focus { width: 100%; }
  .nav__search .material-symbols-outlined { inset-inline-end: 12px; }
}

/* دکمه‌ی همبرگر (موبایل) — touch target استاندارد */
.nav__burger { display: none; width: var(--touch); height: var(--touch); align-items: center; justify-content: center; }
.nav__burger svg { width: 26px; height: 26px; }

/* drawer موبایل */
.drawer {
  position: fixed; inset: 0; z-index: var(--z-drawer);
  visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity var(--t-base) var(--ease), visibility var(--t-base);
}
.drawer.is-open { visibility: visible; opacity: 1; pointer-events: auto; }
.drawer__backdrop { position: absolute; inset: 0; background: var(--shadow_overlay); backdrop-filter: blur(4px); }
.drawer__panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(320px, 86vw);
  background: var(--bg); border-left: 1px solid var(--border);
  transform: translateX(100%); transition: transform var(--t-slow) var(--ease);
  display: flex; flex-direction: column; padding: var(--s-5) var(--s-4);
  overflow-y: auto;
}
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__item {
  display: flex; align-items: center; gap: .75rem;
  min-height: var(--touch-lg); padding: 10px 12px; border-radius: var(--radius-sm);
  font-weight: 500; color: var(--text-soft);
  border-bottom: 1px solid var(--border);
}
.drawer__item:hover { color: var(--accent-strong); background: var(--surface-2); }
.drawer__item.is-active { color: var(--accent-strong); }
.drawer__item img { width: 22px; height: 22px; }
.drawer__close { align-self: flex-end; width: var(--touch); height: var(--touch); display: flex; align-items: center; justify-content: center; }

/* مودال (Modal) — کامپوننت استاندارد تأیید/نمایش.
 * نشانه‌گذاری:
 *   <div class="modal" role="dialog" aria-modal="true" aria-labelledby="m-t">
 *     <div class="modal__backdrop" data-modal-close></div>
 *     <div class="modal__panel" role="document">
 *       <button class="modal__close" data-modal-close aria-label="بستن">…</button>
 *       <h2 id="m-t">…</h2> …
 *     </div>
 *   </div>
 * باز/بسته: افزودن/حذف .is-open. مدیریت فوکوس (focus trap) با main.js انجام می‌شود.
 */
.modal {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center; padding: var(--s-4);
  visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity var(--t-base) var(--ease), visibility var(--t-base);
}
.modal.is-open { visibility: visible; opacity: 1; pointer-events: auto; }
.modal__backdrop { position: absolute; inset: 0; background: var(--shadow_overlay); backdrop-filter: blur(4px); }
.modal__panel {
  position: relative; z-index: 1; max-width: 32rem; width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-toast); padding: var(--s-5) var(--s-6);
  transform: translateY(12px) scale(.98); transition: transform var(--t-slow) var(--ease);
  /* dvh: روی iOS وقتی نوار آدرس نمایان است، vh برابر ارتفاع viewport بزرگ
     است و ۹۰vh از پنل زیر نوار مرورگر پنهان می‌شود. */
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal.is-open .modal__panel { transform: translateY(0) scale(1); }
.modal__close {
  position: absolute; top: var(--s-3); left: var(--s-3);   /* در RTL دکمهٔ بستن سمت چپ */
  width: var(--touch); height: var(--touch); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--muted);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.modal__close:hover { background: var(--surface-2); color: var(--accent-strong); }
.modal__title { margin-bottom: var(--s-3); }
.modal__actions { display: flex; gap: var(--s-2); justify-content: flex-end; margin-top: var(--s-5); }

/* ----------------------------- ۹) hero ----------------------------- */
/* پانل CTA — Liquid Glass */
.cta-panel {
  max-width: 56rem; margin: 0 auto; text-align: center;
  padding: var(--s-7) var(--s-6);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  display: flex; flex-direction: column; align-items: center; gap: var(--s-4);
}
.cta-panel h2 { color: var(--text); }
.cta-panel p { max-width: 48ch; color: var(--text-soft); }

/* پوشش مانیفست — کارت نرم */
.manifesto-wrap {
  padding: var(--s-6); border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: var(--s-4);
}

/* ارزش‌ها (۶ کارت آیکونی) */
.values { display: grid; gap: var(--s-4); grid-template-columns: repeat(3, 1fr); }
.value-card { padding: var(--s-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease); }
.value-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.value-card img { width: 36px; height: 36px; margin-bottom: var(--s-3); color: var(--accent); }
.value-card h3 { margin-bottom: var(--s-2); color: var(--text); }

/* مانیفست */
.manifesto { font-size: clamp(1.1rem, 2vw, 1.4rem); line-height: 1.9; max-width: 60ch; color: var(--text); }
.manifesto::first-letter { color: var(--accent); font-weight: 700; }

/* wave divider */
.wave-divider { display: block; width: 100%; height: auto; color: var(--accent); opacity: .35; }

/* ===== Hero Premium — Premium Natural Editorial ===== */
.hero-premium {
  position: relative;
  padding-block: clamp(5rem, 10vw, 8rem);
  background: var(--bg);
  overflow: hidden;
}
.hero-premium__bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
}
.hero-premium__bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  opacity: .35;
}
.hero-premium::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .03;
  background-image: none;
}
/* گریدیوینت محتوا اکنون در home.css:59 تعریف شده (to right — هماهنگ با direction: rtl).
   این بلوک حذف شد تا از تضاد با home.css جلوگیری شود. */
.hero-premium .container { position: relative; z-index: 1; }
.hero-premium__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "art content"
    "art social";
  gap: var(--s-8);
  direction: ltr;
}
.hero-premium__content { grid-area: content; direction: rtl; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-4); position: relative; z-index: 2; }
.hero-premium__art { grid-area: art; direction: ltr; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.hero-premium__social { grid-area: social; direction: rtl; }
.hero-premium__title {
  font-size: clamp(2.8rem, 5.2vw, 4.2rem); font-weight: 700; line-height: 1.05;
  color: var(--text); letter-spacing: var(--shafa-tracking-normal);
}
.hero-premium__sub {
  font-size: clamp(1.05rem, 1.5vw, 1.15rem); color: var(--text-soft);
  line-height: 1.9; max-width: 48ch;
}
.hero-premium__actions { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-2); }
/* .hero-premium__art img: استایل نهایی در home.css (page-specific) */
.hero-premium__honeycomb {
  position: absolute; bottom: -10%; right: -5%; width: 55%; height: auto; opacity: .20; pointer-events: none; z-index: 0;
  mask-image: linear-gradient(to top, rgba(0,0,0,.5), transparent 70%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.5), transparent 70%);
}
.hero-premium__social {
  display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-2);
}
.hero-social__avatars {
  display: flex; gap: 0; margin-left: var(--s-2);
}
.hero-social__avatars img, .hero-social__initial {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--bg);
  object-fit: cover; background: var(--surface-2); color: var(--text-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-caption); font-weight: 700; margin-right: -8px;
}
.hero-social__text {
  display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-small); color: var(--text-soft);
}
.hero-social__stars { display: flex; gap: 2px; color: var(--accent); }
.hero-social__stars .material-symbols-outlined { font-size: 18px; }
.hero-social__stars .material-symbols-outlined.is-on { color: var(--accent-2); }
.hero-premium__trust {
  margin-top: var(--s-6); padding: var(--s-5) var(--s-4);
  background: rgba(var(--bg-rgb), .85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(28,25,23,.06);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4);
  position: relative; z-index: 2;
}
.hero-trust__item {
  display: flex; align-items: center; gap: var(--s-3); color: var(--text-soft);
}
.hero-trust__item .material-symbols-outlined {
  font-size: 28px; color: var(--accent); flex-shrink: 0;
}
.hero-trust__item div { display: flex; flex-direction: column; }
.hero-trust__item b { font-size: var(--fs-small); color: var(--text); font-weight: 700; }
.hero-trust__item span { font-size: var(--fs-caption); color: var(--muted); line-height: 1.4; }

/* Scroll Indicator */
.hero-premium__scroll {
  position: absolute; bottom: var(--s-4); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: var(--s-1);
  font-size: var(--fs-caption); color: var(--muted); font-weight: 500;
  z-index: 2; animation: fadeInUp 1s ease-out .5s both;
}
.hero-premium__scroll .material-symbols-outlined {
  font-size: 20px; animation: bounceDown 2s ease-in-out infinite;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* About panel — neutral editorial surface */
.about-panel {
  background: var(--shafa-green-soft); border: 1px solid var(--shafa-border-subtle);
  border-radius: 3rem; padding: clamp(2rem, 5vw, 5rem);
  position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.about-panel::before {
  content: ''; position: absolute; bottom: 0; inset-inline: 0; height: 6rem;
  background: var(--shafa-gold-subtle); transform: rotate(180deg); opacity: .4;
}
.about-panel__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); align-items: center; position: relative; z-index: 10; }
.about-panel__img { border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 4px solid rgba(255,255,255,.5); transition: transform 500ms var(--ease); }
.about-panel__img:hover { transform: scale(1.02); }
.about-panel__badge {
  position: absolute; bottom: -2rem; inset-inline-end: -2rem; background: var(--bg);
  padding: var(--s-5); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid rgba(120,113,108,.15);
}
.about-panel__badge b { color: var(--accent); font-size: 1.25rem; line-height: 1.2; display: block; }
.about-panel__badge span { color: var(--text-soft); font-size: var(--fs-small); }
.about-panel h2 { color: var(--accent-strong); margin-bottom: var(--s-5); }
.about-panel p { color: var(--text-soft); margin-bottom: var(--s-5); line-height: 1.9; }
.about-panel__list { display: flex; flex-direction: column; gap: var(--s-3); margin-bottom: var(--s-6); }
.about-panel__list li { display: flex; align-items: center; gap: var(--s-2); color: var(--secondary); font-weight: 700; transition: transform var(--t-base) var(--ease); }
.about-panel__list li:hover { transform: translateX(-8px); }
.about-panel__list .material-symbols-outlined { color: var(--success); }

/* Features grid (۴ کارت) — «چرا عسل طبیعی؟» */
.features-section { padding-block: var(--space-section); background: rgba(28,25,23,.02); }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-6); }
.feature-card {
  background: var(--surface); padding: var(--s-6); border-radius: var(--radius);
  box-shadow: var(--shadow); border-top: 4px solid var(--accent); text-align: center;
  transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.feature-card__icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--s-5); background: var(--accent-soft); color: var(--accent);
  transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1), background 300ms ease;
}
.feature-card:hover .feature-card__icon {
  transform: scale(1.1) rotate(-3deg);
}
.feature-card__icon .material-symbols-outlined { font-size: 32px; }
.feature-card h3 { color: var(--accent); margin-bottom: var(--s-2); }
.feature-card p { color: var(--text-soft); font-size: var(--fs-small); }
.feature-card--secondary { border-top-color: var(--secondary); }
.feature-card--secondary .feature-card__icon { background: var(--shafa-green-soft); color: var(--secondary); }
.feature-card--secondary h3 { color: var(--secondary); }
.feature-card--tertiary { border-top-color: var(--tertiary); }
.feature-card--tertiary .feature-card__icon { background: rgba(28,25,23,.06); color: var(--tertiary-container); }
.feature-card--tertiary h3 { color: var(--tertiary-container); }
.feature-card--primary-strong { border-top-color: var(--accent-strong); }
.feature-card--primary-strong .feature-card__icon { background: var(--accent-soft); color: var(--accent-strong); }
.feature-card--primary-strong h3 { color: var(--accent-strong); }

/* Best-seller parallax — تصویر full-bleed + دکمهٔ «سفارش محدود» */
.best-seller {
  position: relative; padding-block: clamp(5rem, 10vw, 8rem) clamp(8rem, 14vw, 12rem);
  overflow: hidden;
}
.best-seller__bg { position: absolute; inset: 0; z-index: 0; }
  .best-seller__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .25; will-change: transform; }
.best-seller__inner { position: relative; z-index: 10; text-align: center; }
.best-seller__title { color: var(--accent-strong); margin-bottom: var(--s-7); font-size: var(--fs-h1); }
.best-seller__row { display: flex; flex-direction: column; gap: var(--s-8); align-items: center; justify-content: center; }
.best-seller__circle-img { width: 256px; height: 256px; object-fit: cover; border-radius: 50%; border: 8px solid var(--surface-2); box-shadow: var(--shadow-hover); transition: transform 700ms var(--ease); }
.best-seller__item:hover .best-seller__circle-img { transform: rotate(6deg); }
.best-seller__name { font-size: 1.25rem; color: var(--accent); margin-top: var(--s-5); }
.best-seller__price { font-weight: 700; color: var(--text); margin-top: var(--s-2); }
.best-seller__desc { max-width: 36ch; color: var(--text); line-height: 1.8; margin-bottom: var(--s-5); }

/* badge پایهٔ گوشه‌ای — اندازهٔ استاندارد برند */
.badge { display: inline-block; padding: 4px 12px; border-radius: var(--radius-pill); font-size: var(--fs-caption); font-weight: 700; }
.badge--accent { background: var(--accent); color: var(--on-accent); }
.badge--soft { background: var(--accent-soft-bg); color: var(--accent-strong); border: 1px solid var(--accent-soft-border); }

/* ----------------------------- ۱۰) کارت محصول -----------------------------
 * سیستم کارت یکپارچه: همهٔ کارت‌ها از همان توکن‌های elevation/رنگ می‌خوانند.
 * وARIANTها: --paper (بافت کاغذ) | --glow (درخشش hover) | --center
 */
/* کپی دوم cards.css:274 — min() برای جلوگیری از سرریز افقی در ویویپورت
   باریک‌تر از ۳۲۸px (۲۷۲px قابل‌استفاده < ۲۸۰px حداقل قبلی) */
/* تعریف تکراری از cards.css:346 — حذف شد تا تنها یک منبع داشته باشد. */
/* .products-grid { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 320px)); justify-content: center; position: relative; } */
/* =====================================================================
 *  بلوک .product-card (قانون بازنویسی‌شده) حذف شد — نوامبر ۱۴۰۴
 *  ---------------------------------------------------------------------
 *  ۴۱ خط از این فایل، بازآفرینی کاملِ همان مؤلفه در components/cards.css
 *  بود: کارت پایه، hover/active، قاب تصویر، تصویر، عنوان، متا و قیمت.
 *  cards.css بعد از style.css بارگذاری می‌شود، پس هر مقدارِ متفاوت بی‌صدا
 *  بازنویسی می‌شد و دو فایل هرگز نمی‌توانستند همگام شوند.
 *
 *  سه قانون که فقط اینجا بودند و به cards.css منتقل شدند:
 *    1. html.js-motion .product-card__img img:not(.is-loaded) { opacity: 0 }
 *       ← تنها جایی که وضعیت «هنوز لود نشده» صریحاً صفر می‌شد
 *    2. .product-card__meta .tag { ... }  ← ظاهر برچسب منطقه/فصل
 *    3. .product-card__img.img-frame { border; overflow }  ← قاب مویی تصویر
 *
 *  قوانین بالاتر (focus-within) و پایین‌تر (--paper/--glow/--center،
 *  __foot، قیمت قبلی، compare) دست‌نخورده ماندند چون در cards.css
 *  تکرار نشده بودند.
 * ===================================================================== */

/* ── نمایش تخفیف (compare_price) ────────────────────────── */
.badge--sale {
    background: var(--accent-strong);
    color: var(--on-accent);
    border-radius: var(--radius-pill);
    padding: 2px 10px;
    font-size: var(--fs-small);
    font-weight: 700;
    white-space: nowrap;
}

.price-old,
.product-card__price-old,
.pdp-price__old {
    color: var(--muted);
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    font-size: var(--fs-small);
    margin-inline-end: var(--s-1);
}

.pdp-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin-block: var(--s-2);
}

.pdp-price__current {
    color: var(--text);
}

.pdp-price__save {
    flex-basis: 100%;
    font-size: var(--fs-small);
    color: var(--success);
    font-weight: 700;
}

/* Trust Badge: ضمانت اصالت — زیر قیمت PDP، بالای CTA */
.pdp-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    font-size: var(--fs-small);
    font-weight: 500;
    color: var(--text-soft);
    text-decoration: none;
    padding: var(--s-1) var(--s-2);
    border-radius: var(--radius-sm);
    transition: color var(--t-fast) ease, background-color var(--t-fast) ease;
}
.pdp-trust-badge .material-symbols-outlined {
    font-size: 20px;
    color: var(--accent);
}
.pdp-trust-badge:hover {
    color: var(--shafa-gold-text);
    background: var(--surface-alt);
}
.pdp-trust-badge:focus-visible {
    /* پس‌زمینهٔ این نشان شفاف است (روی بوم/کارت صفحه)، پس طلای متن کنتراست
       ۵٫۰۶–۵٫۳۶:۱ می‌دهد. --accent (#C5A059) فقط ۲٫۳۲:۱ بود. */
    outline: 2px solid var(--shafa-gold-text);
    outline-offset: 1px;
}

/* __price-wrap حذف شد — نسخهٔ یکتا در components/cards.css:353 است
   (display: flex در برابر inline-flex اینجا؛ cards.css بارگذاری آخر است). */

/* modifierهای امضای Stitch و __foot به components/cards.css منتقل شد —
   آنجا کنار بقیهٔ کارت زندگی می‌کنند. __price-old هم در L959 با selector
   مشترک سه‌گانه (price-old / pdp-price__old) باقی ماند چون بخشی از آن
   قانون مشترک است، نه خاص کارت. */

/* badge «پرفروش‌ترین» گوشه‌ی کارت
   رنگ‌ها از نسخهٔ زندهٔ components/cards.css:80 کپی شده‌اند، نه اینکه از
   توکن‌های legacy (--accent/--on-accent) ساخته شوند: طلای ساتن روی سفید
   ۲.۴۶:۱ است و برای متن ۱۱ پیکسلی زیر حد AA (۴.۵:۱) می‌افتد. این نسخه
   فقط در مسیر fallback لود می‌شود (وقتی bundle.min.css کهنه است)، ولی
   دقیقاً همان مسیری است که ۸ لینک مجزا بارگذاری می‌شود. */
.badge--top {
  position: absolute; top: var(--s-3); right: var(--s-3); z-index: var(--z-base);
  background: var(--shafa-gold-gradient); color: var(--shafa-on-gold);
  font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: var(--radius-pill); box-shadow: var(--shadow);
}

/* برچسب‌های وضعیتی (برای داشبورد و پنل ادمین) — از tint‌های نرم توکن‌شده */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--radius-pill);
       font-size: var(--fs-small); font-weight: 500; border: 1px solid var(--border);
       color: var(--text-soft); background: var(--surface); white-space: nowrap; }
.tag.is-active { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft-bg); }
.tag--success { color: var(--success); border-color: var(--success-soft-border); background: var(--success-soft-bg); }
.tag--danger  { color: var(--danger);  border-color: var(--danger-soft-border);  background: var(--danger-soft-bg); }
.tag--warn    { color: var(--accent); border-color: var(--accent-soft-border); background: rgba(var(--accent-rgb), .14); }
.tag--info    { color: var(--accent-strong); border-color: rgba(var(--accent-rgb), .3); background: rgba(255, 224, 168, .35); }

/* صفحه‌ی محصول تکی */
.product-detail { display: grid; gap: var(--s-6); grid-template-columns: 1fr 1fr; align-items: start; }
.product-detail__gallery .main-img { aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); border: 2px solid var(--shafa-border-subtle); }
.product-detail__gallery .thumbs { display: flex; gap: var(--s-2); margin-top: var(--s-3); overflow-x: auto; }
.product-detail__info h1 { margin-bottom: var(--s-3); color: var(--text); }
.product-detail__specs { display: grid; gap: var(--s-2); margin-block: var(--s-4); }
.product-detail__spec { display: flex; justify-content: space-between; padding: var(--s-2) 0; border-bottom: 1px solid var(--border); }
.product-detail__spec .label { color: var(--muted); }

/* ===== سبد خرید (cart UX) — کاهش اصطکاک + اعتماد ===== */
.cart-assurance {
  display: flex; align-items: center; gap: var(--s-2); justify-content: center;
  margin-bottom: var(--s-4); padding: var(--s-3) var(--s-4);
  background: var(--success-soft-bg); border: 1px solid var(--success-soft-border);
  border-radius: var(--radius-pill); font-size: var(--fs-small); color: var(--text-soft);
}
.cart-assurance .material-symbols-outlined { font-size: 20px; color: var(--success); flex-shrink: 0; }

/* ردیف سبد: تصویر | بدنه | تعداد | حذف | جمع — responsive با grid */
.cart-row {
  display: grid; grid-template-columns: 96px 1fr auto auto auto;
  align-items: center; gap: var(--s-4); padding: var(--s-3) var(--s-4);
}
.cart-row__img { width: 96px; height: 96px; flex-shrink: 0; border-radius: var(--radius); overflow: hidden; }
.cart-row__img img { width: 100%; height: 100%; object-fit: cover; }
.cart-row__body { min-width: 0; }
.cart-row__package { display: inline; font-size: var(--fs-small); color: var(--text-soft); }
.cart-row__warn { color: var(--danger); font-size: var(--fs-small); margin-top: var(--s-1); }
.cart-row__qty { display: flex; align-items: center; }
.cart-row__remove { display: inline-flex; }
.cart-row__line { min-width: 110px; text-align: left; }

/* پنل خلاصهٔ سبد: sticky + هم‌راستا با ارتفاع نوار */
.cart-summary { position: sticky; top: calc(var(--nav-height) + var(--s-2)); }
/* نوار اعتماد پایینِ پنل خلاصه */
.cart-trust { margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--border);
  display: grid; gap: var(--s-2); font-size: var(--fs-caption); color: var(--muted); }
.cart-trust span { display: flex; align-items: center; gap: var(--s-1); }
.cart-trust .material-symbols-outlined { font-size: 16px; color: var(--accent); }

/* Coupon UI */
.cart-coupon {
  margin-bottom: var(--s-4);
  padding: var(--s-4);
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.cart-coupon__form {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.cart-coupon__label {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text-soft);
}
.cart-coupon__row {
  display: flex;
  gap: var(--s-2);
}
.cart-coupon__row input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: var(--fs-small);
  color: var(--text);
  min-width: 0;
}
.cart-coupon__row input:focus {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: var(--accent);
}
.cart-coupon__error {
  font-size: var(--fs-small);
  color: var(--danger);
  min-height: 1.2em;
}
.cart-coupon__applied {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}
.cart-coupon__applied .material-symbols-outlined {
  color: var(--success);
  font-size: 20px;
}
.cart-coupon__discount {
  margin-right: auto;
  color: var(--success);
  font-weight: 700;
}
.cart-coupon__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--muted);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.cart-coupon__remove:hover {
  background: var(--surface);
  color: var(--danger);
}
.cart-summary__discount {
  color: var(--success);
}

/* Layout wrappers for cart/checkout pages */
.cart-layout {
  display: grid; grid-template-columns: 1fr 320px; gap: var(--s-6); align-items: start; position: relative;
}
.cart-items {
  display: grid; gap: var(--s-3);
}
.cart-skeleton {
  display: none;
  position: absolute;
  inset: 0;
  background: var(--surface);
  z-index: 2;
  padding: var(--s-4);
}
.cart-skeleton.is-loading {
  display: block;
}
.cart-skeleton__inner {
  display: grid; gap: var(--s-4);
}
.checkout-layout {
  display: grid; grid-template-columns: 1fr 340px; gap: var(--s-6); align-items: start;
}
.checkout-summary {
  position: sticky; top: calc(var(--nav-height) + var(--s-3));
}
.checkout-summary__items {
  display: grid; gap: var(--s-3); margin-bottom: var(--s-4);
}
.checkout-summary__item {
  display: flex; gap: var(--s-3); align-items: center;
}
.checkout-summary__item img {
  width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0;
}
.checkout-summary__item-body {
  flex: 1; min-width: 0;
}

@media (max-width: 768px) {
  .cart-coupon__row {
    flex-direction: column;
  }
  .cart-coupon__row .btn {
    width: 100%;
  }
}

/* اطلاعات ارسال در خلاصهٔ checkout (اعتمادسازی) */
.checkout-shipping { margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--border); display: grid; gap: var(--s-2); }
.checkout-shipping__row { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-small); color: var(--text-soft); }
.checkout-shipping__row .material-symbols-outlined { font-size: 20px; color: var(--success); flex-shrink: 0; }

/* Checkout Progress */
.checkout-progress {
  display: flex; align-items: center; justify-content: center;
  gap: var(--s-2); margin-bottom: var(--s-5);
}
.checkout-progress__step {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-2) var(--s-3); border-radius: var(--radius);
  background: var(--surface-2);
}
.checkout-progress__step.is-active {
  background: var(--accent); color: #fff;
}
.checkout-progress__step.is-active .checkout-progress__num {
  background: var(--shafa-input-bg-strong); color: var(--shafa-gold-text);
}
.checkout-progress__num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--border); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-small); font-weight: 700;
}
.checkout-progress__label {
  font-size: var(--fs-small); font-weight: 500;
}
.checkout-progress__line {
  width: 40px; height: 2px; background: var(--border);
}
@media (max-width: 480px) {
  .checkout-progress__label { display: none; }
  .checkout-progress__line { width: 24px; }
}

/* Dashboard */
.dashboard-layout {
  display: grid; grid-template-columns: 340px 1fr; gap: var(--s-6); align-items: start;
}
.dashboard-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3);
}
.dashboard-stat {
  text-align: center;
}
.dashboard-profile,
.dashboard-rep {
  margin-bottom: var(--s-4);
}
.dashboard-orders {
  display: grid; gap: var(--s-4);
}
.dashboard-order {
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.dashboard-order:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow));
}
.dashboard-focus-order {
  border-color: var(--accent);
  margin-bottom: var(--s-6);
}
.dashboard-telegram {
  border-color: var(--accent-strong);
  margin-top: var(--s-4);
  background: linear-gradient(135deg, var(--surface), var(--accent-soft)));
}

@media (max-width: 900px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
}

/* Order View */
.report-detail-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
}
.report-detail-grid dt {
  color: var(--muted);
}
.report-detail-grid dd {
  margin: 0;
}
.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.timeline-item {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
}
.timeline-item__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.timeline-item__icon .material-symbols-outlined {
  font-size: 18px;
  color: var(--muted);
}
.timeline-item__body {
  flex: 1;
  min-width: 0;
}
.timeline-item__title {
  font-weight: 500;
  font-size: var(--fs-small);
}
.timeline-item__desc {
  font-size: var(--fs-small);
  color: var(--muted);
}
.timeline-item__meta {
  font-size: var(--fs-small);
  color: var(--muted);
  margin-top: 2px;
}
.financial-summary {
  background: var(--surface-2);
  padding: var(--s-3);
  border-radius: var(--radius-sm);
}
.financial-summary__row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.financial-summary__row--total {
  font-weight: 700;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 8px;
}

/* 639.98 نه 640: پروژه هم min-width:640px دارد (۱۳ مورد). با 640 دقیقاً
   هر دو بازه فعال می‌شدند و نتیجه به ترتیب منبع وابسته می‌شد. */
@media (max-width: 639.98px) {
  .report-detail-grid {
    gap: 6px 10px;
  }
}

/* Product Reviews */
.product-review {
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.product-review:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow));
}

.qr-card {
  margin-top: var(--s-5);
  padding: var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.qr-card img {
  width: 180px;
  height: 180px;
  margin: 0 auto var(--s-3);
}

/* بنر نتایج جستجو (products.php?q=…) */
.search-banner {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); margin-bottom: var(--s-5);
  border: 1px solid var(--accent-soft); border-radius: var(--radius); background: var(--surface-alt);
}
.search-banner__icon { color: var(--accent-strong); font-size: 22px; }
.search-banner__text { flex: 1; color: var(--text-soft); font-size: var(--fs-small); }
.search-banner__text b { color: var(--text); }
.search-banner__clear {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; color: var(--muted);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.search-banner__clear:hover { background: var(--surface-2); color: var(--accent-strong); }
.search-banner__clear .material-symbols-outlined { font-size: 20px; }

/* نوار ابزار لیست محصولات (مرتب‌سازی + تعداد) */
.products-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3); margin-bottom: var(--s-4); flex-wrap: wrap;
}
.products-toolbar__count { font-size: var(--fs-small); color: var(--muted); }
.products-toolbar__filter-active { color: var(--accent-strong); font-weight: 500; }
.products-toolbar__sort {
  display: flex; align-items: center; gap: var(--s-2);
}
.products-toolbar__sort label {
  font-size: var(--fs-small); color: var(--muted); white-space: nowrap;
}
.products-toolbar__sort select {
  appearance: none; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 6px 32px 6px 12px; font-size: var(--fs-small);
  color: var(--text); cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23554336' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 10px center;
}
.products-toolbar__sort select:focus {
  outline: none; box-shadow: var(--focus-ring); border-color: var(--accent);
}
.products-toolbar__price-filter {
  display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap;
}
.products-toolbar__price-filter label {
  font-size: var(--fs-small); color: var(--muted); white-space: nowrap;
}
.products-toolbar__price-filter input[type="number"] {
  width: 100px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 6px 12px; font-size: var(--fs-small);
  color: var(--text);
}
.products-toolbar__price-filter input[type="number"]:focus {
  outline: none; box-shadow: var(--focus-ring); border-color: var(--accent);
}
.products-toolbar__clear-price {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; color: var(--muted);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.products-toolbar__clear-price:hover { background: var(--surface-2); color: var(--accent-strong); }
.products-toolbar__clear-price .material-symbols-outlined { font-size: 18px; }

@media (max-width: 768px) {
  .products-toolbar { flex-direction: column; align-items: stretch; }
  .products-toolbar__sort, .products-toolbar__price-filter { justify-content: space-between; }
  .products-toolbar__price-filter input[type="number"] { width: 80px; }
}

/* حالت خالی — Enhanced Empty State */
.products-empty {
  text-align: center; padding: var(--s-7) var(--s-4);
}
.products-empty .material-symbols-outlined {
  font-size: 64px; color: var(--muted); margin-bottom: var(--s-4);
}
.products-empty h3 { margin-bottom: var(--s-3); color: var(--text); }
.products-empty ul {
  display: inline-block; text-align: right;
  margin: var(--s-3) 0 var(--s-4); padding: 0;
  list-style: disc;
}
.products-empty li { margin-bottom: var(--s-1); }

/* --- autocomplete جستجو --- */
.search-suggest {
  position: absolute; z-index: var(--z-modal));
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  max-height: 320px; overflow-y: auto;
  display: none; opacity: 0; transform: translateY(-4px);
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.search-suggest.is-visible { display: block; opacity: 1; transform: translateY(0); }
.search-suggest__item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-2) var(--s-3); color: var(--text);
  transition: background var(--t-fast) var(--ease);
}
/* پیش‌تر focus فقط پس‌زمینه را عوض می‌کرد (#FFFFFF → #F5F1E8 یعنی ۱٫۰۵:۱) و
   outline را none می‌کرد — یعنی فوکوس کیبورد عملاً نامرئی بود. حالا outline
   واقعی دارد. */
.search-suggest__item:hover { background: var(--surface-2); }
.search-suggest__item:focus, .search-suggest__item:focus-visible {
  background: var(--surface-2);
  outline: 2px solid var(--shafa-gold-text);
  outline-offset: -2px;
}
.search-suggest__item img {
  width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0;
}
.search-suggest__title { flex: 1; font-size: var(--fs-small); font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-suggest__price { font-size: var(--fs-small); color: var(--accent-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* کارت آزمایش‌گاه — سیگنال اعتماد برند (product.php) */
.lab-card {
  margin-top: var(--s-5); padding: var(--s-4) var(--s-5);
  border: 1px solid var(--success-soft-border); border-left: 4px solid var(--success);
  border-radius: var(--radius); background: rgba(var(--success-rgb), .06);
}
.lab-card__head { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-2); }
.lab-card__head .material-symbols-outlined { font-size: 26px; color: var(--success); }
.lab-card__head h3 { color: var(--success); font-size: 1.05rem; font-weight: 700; }
.lab-card__body { color: var(--text-soft); font-size: var(--fs-small); line-height: 1.9; margin: 0; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); overflow: hidden; background: var(--surface); }
.qty-control button { width: var(--touch); height: var(--touch); display: flex; align-items: center; justify-content: center; color: var(--accent-strong); }
.qty-control button:hover { background: var(--surface-2); }
.qty-control input { width: 56px; height: var(--touch); text-align: center; border: none; background: transparent; font-variant-numeric: tabular-nums; color: var(--text); }

/* ===== ردیف سبد خرید (cart-row) — استانداردسازی برای کاهش اصطکاک =====
 * اجزای flex با grid-area مرتبط: img | body | qty | remove | line-total
 * در موبایل به یک ستون دو-تایی (تصویر+بدنه روی ردیف، کنترل‌ها پایین) تبدیل می‌شود. */
.cart-row {
  display: grid;
  grid-template-areas: "img body qty remove line";
  grid-template-columns: 96px 1fr auto auto 130px;
  align-items: center; gap: var(--s-4);
  padding: var(--s-4);
}
.cart-row__img { width: 96px; height: 96px; flex-shrink: 0; grid-area: img;
                 aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.cart-row__img img { width: 100%; height: 100%; object-fit: cover; }
.cart-row__body { grid-area: body; min-width: 0; }
.cart-row__package { display: inline; font-size: var(--fs-small); color: var(--text-soft); }
.cart-row__qty { grid-area: qty; }
.cart-row__remove { grid-area: remove; }
.cart-row__line { grid-area: line; text-align: left; min-width: 120px; }
.cart-row__warn { color: var(--danger); font-size: var(--fs-small); margin-top: var(--s-1); font-weight: 500; }

/* نوار شفافیت هزینه زیر عنوان سبد */
.cart-assurance {
  display: flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-4); margin-bottom: var(--s-5);
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: var(--fs-small); color: var(--text-soft);
}
.cart-assurance .material-symbols-outlined { font-size: 20px; color: var(--success); }

/* خلاصهٔ سبد — sticky با top صحیح (nav-height + gutter) */
.cart-summary { position: sticky; top: calc(var(--nav-height) + var(--s-2)); }
.cart-trust {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2);
  margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--border);
}
.cart-trust span { display: flex; flex-direction: column; align-items: center; gap: 2px;
                   font-size: var(--fs-caption); color: var(--muted); text-align: center; }
.cart-trust .material-symbols-outlined { font-size: 22px; color: var(--accent); }

/* موبایل: ردیف سبد به دو ستون فشرده */
@media (max-width: 768px) {
  .cart-row {
    grid-template-areas: "img body body" "qty remove line";
    grid-template-columns: 80px 1fr auto;
    gap: var(--s-3) var(--s-2);
  }
  .cart-row__img { width: 80px; height: 80px; }
  .cart-summary { position: static; }
}


/* ----------------------------- ۱۱) فرم‌ها -----------------------------
 * سیستم فرم استاندارد: همهٔ ورودی‌ها از min-height مشترک (۴۸px) و حلقهٔ
 * focus توکن‌شده می‌خوانند. فیلد__error با role=alert اعلام می‌شود (PHP).
 */
.form { display: grid; gap: var(--s-4); max-width: min(100%, var(--shafa-form-width)); }
.form--wide { max-width: min(100%, var(--shafa-form-width-wide)); }
.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field label { font-size: var(--fs-small); font-weight: 500; color: var(--text); }
.field label .req { color: var(--accent); }
.field input, .field textarea, .field select {
  min-height: var(--touch-lg); padding: 10px 14px; font-size: var(--fs-body);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: var(--focus-ring);
}
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field.has-error input:focus, .field.has-error textarea:focus { box-shadow: var(--focus-ring-error); }
.field__error { color: var(--danger); font-size: var(--fs-small); min-height: 1.2em; font-weight: 500; }
.field__hint { color: var(--muted); font-size: var(--fs-small); }

/* فیلد «لیبل متحرک» (floating label) — بازتولید حس کامپوننت React با CSS+JS خام.
   نشانه‌گذاری: <div class="field field--float"><label>…</label><input data-field-float></div>
   کلاس .field--float--raised توسط field-float.js در focus/تایپ اضافه می‌شود. */
.field--float { position: relative; }
.field--float > label {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  pointer-events: none; font-size: var(--fs-body); font-weight: 500;
  color: var(--muted); background: transparent; padding: 0 4px;
  transform-origin: right center;
  transition: top var(--t-base) var(--ease), transform var(--t-base) var(--ease),
              font-size var(--t-base) var(--ease), color var(--t-fast) var(--ease);
  max-width: calc(100% - 28px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* حالت پایین‌آمدن لیبل (صف اول، قبل از فوکوس) → روی متن placeholder می‌نشیند */
.field--float > input,
.field--float > textarea { padding-top: 6px; }
/* حالت بالارفتی: هنگام فوکوس یا داشتن مقدار، لیبل به بالا و کوچک می‌رود */
.field--float--raised > label,
.field--float > input:focus + label,
.field--float > textarea:focus + label {
  top: 0; transform: translateY(-50%) scale(.82);
  font-size: var(--fs-small); color: var(--accent);
  background: linear-gradient(var(--shafa-field-mask-bg), var(--shafa-field-mask-bg));
}
/* برای RTL، لیبل از راست؛ متنplaceholder وقتی لیبل پایین است مخفی شود */
.field--float:not(.field--float--raised) > input::placeholder,
.field--float:not(.field--float--raised) > textarea::placeholder { color: transparent; }
.field--float--raised > input::placeholder,
.field--float--raised > textarea::placeholder { color: var(--muted); }
/* رنگ خط چسبیده به لیبل‌بالا (زیبا شدن تمرکز) — از توکنِ حلقهٔ focus */
.field--float > input:focus, .field--float > textarea:focus {
  border-color: var(--accent); box-shadow: var(--focus-ring);
}
.field--float.field--error > input:focus,
.field--float.field--error > textarea:focus { box-shadow: var(--focus-ring-error); }
/* اگر error باشد، لیبل بالارفته قرمز */
.field--float.field--error > label { color: var(--danger); }
/* متن چندخطی: لیبل بالای textarea می‌نشیند نه وسط */
.field--float > textarea + label { top: 14px; transform: translateY(0); }
.field--float--raised > textarea + label,
.field--float > textarea:focus + label { top: 0; transform: translateY(-50%) scale(.82); }

/* ====================================================================
 *  بخش‌های اصلی صفحهٔ خانه (بازطراحی) — مینیمال، طبیعی، بدون افکت سنگین
 *  مؤلفه‌ها: trust-strip | process | stats (count-up) | testimonials
 * ==================================================================== */

/* --- trust-strip: نوار نشانه‌های اعتماد زیر hero --- */
.trust-strip { padding-block: var(--s-5); background: var(--surface-alt);
               border-block: 1px solid var(--border); }
.trust-strip__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
.trust-strip__item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.trust-strip__item .material-symbols-outlined { font-size: 32px; color: var(--accent); margin-bottom: var(--s-1); }
.trust-strip__item b { font-size: var(--fs-body); color: var(--text); }
.trust-strip__item span { font-size: var(--fs-small); color: var(--text-soft); }

/* --- process: فرآیند تولید ۴ مرحله‌ای --- */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); counter-reset: step; }
.process-step {
  position: relative; padding: var(--s-5) var(--s-4); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); text-align: center;
  box-shadow: var(--shadow-card); transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.process-step:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.process-step__num {
  position: absolute; top: var(--s-3); left: var(--s-3);
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: var(--fs-caption);
  font-variant-numeric: tabular-nums;
}
.process-step__icon { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto var(--s-3);
                      background: var(--accent-soft); color: var(--accent);
                      display: flex; align-items: center; justify-content: center; }
.process-step__icon .material-symbols-outlined { font-size: 28px; }
.process-step h3 { font-size: var(--fs-body); margin-bottom: var(--s-2); color: var(--text); }
.process-step p { font-size: var(--fs-small); }

/* --- stats: شمارندهٔ متحرک --- */
.stats-section { padding-block: var(--space-section); background: linear-gradient(135deg, var(--accent-soft-bg), var(--surface-alt)); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
.stat-card {
  text-align: center; padding: var(--s-5) var(--s-3);
  background: rgba(var(--white-rgb), .55); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-card); backdrop-filter: blur(4px);
}
.stat-card__icon { font-size: 30px; color: var(--accent-strong); margin-bottom: var(--s-2); }
.stat-card__num { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.4rem);
                  font-weight: 700; color: var(--accent-strong); line-height: 1.2;
                  font-variant-numeric: tabular-nums; }
.stat-card__label { margin-top: var(--s-1); font-size: var(--fs-small); color: var(--text-soft); }

/* --- testimonials — کارت نظرات مشتریان --- */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.testimonial-card {
  display: flex; flex-direction: column; gap: var(--s-3);
  padding: var(--s-5) var(--s-4); margin: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.testimonial-card__rating { display: flex; gap: 2px; }
.testimonial-card__rating .material-symbols-outlined { font-size: 20px; color: var(--border-strong); }
.testimonial-card__rating .material-symbols-outlined.is-on { color: var(--accent-2); }
.testimonial-card__quote { margin: 0; font-size: var(--fs-body); line-height: 1.9; color: var(--text); flex: 1; }
.testimonial-card__author { display: flex; align-items: center; gap: var(--s-2); margin-top: auto; }
.testimonial-card__avatar {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: var(--surface-2);
}
.testimonial-card__avatar--initial {
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-strong);
  font-weight: 700; font-size: 1.25rem;
}
.testimonial-card__author b { display: block; font-size: var(--fs-small); color: var(--text); }
.testimonial-card__role { font-size: var(--fs-caption); }
.testimonial-card__date { font-size: var(--fs-caption); color: var(--muted); }

/* «خریدار تأییدشده» — فقط وقتی verified_order_id وجود دارد نمایش داده می‌شود */
.testimonial-card__verified {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 4px; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent-2) 14%, transparent);
  color: var(--accent-strong);
  font-size: var(--fs-caption); font-weight: 600;
}
.testimonial-card__verified .material-symbols-outlined { font-size: 14px; }

/* پاسخ‌گو: بخش‌های اصلی روی موبایل (گرید ۱-۲ ستونه) */
@media (max-width: 768px) {
  .trust-strip__grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-4) var(--s-3); }
  .process-grid, .stats-grid, .testimonials-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .trust-strip__grid { grid-template-columns: 1fr; }
}

/* سبد خرید روی موبایل: ردیف به‌جای ردیف افقی، عمودی و خوانا */
@media (max-width: 768px) {
  /* دسته‌بندی د\nو‌ستونهٔ cart/main در حاشیه-aside بدون inline style کنتلورر می‌شود */
  .cart-row {
    grid-template-columns: 80px 1fr auto;
    grid-template-areas:
      "img body qty"
      "img line remove";
    gap: var(--s-2) var(--s-3);
  }
  .cart-row__img  { grid-area: img; width: 80px; height: 80px; }
  .cart-row__body { grid-area: body; }
  .cart-row__qty  { grid-area: qty; }
  .cart-row__line { grid-area: line; min-width: 0; text-align: left; }
  .cart-row__remove { grid-area: remove; }
  /* پنل خلاصه روی موبایل sticky نیست — فضای کم */
  .cart-summary { position: static; }
}

/* ----------------------------- خبرنامه (Newsletter) ----------------------------- */
/* بخش شاخص عضویت در index.php */
.nl-hero { display: flex; }
.nl-hero .container { display: flex; justify-content: center; }
.nl-hero__inner {
  display: flex; justify-content: center; align-items: center;
  width: 100%;
}
.nl-hero__panel { width: 100%; max-width: 680px; }
/* کارت واقعی: وسط‌چین + میکرواینتراکشن ملایم هنگام hover */
.nl-hero .panel {
  width: 100%; max-width: 680px;
  margin: 0 auto;
  text-align: center;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 18px rgba(28,25,23,.06), 0 1px 0 rgba(255,255,255,.6) inset;
  transform: translateY(0);
  transition:
    transform var(--t-slow) var(--ease),
    box-shadow var(--t-slow) var(--ease),
    border-color var(--t-base) var(--ease);
  will-change: transform;
}
/* میکرواینتراکشن: وقتی موس روی کارت می‌رود، ملایم بالا می‌آید و هالهٔ عسلی می‌گیرد */
.nl-hero .panel:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow:
    0 18px 40px rgba(var(--accent-strong-rgb), .10),
    0 0 0 3px rgba(var(--accent-rgb), .08),
    0 1px 0 rgba(255,255,255,.7) inset;
}
/* لمس‌ها hover ندارند — فقط کلایس propia کارت ساکن بماند */
@media (hover: none) {
  .nl-hero .panel:hover { transform: none; }
}

.nl-hero__form { display: flex; flex-direction: column; align-items: center; }
.nl-hero__field { width: 100%; }
.nl-hero__hint { opacity: .85; }

/* ستون عضویت در footer */
.nl-footer__form { display: flex; flex-direction: column; gap: var(--s-2); }
.nl-footer__field { width: 100%; }
.nl-footer .field--float > label { right: 12px; }

/* toast موفقیت/خطای عضویت (تقلید cart-toast) */
.nl-toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface); color: var(--text); padding: 12px 20px; border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.18); border: 1px solid var(--border);
  font-size: var(--fs-small); max-width: 90vw; z-index: 1100;
  opacity: 0; pointer-events: none; transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.nl-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.nl-toast--success { border-color: var(--success); }
.nl-toast--error { border-color: var(--danger); }
.nl-toast[data-loading="1"] { opacity: .85; }

/* toast موفقیت/خطای عضویت (cart-toast) — تقلید visual از nl-toast */
.cart-toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface); color: var(--text); padding: 12px 20px; border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.10); border: 1px solid var(--border);
  font-size: var(--fs-small); max-width: 90vw; z-index: 1100;
  opacity: 0; pointer-events: none; transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.cart-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.cart-toast--success { border-color: var(--success); }
.cart-toast--error { border-color: var(--danger); }

/* spinner کوچک روی دکمهٔ افزودن‌به‌سبد حین fetch (cart.js) */
.cart-btn-spinner {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.40); border-top-color: var(--on-accent);
  animation: cart-spin .7s linear infinite; vertical-align: -2px;
}
@keyframes cart-spin { to { transform: rotate(360deg); } }
/* دکمهٔ در حال loading: بدون hover transform (ضد شبیه‌سازی کلیک) */
.btn.is-loading { opacity: .85; pointer-events: none; cursor: progress; }

/* ============================================================================
 *  پنل کشویی «به سبد خرید اضافه شد» (cart-panel.php + cart-panel.js)
 * ============================================================================
 *  چرا کنار فوتر toast: هر دو یک پاسخ به یک کنش واحدند و باید در یک
 *  نقطه از صفحه زندگی کنند. cart-panel یک سطح جداست که با
 *  z-drawer بالاتر از toast (1100) می‌نشیند تا اگر هر دو با هم باز شوند،
 *  پنل روی toast قرار بگیرد نه زیرش.
 *
 *  الگوی پنهان‌سازی عیناً از .drawer در components/nav.css:298-303 کپی
 *  شده — visibility به‌جای display:none، چون با display:none فوکوس و
 *  اعلان صفحه‌خوان از درخت دسترسی حذف می‌شوند و focus-trap کار نمی‌کند.
 *
 *  سمت ورود از inline-start یعنی «راست» در RTL؛ این جهت‌گیری با
 *  inset-inline-start نوشته شده تا در هر دو حالت بدون مداخله درست باشد.
 */
.cart-panel {
  position: fixed; inset: 0;
  z-index: var(--shafa-z-drawer);
  visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity var(--shafa-duration-base) var(--shafa-ease-natural),
              visibility var(--shafa-duration-base);
}
.cart-panel.is-open { visibility: visible; opacity: 1; pointer-events: auto; }

.cart-panel__backdrop {
  position: absolute; inset: 0;
  background: rgba(18, 20, 19, 0.45);
  backdrop-filter: blur(6px);
}

.cart-panel__body {
  position: absolute; top: 0; inset-inline-start: 0;
  height: 100%; width: min(380px, 92vw);
  display: flex; flex-direction: column; gap: var(--shafa-space-lg);
  padding: var(--shafa-space-xl);
  /* فضای امن در لبه‌ها: در آیفون با نوار گِست، بدون این دکمه‌ها زیر
     نوار سیستم می‌روند و هدف لمسی از دسترس خارج می‌شود. */
  padding-block-end: calc(var(--shafa-space-xl) + env(safe-area-inset-bottom, 0px));
  padding-inline-start: calc(var(--shafa-space-xl) + env(safe-area-inset-start, 0px));
  padding-inline-end: calc(var(--shafa-space-xl) + env(safe-area-inset-end, 0px));
  overflow-y: auto;
  background: var(--shafa-surface-card);
  /* لبهٔ inline-start به لبهٔ viewport چسبیده است (inset-inline-start:0) پس
     گردی می‌خواهد؛ لبهٔ inline-end آزاد است و همان‌جا گرد می‌شود. */
  border-inline-end: 1px solid var(--shafa-glass-border);
  border-start-end-radius: var(--shafa-radius-xl);
  border-end-end-radius: var(--shafa-radius-xl);
  box-shadow: var(--shafa-shadow-lg);
  transition: transform var(--shafa-duration-base) var(--shafa-ease-natural);
}
/* حالت بسته: پنل باید بیرون از کادر باشد، در جهتِ مخالفِ لبهٔ چسبیده.
   transform فیزیکی است نه منطقی، پس هر جهت خط جداگانه لازم دارد:
     LTR ⇒ پنل چپ است، بیرون از کادر یعنی چپ  ⇒ translateX(-100%)
     RTL ⇒ پنل راست است، بیرون از کادر یعنی راست ⇒ translateX(+100%)
   یک قاعدهٔ مشترک نوشتن و امید بستن به منطقی‌بودن، در یکی از دو حالت
   پنل را وسط صفحه رها می‌کرد. */
html[dir="ltr"] .cart-panel__body { transform: translateX(-100%); }
html[dir="rtl"] .cart-panel__body { transform: translateX(100%); }
.cart-panel.is-open .cart-panel__body { transform: translateX(0); }

.cart-panel__head { display: flex; align-items: center; justify-content: space-between; gap: var(--shafa-space-md); }
.cart-panel__eyebrow {
  display: flex; align-items: center; gap: var(--shafa-space-sm);
  margin: 0; font-size: var(--shafa-fs-body); font-weight: 700;
  color: var(--shafa-status-success);
}
.cart-panel__tick {
  width: 22px; height: 22px; border-radius: var(--shafa-radius-full);
  flex: 0 0 auto;
  background: var(--shafa-status-success);
  /* تیک سفید: mask داخلی تا نیازی به فایل آیکون تازه نباشد.
     mask-image با SVG داده‌ای، پس هیچ درخواست شبکه‌ای اضافه نمی‌شود. */
  -webkit-mask: center / 14px 14px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  mask: center / 14px 14px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.cart-panel__close {
  display: flex; align-items: center; justify-content: center;
  min-width: var(--shafa-touch); min-height: var(--shafa-touch);
  border: 1px solid var(--shafa-border-subtle);
  border-radius: var(--shafa-radius-md);
  background: transparent; color: var(--shafa-text-secondary);
  transition: background var(--shafa-duration-fast) var(--shafa-ease-natural);
}
.cart-panel__close:hover { background: var(--shafa-gold-subtle); color: var(--shafa-text-primary); }

.cart-panel__item {
  display: flex; gap: var(--shafa-space-md);
  padding: var(--shafa-space-md);
  border: 1px solid var(--shafa-border-subtle);
  border-radius: var(--shafa-radius-lg);
  background: var(--shafa-surface-muted);
}
.cart-panel__thumb {
  width: 80px; height: 80px; flex: 0 0 auto; overflow: hidden;
  border-radius: var(--shafa-radius-md);
  background: var(--shafa-surface-card);
}
.cart-panel__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-panel__info { min-width: 0; }
.cart-panel__title {
  margin: 0 0 var(--shafa-space-xs);
  font-size: var(--shafa-fs-body); font-weight: 600; line-height: 1.5;
  color: var(--shafa-text-primary);
  /* عنوان بلند نباید عرض پنل را بشکند — بدون این یک کلمهٔ ۴۰حرفی
     (مثل نام بسته‌های ترکیبی) پنل را به اسکرول افقی می‌برد. */
  overflow-wrap: anywhere;
}
.cart-panel__meta { margin: 0 0 var(--shafa-space-xs); font-size: var(--shafa-fs-sm); color: var(--shafa-text-secondary); }
.cart-panel__price-row { display: flex; align-items: baseline; gap: var(--shafa-space-sm); margin: 0; }
/* تعداد این قلم کنار قیمتش می‌نشیند تا کاربر بفهمد «۱ عدد ۶۰۰ هزار»
   یعنی یک بطری است نه قیمت واحدِ کل. */
.cart-panel__qty {
  margin: 0; padding: 2px var(--shafa-space-sm);
  border: 1px solid var(--shafa-glass-border); border-radius: var(--shafa-radius-full);
  font-size: var(--shafa-fs-sm); color: var(--shafa-gold-text);
  background: var(--shafa-gold-subtle);
}
.cart-panel__price { margin: 0; font-size: var(--shafa-fs-body); font-weight: 700; color: var(--shafa-gold-text); }

.cart-panel__summary {
  display: flex; align-items: center; gap: var(--shafa-space-sm);
  margin: 0; font-size: var(--shafa-fs-sm); color: var(--shafa-text-secondary);
}
.cart-panel__summary-sep { color: var(--shafa-border-strong); }

.cart-panel__cta { display: flex; flex-direction: column; gap: var(--shafa-space-sm); margin-top: auto; }
.cart-panel__cta .btn { width: 100%; justify-content: center; min-height: var(--shafa-touch); }

/* reduce-motion: انتقال‌ها حذف می‌شوند ولی خود پنل همچنان ظاهر می‌شود.
   حذفِ visibility-transition لازم است وگرنه پنل بعد از بستن فوری
   ناپدید می‌شود و آنیمیشن GSAP روی عنصری اجرا می‌شود که دیگر دیده
   نمی‌شود (به ظاهر انیمیشن کار نمی‌کند). */
@media (prefers-reduced-motion: reduce) {
  .cart-panel,
  .cart-panel__body { transition: none; }
  /* transform باید همان «بیرون از کادر» حالت بسته بماند — صفر کردنش
     پنلِ بسته را وسط صفحه نگه می‌دارد (visibility:hidden جلوی دیده‌شدنش
     را می‌گیرد ولی با باز شدن از وسط پاریک می‌کند). انتقال حذف می‌شود،
     نه موقعیت. */
  .cart-panel__body,
  html[dir="ltr"] .cart-panel__body,
  html[dir="rtl"] .cart-panel__body { transition: none; }
}

/* نوار قدرت پسورد — مبدأ پرشدن از لبهٔ inline-start است (راست در RTL) */
.pw-strength { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.pw-strength__bar { height: 100%; width: 100%; transform: scaleX(0); transform-origin: right center; background: var(--danger); transition: transform var(--t-base) var(--ease), background var(--t-base) var(--ease); }

/* toggle نمایش پسورد */
.pw-wrap { position: relative; }
.pw-toggle { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.pw-toggle svg { width: 20px; height: 20px; }

/* ----------------------------- ۱۳) flash + alert -----------------------------
 * پیام‌های خلاصهٔ وضعیت. flash برای پاس‌نامه‌های PRG بعد از redirect
 * (به‌صورت پشت‌سرهم چندتایی) و alert برای پیام‌های درون‌صفحه‌ای پایدار.
 * هر دو از tint نرم توکن‌شده می‌خوانند (این جا دیگر raw rgba خام نیست).
 */
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: var(--s-3); font-weight: 500; }
    .flash--success { background: var(--success-soft-bg); color: var(--success); border: 1px solid var(--success-soft-border); }
    .flash--error   { background: var(--danger-soft-bg);  color: var(--danger);  border: 1px solid var(--danger-soft-border); }
    .flash--info    { background: var(--accent-soft-bg);  color: var(--accent-strong); border: 1px solid var(--accent-soft-border); }
    .flash--warning { background: rgba(var(--accent-rgb), .14); color: var(--accent); border: 1px solid var(--accent-soft-border); }

    /* C2C Toast — پیام موقت پایین صفحه برای تأیید عملیات */
    .c2c-toast {
      position: fixed;
      bottom: 80px;
      left: 50%;
      transform: translateX(-50%) translateY(20px);
      background: var(--surface);
      color: var(--text);
      padding: 12px 20px;
      border-radius: var(--radius);
      box-shadow: 0 8px 32px rgba(0,0,0,.18);
      border: 1px solid var(--border);
      font-size: var(--fs-small);
      max-width: 90vw;
      z-index: 1100;
      opacity: 0;
      pointer-events: none;
      transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
      display: flex;
      align-items: center;
      gap: var(--s-2);
      direction: rtl;
    }
    .c2c-toast.is-visible {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }
    .c2c-toast--success { border-color: var(--success-soft-border); color: var(--success); }
    .c2c-toast--error   { border-color: var(--danger-soft-border);  color: var(--danger); }
    .c2c-toast--warning { border-color: var(--accent-soft-border);  color: var(--accent); }
    .c2c-toast i { font-size: 20px; }
    .flash--warning { background: rgba(var(--accent-rgb), .14); color: var(--accent); border: 1px solid var(--accent-soft-border); }

/* alert — کامپوننت استاندارد ACK/inline. آیکون + متن + دکمهٔ بستن اختیاری.
 * نشانه‌گذاری: <div class="alert alert--success" role="status">…</div>
 * وARIANTها:  --success | --error | --info | --warn  (برابر با تگ‌ها)
 */
.alert {
  display: flex; align-items: flex-start; gap: var(--s-2);
  padding: var(--s-3) var(--s-4); border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  font-size: var(--fs-small); line-height: var(--lh-base); color: var(--text-soft);
}
.alert .material-symbols-outlined { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.alert__body { flex: 1; }
.alert__title { font-weight: 700; color: var(--text); margin-bottom: 2px; }
.alert--success { background: var(--success-soft-bg); border-color: var(--success-soft-border); }
.alert--success .material-symbols-outlined, .alert--success .alert__title { color: var(--success); }
.alert--error   { background: var(--danger-soft-bg);  border-color: var(--danger-soft-border); }
.alert--error .material-symbols-outlined, .alert--error .alert__title { color: var(--danger); }
.alert--info    { background: var(--accent-soft-bg);  border-color: var(--accent-soft-border); }
.alert--info .material-symbols-outlined, .alert--info .alert__title { color: var(--accent-strong); }
.alert--warn    { background: rgba(var(--accent-rgb), .14); border-color: var(--accent-soft-border); }
.alert--warn .material-symbols-outlined, .alert--warn .alert__title { color: var(--accent); }


/* ----------------------------- ۱۴) گالری پوشه‌ای ----------------------------- */
.folder-gallery {
  position: relative; width: 100%; min-height: 540px;
  display: flex; align-items: center; justify-content: center;
  perspective: 1200px;
}
.folder-stage { position: relative; width: 100%; max-width: 420px; height: 520px; display: flex; justify-content: center; }
/* کارت پوشه‌ی پایه */
.folder-card {
  position: absolute; bottom: 40px; width: 340px; height: 180px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 -20px 40px rgba(94,60,20,.18);
  transform-origin: bottom center;
  cursor: pointer; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 24px;
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}
.folder-card__tag {
  padding: 8px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: var(--fs-small); font-weight: 500;
  font-family: 'Inter', sans-serif; letter-spacing: var(--shafa-tracking-normal); color: var(--accent-strong);
}
/* عکس‌های روی‌هم‌گذاشته/پخش‌شده */
.gallery-photo {
  position: absolute; bottom: 0; width: 224px; height: 288px; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(94,60,20,.16);
  transform-origin: bottom center;
  transition: transform var(--t-slow) var(--ease), box-shadow var(--t-slow) var(--ease);
  background: var(--surface-2);
}
.gallery-photo img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.gallery-photo.is-grab { cursor: grab; }
.gallery-photo.is-grabbing { cursor: grabbing; }
.gallery-hint {
  position: absolute; bottom: 16px; padding: 10px 20px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--accent-strong);
  font-size: var(--fs-small); font-family: 'Inter', sans-serif; letter-spacing: var(--shafa-tracking-normal); text-transform: uppercase;
  opacity: 0; transform: translateY(40px); transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease); pointer-events: none;
  box-shadow: var(--shadow);
}
.folder-gallery.is-open .gallery-hint { opacity: 1; transform: translateY(0); }

/* ----------------------------- ۱۵) ادمین ----------------------------- */
.admin-login { max-width: 24rem; margin: var(--s-8) auto; padding: var(--s-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.admin-layout { display: flex; min-height: 100dvh; }
.admin-sidebar { width: 240px; background: var(--surface); border-left: 1px solid var(--border); padding: var(--s-4); flex-shrink: 0; }
.admin-sidebar a { display: flex; align-items: center; gap: .6rem; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text); font-weight: 500; margin-bottom: 4px; }
.admin-sidebar a:hover, .admin-sidebar a.is-active { background: var(--surface-2); color: var(--accent); }
.admin-sidebar svg { width: 20px; height: 20px; }
.admin-main { flex: 1; padding: var(--s-5); overflow-x: auto; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-5); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-4); margin-bottom: var(--s-5); }
.panel h2 { margin-bottom: var(--s-4); }
.panel-surface-top { border-top: 3px solid var(--accent); }
.panel__bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-4); gap: var(--s-3); flex-wrap: wrap; }

/* Guide box */
.guide {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-4);
  margin: var(--s-4) 0;
}
.guide__title {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: 500;
  font-size: var(--fs-small);
  margin-bottom: var(--s-3);
}
.guide__title .material-symbols-outlined {
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
}
.guide h3 { margin-bottom: var(--s-3); }
.guide ol { margin-right: var(--s-4); }
.guide li { margin-bottom: var(--s-1); }

/* Track page — panels & sections */
.panel__title {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--s-4);
}
.panel__title .material-symbols-outlined {
  font-size: 24px;
  color: var(--accent);
}
.assurance {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  background: var(--success-soft-bg);
  border: 1px solid var(--success-soft-border);
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  color: var(--text-soft);
  margin-block: var(--s-4);
}
.assurance .material-symbols-outlined {
  font-size: 20px;
  color: var(--success);
  flex-shrink: 0;
}
.track-section__header {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 1.125rem;
  font-weight: 500;
  margin: var(--s-4) 0 var(--s-3);
}
.track-section__header .material-symbols-outlined {
  font-size: 20px;
  color: var(--accent-strong);
  flex-shrink: 0;
}
.track-cta {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-top: var(--s-5);
}
.track-cta .btn { width: 100%; }
@media (min-width: 640px) {
  .track-cta { flex-direction: row; gap: var(--s-3); }
  .track-cta .btn { width: auto; flex: 1; }
}
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { padding: 12px; text-align: right; border-bottom: 1px solid var(--border); font-size: var(--fs-small); }
table.data th { color: var(--muted); font-weight: 500; white-space: nowrap; }
table.data td { font-variant-numeric: tabular-nums; }
table.data tr:hover td { background: var(--surface-2); }
.badge-status { display: inline-block; padding: 2px 10px; border-radius: var(--radius-pill); font-size: var(--fs-caption); font-weight: 500; }
.badge-status.s-pending { background: rgba(var(--accent-rgb), .15); color: var(--accent); border: 1px solid rgba(var(--accent-rgb), .30); }
.badge-status.s-completed { background: var(--success-soft-bg); color: var(--success); border: 1px solid rgba(var(--success-rgb), .30); }
.badge-status.s-cancelled { background: rgba(196,43,28,.15); color: var(--danger); border: 1px solid rgba(196,43,28,.3); }

/* ----------------------------- ۱۶) responsive ----------------------------- */
@media (max-width: 1024px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-premium__grid { gap: var(--s-5); }
  .hero-premium__trust { grid-template-columns: repeat(2, 1fr); gap: var(--s-4) var(--s-3); }
}
@media (max-width: 768px) {
  .container { padding: 0 var(--s-3); }
  /* NOTE: --space-section عمداً اینجا override نمی‌شود. clamp(3rem, 7vw, 6rem)
     کف ۴۸px را برای موبایل خودش تضمین می‌کند؛ override قبلی آن را به ۲۴px
     می‌رساند (افت ۷۵٪) و باعث می‌شد .section با .features-section/.stats-section
     که همین توکن را می‌خوانند ناهماهنگ باشند. */
  /* نوبار موبایل: جستجوی prominent + همبرگر */
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__search--desktop { display: none; }
  .nav__search--mobile { display: flex; }
  .nav__search--drawer { display: none; }
  .nav__cta { display: none; }
  /* --nav-height باید روی :root باشد نه روی .nav — مصرف‌کننده‌هایی مثل
     .cart-summary / html scroll-padding جزو درخت .nav نیستند و اگر تعریف
     روی خود .nav باشد در موبایل ۷۲px می‌بینند نه ۵۶px. */
  :root { --nav-height: 56px; }
  .nav { height: auto; min-height: 56px; }
  .nav__actions { gap: var(--s-2); }
  .hero__inner { grid-template-columns: 1fr; gap: var(--s-5); }
  .hero__art { order: -1; max-width: 60%; margin-inline: auto; }
  .values { grid-template-columns: 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  /* پنل‌های sticky در موبایل غیرفعال (nav ۵۶px است؛ فاصله ۸۰px ناهماهنگ) */
  .panel[style*="position:sticky"] { position: static !important; top: auto !important; }
  .admin-sidebar { display: none; }
  .admin-main { padding: var(--s-3); }
  /* Hero Premium — Editorial Brand Introduction */
  .hero-premium { padding-block: var(--s-7); }
  .hero-premium__grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "art"
      "content";
    gap: var(--s-5);
  }
  .hero-premium__art { max-width: 100%; margin-inline: auto; }
  .hero-premium__img { aspect-ratio: 4 / 5; border-radius: var(--radius); object-position: var(--hero-focal-mobile, center); }
  .hero-premium__placeholder { aspect-ratio: 4 / 5; }
  .hero-premium__title { font-size: clamp(2rem, 7vw, 2.6rem); line-height: 1.4; max-width: 100%; }
  .hero-premium__sub { max-width: 100%; }
  .hero-premium__trust { grid-template-columns: repeat(2, 1fr); gap: var(--s-4) var(--s-3); padding: var(--s-3); }
  .hero-premium__scroll { display: flex; bottom: var(--s-2); font-size: 0.7rem; opacity: .85; }
  .about-panel { border-radius: var(--radius-lg); padding: var(--s-4); }
  .about-panel__grid { grid-template-columns: 1fr; }
  .about-panel__badge { position: static; margin-top: var(--s-3); display: inline-block; }
  .features-grid { grid-template-columns: 1fr; }
  .best-seller { padding-block: var(--s-6); }
  .best-seller__circle-img { width: 200px; height: 200px; }
  /* پنل ادمین: جداول به کارت */
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr { background: var(--surface-2); border-radius: var(--radius-sm); margin-bottom: var(--s-3); padding: var(--s-2); border: 1px solid var(--border); }
  table.data td { border: none; display: flex; justify-content: space-between; gap: var(--s-3); }
  table.data td::before { content: attr(data-th); color: var(--muted); font-weight: 500; }
}
@media (max-width: 480px) {
  .btn--primary.w-full-mobile { width: 100%; }
  .hero-premium__trust { grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
}

/* ----------------------------- ۱۶.۵) صفحهٔ محصول: سبد + خرید سریع + نوار اعتماد ----- */
/* دو دکمهٔ شاخص کنار هم: «افزودن به سبد» (primary، با qty) + «خرید سریع» (نئونی،
   qty=1 + هدایت مستقیم به checkout). باعث کاهش اصطکاک در مسیر تبدیل می‌شود. */
.product-buy {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  margin-top: var(--s-5); align-items: stretch;
}
.product-buy__add { flex: 1 1 280px; min-width: 0; max-width: none;
  grid-template-columns: auto 1fr; gap: var(--s-3); align-items: center; }
.product-buy__add .qty-control { grid-column: auto; }
.product-buy__fast { flex: 0 0 auto; }
.product-buy__fast .btn { width: 100%; height: 100%; white-space: nowrap; }
/* موبایل: دکمه‌ها روی هم و تمام‌عرض → لمس راحت‌تر */
@media (max-width: 560px) {
  .product-buy { flex-direction: column; }
  .product-buy__add, .product-buy__fast { flex: none; width: 100%; }
  .product-buy__add { grid-template-columns: auto 1fr; }
  .product-buy__fast .btn { width: 100%; }
}
/* نوار اعتماد زیر دکمه‌های خرید — هدایهٔ روان‌شناختی فوری پیش از تصمیم نهایی */
.product-trust {
  list-style: none; margin: var(--s-4) 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5);
}
.product-trust li {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-small); color: var(--text-soft);
}
.product-trust .material-symbols-outlined { font-size: 20px; color: var(--accent); }

/* ----------------------------- ۱۷) reduced-motion ----------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .scroll-reveal { opacity: 1 !important; transform: none !important; }
  .nl-hero .panel:hover { transform: none !important; }
  [data-motion-interactions] .btn::after { display: none !important; }
}

.products-skeleton {
  display: none;
  position: absolute;
  inset: 0;
  background: var(--surface);
  z-index: 2;
  padding: var(--s-4);
}
.products-skeleton.is-loading {
  display: block;
}
.products-skeleton__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}
@media (max-width: 768px) {
  .products-skeleton__inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Skeleton Loading System */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
.skeleton--text { height: 1em; margin-bottom: var(--s-2); }
.skeleton--title { height: 1.5em; width: 60%; margin-bottom: var(--s-3); }
.skeleton--card { height: 200px; border-radius: var(--radius); }
.skeleton--circle { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
[data-gsap-init] .skeleton {
  animation: none;
  background: var(--surface-2);
}

/* Disable GSAP motion classes when JS is active */
[data-gsap-init] .scroll-reveal {
  transition: none !important;
}

/* موس در دسترس نیست (موبایل) */
@media (pointer: coarse) {
  .product-card:hover { transform: none; }
}

/* =====================================================================
   ===== سیستم تجربهٔ محصول بازطراحی‌شده (مرحلهٔ ۵) =====
   - کارت: خلاصهٔ کوتاه، نوع، وضعیت موجودی، lab badge، قیمت قبلی، لینک مشاهده، compare
   - PDP: گالری چندتصویری، price-row، روش مصرف/نگهداری، compare، اخیراً دیده‌شده
   - جدول مقایسه + badge nav مقایسه
   ===================================================================== */

/* --- badge مقایسه در navbar (مشابه cart-badge) --- */
.nav__compare { display: inline-flex; align-items: center; justify-content: center; position: relative; }
.nav__compare .material-symbols-outlined { font-size: 22px; color: var(--text-soft); }
/* نسخهٔ fallback — نسخهٔ زنده در components/nav.css:213 است (که بعد از
   این فایل لود می‌شود). مقادیر رنگ عمداً یکسان‌اند: طلای ساتن با جوهر
   --shafa-on-gold (#111412) → ۷.۵۵:۱. نسخهٔ قبلی (#fff روی --accent-strong)
   فقط ۳.۰۸:۱ بود و برای متن ۱۱ پیکسلی زیر حد AA می‌افتاد. */
.compare-badge {
  position: absolute; top: -6px; left: -6px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: var(--radius-pill);
  background: var(--shafa-gold-satin); color: var(--shafa-on-gold);
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.compare-badge[hidden] { display: none; }

/* --- کارت محصول: فیلدهای جدید --- */
/* __cat، __summary، __price-wrap، __price-old، __stock*، __activity،
   __actions، __view و __compare همگی حذف شدند — تعریف یکتا و کاملشان در
   components/cards.css است. دو نسخه با مقادیر متفاوت (مثلاً --muted در
   برابر --shafa-text-tertiary، و rgba(186,26,26) در برابر #B91C1C) همیشه
ناهماهنگ می‌ماندند. */

/* قاعدهٔ .season-countdown هم در فاز ۲۹ حذف شد: بنر سراسری رفت و شمارنده
   per-product شد (product-card__harvest در components/cards.css). */

/* --- PDP: گالری چندتصویری ---
   واحدِ تعریف. پیش‌تر همین بلوک دو بار در همین فایل تکرار شده بود (خط ۲۲۱۴ و
   خط ۲۳۲۷) و چون هر دو در سطحTop-level بودند، دومی برنده می‌شد و مقادیر
   یکتای اولی (flex: 0 0 80px، overflow-x: auto، padding-bottom) همچنان از
   اولی اعمال می‌شد — یعنی نتیجهٔ واقعی، ترکیبی از هر دو بلوک بود، نه یکی.
   اینجا همان نتیجهٔ مؤثر در یک بلوک جمع شده است:
     • scroll افقی + بندانگشتیِ ثابت  → از بلوک اول
     • flex-wrap + پس‌زمینهٔ کارت + --t-fast + سایهٔ rgba → از بلوک دوم (برنده)
   حذف کورِ یکی از دو، ظاهر گالری را عوض می‌کرد؛ برای همین ادغام شد نه حذف. */
.gallery-thumbs {
  display: flex; gap: var(--s-2); margin-top: var(--s-3);
  flex-wrap: wrap; overflow-x: auto; padding-bottom: 4px;
}
.gallery-thumb {
  flex: 0 0 80px; width: 80px; height: 80px; padding: 0;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer; overflow: hidden;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { transform: translateY(-2px); }
.gallery-thumb.is-active { border-color: var(--accent-strong); box-shadow: 0 0 0 3px rgba(141, 75, 0, .15); }
/* focus: --accent (#C5A059) فقط ۲٫۴۶:۱ روی کارت دارد و زیر حد ۳:۱ است.
   --shafa-gold-text در هر دو تم معتبر است: ۵٫۳۶:۱ روشن، ۶٫۰۲:۱ تاریک. */
.gallery-thumb:focus-visible { outline: 2px solid var(--shafa-gold-text); outline-offset: 2px; box-shadow: var(--focus-ring); }

/* --- PDP: price-row + summary --- */
.product-detail__price-row {
  display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap;
  margin-top: var(--s-2); padding-block: var(--s-2);
  border-bottom: 1px solid var(--border);
}
.product-detail__price-old {
  font-size: 1.1rem; color: var(--muted); text-decoration: line-through;
  text-decoration-color: var(--danger); font-variant-numeric: tabular-nums;
}
.product-detail__summary { color: var(--text-soft); font-size: var(--fs-body); line-height: 1.8; margin-block: var(--s-3); }

/* --- PDP: روش مصرف + نگهداری --- */
.product-detail__usage { display: grid; gap: var(--s-3); margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--border); }
.product-detail__usage-item { display: flex; gap: var(--s-3); align-items: flex-start; }
.product-detail__usage-item > .material-symbols-outlined { color: var(--accent); font-size: 28px; flex-shrink: 0; }
.product-detail__usage-item h4 { font-size: var(--fs-body); font-weight: 700; color: var(--text); margin-bottom: 4px; }
.product-detail__usage-item p { font-size: var(--fs-small); line-height: 1.7; margin: 0; }

/* --- PDP: FAQ (بهینه‌سازی GEO) --- */
.product-faq { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--border); }
.product-faq .section-head__title { font-size: 1.15rem; margin-bottom: var(--s-3); }
.product-faq__list { display: grid; gap: var(--s-2); }
.product-faq__item {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  overflow: hidden;
}
.product-faq__q {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
  padding: var(--s-3) var(--s-3); cursor: pointer; font-weight: 700; color: var(--text);
  list-style: none;
}
.product-faq__q::-webkit-details-marker { display: none; }
.product-faq__q .product-faq__icon {
  color: var(--accent-strong); font-size: 22px; transition: transform .2s ease; flex-shrink: 0;
}
.product-faq__item[open] .product-faq__q .product-faq__icon { transform: rotate(180deg); }
.product-faq__a { padding: 0 var(--s-3) var(--s-3); color: var(--text-soft); font-size: var(--fs-small); line-height: 1.9; }
.product-faq__a p { margin: 0; }

/* --- PDP: Product Reviews (E-E-A-T + Rich Results) --- */
.product-reviews__summary { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-2); flex-wrap: wrap; }
.product-reviews__stars .material-symbols-outlined { font-size: 22px; color: var(--border-strong); }
.product-reviews__stars .material-symbols-outlined.is-on { color: var(--accent-2); }
.product-reviews__count { font-size: var(--fs-small); color: var(--muted); }
.product-reviews__list { display: grid; gap: var(--s-3); margin-top: var(--s-4); }
.product-review {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s-3) var(--s-4);
}
.product-review__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-bottom: 6px; }
.product-review__author { font-weight: 700; color: var(--text); }
.product-review__stars .material-symbols-outlined { font-size: 18px; color: var(--border-strong); }
.product-review__stars .material-symbols-outlined.is-on { color: var(--accent-2); }
.product-review__title { font-size: var(--fs-body); margin: 0 0 4px; color: var(--text); }
.product-review__body { font-size: var(--fs-small); line-height: 1.8; color: var(--text-soft); margin: 0 0 6px; }
.product-review__date { font-size: 0.75rem; color: var(--muted); font-weight: 500; }
.product-review-form {
  margin-top: var(--s-5); padding: var(--s-4); background: var(--surface-alt);
  border: 1px solid var(--border); border-radius: var(--radius); display: grid; gap: var(--s-3);
}
.product-review-form__title { font-size: 1.05rem; margin: 0; }
.product-review-form__row { display: grid; gap: 6px; }
.product-review-form__row label { font-size: var(--fs-small); color: var(--text-soft); }
.product-review-form__row input,
.product-review-form__row textarea,
.product-review-form__row select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit;
}
.product-review-form__note { font-size: 0.8rem; margin: 0; }

/* ── Compare checkbox: 44×44px touch target (WCAG 2.5.5), visual 20px via scale() ── */
.product-detail__compare input[type="checkbox"] {
  appearance: none; width: 44px; height: 44px; margin: 0;
  border: 2px solid var(--border-strong); border-radius: 5px;
  background: var(--surface); cursor: pointer; position: relative; flex-shrink: 0;
  transform: scale(0.45); transform-origin: center;
}
.product-detail__compare input[type="checkbox"]:checked {
  background: var(--accent-strong); border-color: var(--accent-strong);
}
.product-detail__compare input[type="checkbox"]:checked::after {
  content: '✓'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(2.2);
  color: #fff; font-size: 14px; font-weight: 700;
}
/* outline با offset 2px بیرون از چک‌باکس و روی پس‌زمینهٔ صفحه کشیده می‌شود،
   پس حتی وقتی :checked است (پس‌زمینهٔ طلایی) سنجش روی سطح روشن انجام می‌شود:
   ۵٫۳۶:۱. رنگ قبلی --accent (#C5A059) فقط ۲٫۴۶:۱ بود. */
.product-detail__compare input[type="checkbox"]:focus-visible { outline: 2px solid var(--shafa-gold-text); outline-offset: 2px; box-shadow: var(--focus-ring); }

/* --- PDP: بخش گزارش‌های آزمایش (لیست قابل دانلود) --- */
.lab-card__reports { list-style: none; padding: 0; margin-top: var(--s-3); display: grid; gap: var(--s-2); }
.lab-card__reports li {
  display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap;
  padding: var(--s-2); background: var(--surface-2); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.lab-card__reports .material-symbols-outlined { color: var(--accent-strong); font-size: 24px; }
.lab-card__rep-title { font-weight: 500; color: var(--text); flex: 1; }
.lab-card__rep-lab { font-size: var(--fs-small); color: var(--muted); }

/* بلوک تکراریِ گالری حذف شد — واحد تعریف در خط ۲۲۱۴ است. */

/* --- PDP: ردیف قیمت + موجودی --- */
.product-detail__price-row { display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-2); margin-bottom: var(--s-2); }
.product-detail__price-old { font-size: 1.15rem; color: var(--muted); text-decoration: line-through; text-decoration-color: var(--danger); }
.product-detail__summary { color: var(--text-soft); font-size: 1.05rem; line-height: 1.8; margin-bottom: var(--s-4); }

/* --- PDP: روش مصرف + نگهداری --- */
.product-detail__usage { display: grid; gap: var(--s-3); margin: var(--s-4) 0; }
.product-detail__usage-item { display: flex; gap: var(--s-2); align-items: flex-start; background: var(--surface-alt); padding: var(--s-3); border-radius: var(--radius); border: 1px solid var(--border); }
.product-detail__usage-item > .material-symbols-outlined { color: var(--accent-strong); font-size: 28px; flex-shrink: 0; }
.product-detail__usage-item h4 { font-size: var(--fs-body); margin: 0 0 4px; color: var(--text); }
.product-detail__usage-item p { margin: 0; font-size: var(--fs-small); line-height: 1.7; }

/* ── Compare checkbox (duplicate removed — consolidated with above definition) ──
   نکته: قبلاً دو تعریف یکسان برای این selector در style.css وجود داشت که
   cssnano را گیج می‌کرد و باعث می‌شد فقط border-radius باقی بماند.
   همهٔ ویژگی‌ها در تعریف اول (خط ۲۲۹۷) کامل هستند. */

/* ── نوار چسبان خرید موبایل ─────────────────────────────── */
.sticky-atc {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 90;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2);
    padding: var(--s-2) var(--s-3);
    padding-bottom: calc(var(--s-2) + env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(110%);
    transition: transform 0.25s ease;
}

.sticky-atc.is-visible {
    transform: translateY(0);
}

.sticky-atc__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sticky-atc__name {
    font-size: var(--fs-small);
    color: var(--text-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-atc__price {
    font-weight: 700;
    color: var(--text);
}

.sticky-atc__btn {
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .sticky-atc {
        display: flex;
    }
    body:has(.sticky-atc) footer {
        padding-bottom: 96px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sticky-atc {
        transition: none;
    }
}

/* --- بخش آزمایش: لیست گزارش‌های قابل دانلود --- */
.lab-card__reports { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: grid; gap: var(--s-2); }
.lab-card__reports li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); background: var(--surface-alt); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.lab-card__reports .material-symbols-outlined { color: var(--accent-strong); font-size: 22px; }
.lab-card__rep-title { font-weight: 500; color: var(--text); }
.lab-card__rep-lab { font-size: var(--fs-small); color: var(--muted); grid-column: 2; }

/* --- صفحهٔ مقایسه --- */
.compare-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-3); }
.compare-toolbar__count { color: var(--text-soft); font-weight: 500; }
.compare-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.compare-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.compare-table th, .compare-table td { padding: var(--s-3); text-align: right; border-bottom: 1px solid var(--border); vertical-align: middle; }
.compare-table thead th { position: sticky; top: 0; background: var(--surface-alt); z-index: 1; }
.compare-table__label-col { width: 140px; font-weight: 500; color: var(--text-soft); background: var(--surface-alt); }
.compare-table__prod-head { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); text-decoration: none; color: var(--text); }
.compare-table__prod-head img { border-radius: var(--radius-sm); border: 1px solid var(--border); }
.compare-table__prod-head span { font-weight: 500; }
.compare-table th { position: relative; }
.compare-table__remove { position: absolute; top: 10px; left: 10px; background: transparent; border: none; cursor: pointer; padding: 4px; border-radius: var(--radius-pill); color: var(--text-soft); }
.compare-table__remove:hover { background: var(--surface-2); color: var(--danger); }
.compare-table tbody tr:hover { background: var(--surface-alt); }

/* استایل‌های صفحه‌ی درباره‌ی ما به assets/css/pages/about.css منتقل شد (P1.2) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: var(--s-4);
  top: var(--s-4);
  width: auto;
  height: auto;
  padding: var(--s-3) var(--s-4);
  background: var(--accent);
  color: var(--on-accent);
  z-index: var(--z-skip);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
}

/* =====================================================================
 *  وبلاگ شفا شهد — Blog Styles
 * ===================================================================== */

/* --- Blog Index Grid --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}

/* --- Blog Card --- */
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.blog-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
}
.blog-card__link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.blog-card__img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}
.blog-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms var(--ease);
}
.blog-card:hover .blog-card__img img {
  transform: scale(1.03);
}
.blog-card__body {
  padding: var(--s-4);
}
.blog-card__date {
  font-size: var(--fs-small);
  color: var(--muted);
  display: block;
  margin-bottom: var(--s-1);
}
.blog-card__title {
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 var(--s-2);
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__excerpt {
  font-size: var(--fs-small);
  color: var(--text-soft);
  line-height: 1.7;
  margin: 0 0 var(--s-3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__cta {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--shafa-gold-text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* --- Single Article --- */
.blog-article__header {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}
.blog-article__hero {
  margin-bottom: var(--s-6);
}
.blog-article__hero img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-lg);
}
.blog-article__content {
  max-width: 42rem;
  margin: 0 auto;
  font-size: var(--fs-body);
  line-height: 2;
  color: var(--text);
}
.blog-article__content h2 {
  font-size: var(--fs-h2, 1.45rem);
  font-weight: 700;
  margin-top: var(--s-6, 24px);
  margin-bottom: var(--s-3, 12px);
  color: var(--text);
  padding-right: var(--s-3, 12px);
  border-right: 4px solid var(--shafa-gold-satin, #c5a059);
  line-height: 1.4;
  scroll-margin-top: 5rem;
}
.blog-article__content h3 {
  font-size: var(--fs-h3, 1.2rem);
  font-weight: 700;
  margin-top: var(--s-5, 20px);
  margin-bottom: var(--s-2, 8px);
  color: var(--text);
  line-height: 1.4;
  scroll-margin-top: 5rem;
}
.blog-article__content h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: var(--s-4, 16px);
  margin-bottom: var(--s-2, 8px);
  color: var(--text-soft, #544f49);
}
.blog-article__content p {
  margin-bottom: var(--s-4, 16px);
}
.blog-article__content blockquote {
  border-right: 3px solid var(--accent, #c5a059);
  padding: var(--s-3, 12px) var(--s-4, 16px);
  margin: var(--s-4, 16px) 0;
  font-style: italic;
  color: var(--text-soft, #544f49);
  background: var(--surface-2, rgba(197, 160, 89, 0.05));
  border-radius: 0 var(--shafa-radius-md, 8px) var(--shafa-radius-md, 8px) 0;
}
.blog-article__content ul,
.blog-article__content ol {
  padding-right: var(--s-5, 20px);
  margin-bottom: var(--s-4, 16px);
}
.blog-article__content li {
  margin-bottom: var(--s-2, 8px);
}
.blog-article__content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--shafa-radius-md, 8px);
  margin: var(--s-3, 12px) 0;
  box-shadow: var(--shadow-sm, 0 2px 8px -2px rgba(24, 22, 20, 0.04));
  display: block;
}
.blog-article__content figure,
.blog-article__content .blog-figure {
  margin: var(--s-5, 20px) 0;
  text-align: center;
}
.blog-article__content figure img,
.blog-article__content .blog-figure img {
  margin: 0 auto;
}
.blog-article__content figcaption {
  margin-top: var(--s-2, 8px);
  font-size: var(--fs-small, 0.875rem);
  color: var(--muted, #7d766d);
  text-align: center;
}
.blog-article__content a {
  color: var(--shafa-gold-text, #8a641a);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.blog-article__content a:hover {
  color: var(--shafa-gold-hover, #b38d45);
}
.blog-gallery-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4, 16px);
  padding: var(--s-4, 16px) var(--s-5, 20px);
  margin: var(--s-6, 24px) 0;
  background: linear-gradient(135deg, rgba(197, 160, 89, 0.09) 0%, rgba(22, 43, 33, 0.05) 100%);
  border: 1px solid rgba(197, 160, 89, 0.25);
  border-radius: var(--shafa-radius-lg, 12px);
  box-shadow: var(--shadow-sm, 0 2px 8px -2px rgba(24, 22, 20, 0.04));
}
.blog-gallery-callout__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--shafa-gold-subtle, #f9f4e8);
  color: var(--shafa-gold-text, #8a641a);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.blog-gallery-callout__body {
  flex: 1;
}
.blog-gallery-callout__title {
  display: block;
  font-weight: 700;
  font-size: var(--fs-body, 1rem);
  color: var(--text, #181614);
  margin-bottom: var(--s-1, 4px);
}
.blog-gallery-callout__desc {
  display: block;
  font-size: var(--fs-small, 0.875rem);
  color: var(--text-soft, #544f49);
  line-height: 1.6;
}
.blog-gallery-callout__btn {
  flex-shrink: 0;
  text-decoration: none !important;
  white-space: nowrap;
}
.blog-toc {
  background: var(--surface-2, #f5f1e8);
  border: 1px solid var(--border-subtle, #e8e2d5);
  border-radius: var(--shafa-radius-md, 8px);
  padding: var(--s-4, 16px) var(--s-5, 20px);
  margin: var(--s-5, 20px) 0;
}
.blog-toc__title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--s-2, 8px);
  color: var(--text, #181614);
}
.blog-toc__list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.blog-toc__list li {
  margin-bottom: var(--s-1, 4px);
}
.blog-toc__list a {
  font-size: var(--fs-small, 0.875rem);
  color: var(--text-secondary, #544f49);
  text-decoration: none !important;
  display: inline-block;
}
.blog-toc__list a:hover {
  color: var(--shafa-gold-text, #8a641a);
  text-decoration: underline !important;
}

/* --- Blog Responsive --- */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-article__hero img { max-height: 260px; }
}
@media (max-width: 480px) {
  .blog-article__content { font-size: var(--fs-small); }
}

/* ── نوار اعتماد صفحه محصول ─────────────────────────────── */
.trust-strip {
  list-style: none;
  margin: var(--s-3) 0;
  padding: var(--s-3);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.trust-strip__item {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  min-width: 0;
}
.trust-strip__icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: var(--accent);
  margin-top: 2px;
}
.trust-strip__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--fs-small);
}
.trust-strip__label {
  color: var(--text);
  font-weight: 700;
}
.trust-strip__link {
  color: var(--shafa-gold-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.trust-strip__link:focus-visible {
  /* نوار اعتماد پس‌زمینهٔ var(--surface-alt) (#F5F1E8) دارد؛ طلای متن ۴٫۷۵:۱
     و در تم تاریک ۶٫۷۴:۱. رنگ قبلی --accent (#C5A059) فقط ۲٫۱۸:۱ بود. */
  outline: 2px solid var(--shafa-gold-text);
  box-shadow: var(--focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}
.trust-strip__note {
  color: var(--text-soft);
}
.trust-strip__shipping {
  margin-top: var(--s-2);
  font-size: var(--fs-small);
  color: var(--text-soft);
}
/* ── آیتم مجاز زنبورداری وزارت جهاد کشاورزی (اولویت بالاتر در نوار اعتماد) ── */
.trust-strip__item--license {
  border: 1px solid rgba(197, 160, 89, 0.40);
  background: linear-gradient(135deg, rgba(197, 160, 89, 0.08) 0%, var(--surface-alt) 100%);
}
.trust-strip__icon--license {
  color: var(--shafa-gold-text);
}
.trust-strip__link--license {
  font-weight: 600;
  color: var(--shafa-gold-text);
}
.trust-strip__link--license:hover {
  color: var(--shafa-gold-hover);
}
/* موبایل: ستونی — هر آیتم یک ردیف کامل و لمس‌پذیر */
@media (max-width: 768px) {
  .trust-strip {
    grid-template-columns: 1fr;
    gap: var(--s-2);
  }
}

/* Utility: mb-6 (used in about.php but not previously defined) */
.mb-6 { margin-bottom: var(--s-6); }

/* ── Credentials & Verification ─────────────────────────────── */
.credentials-grid {
  margin-top: var(--s-4);
}
.credential-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-4);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.credential-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,.04);
}
.credential-card__header {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}
.credential-card__icon {
  font-size: 28px;
  color: var(--accent);
  flex: 0 0 auto;
}
.credential-card__title {
  font-size: var(--fs-body);
  font-weight: 500;
  margin: 0;
  color: var(--text);
}
.credential-card__body p {
  line-height: 1.7;
}
.credential-card__expiry {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  color: var(--text-soft);
}
.credential-card__expiry .material-symbols-outlined {
  font-size: 14px;
  color: var(--accent-strong);
}
.credential-specs {
  list-style: none;
  display: grid;
  gap: var(--s-1);
}
.credential-specs li {
  display: grid;
  grid-template-columns: .6fr 1fr;
  gap: var(--s-1);
  font-size: var(--fs-small);
}
.credential-specs .label {
  color: var(--text-soft);
  text-align: right;
}
.credential-specs .num-tabular {
  color: var(--text);
  font-weight: 500;
}
.credentials-verify {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
  margin-top: var(--s-5);
  padding: var(--s-4);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.credentials-verify__step {
  text-align: center;
}
.credentials-verify__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--s-2);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 24px;
}
.credentials-verify__icon img {
  width: 80px;
  height: 80px;
}
.credentials-verify__title {
  font-size: var(--fs-body);
  font-weight: 500;
  margin-bottom: var(--s-1);
  color: var(--text);
}
.credentials-verify p {
  line-height: 1.7;
}
/* موبایل: credentials */
@media (max-width: 768px) {
  .credentials-verify {
    grid-template-columns: 1fr;
    gap: var(--s-3);
  }
  .credential-specs li {
    grid-template-columns: 1fr;
    text-align: right;
  }
  .credential-specs .label {
    text-align: right;
  }

  /* لیست گواهینامه‌های حرفه‌ای */
  .credential-cert-list h3 {
    font-size: var(--fs-h3);
    color: var(--text);
  }
  .credential-cert-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--s-3);
  }
  .credential-cert-item__header {
    display: flex;
    align-items: center;
    gap: var(--s-1);
    margin-bottom: var(--s-2);
  }
  .credential-cert-item__icon {
    font-size: 20px;
    color: var(--accent);
    flex: 0 0 auto;
  }
  .credential-cert-item__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: var(--fs-small);
    color: var(--text-soft);
    margin-bottom: var(--s-2);
  }
  .credential-cert-item__meta b {
    color: var(--text);
  }
  .credential-cert-item__actions {
    display: flex;
    gap: var(--s-1);
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .credentials-grid {
    grid-template-columns: 1fr;
  }
  .credential-cert-item__meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--s-1);
  }
}

/* ============================================================
   Blog & Contact shared components
   ============================================================ */

/* Blog card meta (category + tags) */
.blog-card__cat {
  display: inline-block;
  font-size: var(--fs-small, 12px);
  font-weight: 500;
  color: var(--shafa-gold-text);
  margin-bottom: var(--s-1, 4px);
}
.blog-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1, 4px);
  margin-top: var(--s-2, 8px);
}

/* Blog article wrapper */
.blog-article {
  max-width: 100%;
}

/* Blog article source/footer */
.blog-article__source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2, 8px);
  font-size: var(--fs-small, 12px);
  color: var(--muted);
  margin: var(--s-6, 24px) auto;
  max-width: 42rem;
  padding: var(--s-3, 12px) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.blog-article__source strong {
  color: var(--text);
  margin-left: var(--s-1, 4px);
}
.blog-article__source .source-url {
  color: var(--shafa-gold-text);
  text-decoration: none;
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  direction: ltr;
  unicode-bidi: isolate;
}
.blog-article__source .source-url:hover {
  text-decoration: underline;
}
.blog-article__footer {
  max-width: 42rem;
  margin: var(--s-6, 24px) auto;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1, 4px);
  flex-wrap: wrap;
  margin-top: var(--s-6, 24px);
  padding: 0;
  list-style: none;
}
.pagination .btn--sm {
  min-width: 2.25rem;
  padding: 0.4rem 0.75rem;
  font-variant-numeric: tabular-nums;
}
.pagination .btn.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  cursor: default;
  pointer-events: none;
}
.pagination .pagination__sep {
  color: var(--muted);
  padding: 0 var(--s-1, 4px);
  user-select: none;
}
.pagination .pagination__nav[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

/* Eyebrow link (small inline link with icon) */
.eyebrow-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-small, 12px);
  font-weight: 500;
  color: var(--shafa-gold-text);
  text-decoration: none;
  transition: color 0.15s ease;
}
.eyebrow-link:hover {
  color: var(--shafa-gold-text);
}
.eyebrow-link[dir="ltr"] {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Flex helpers for blog meta */
.flex-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s-2, 8px);
  font-size: var(--fs-small, 12px);
  color: var(--muted);
  margin-top: var(--s-2, 8px);
}
.flex-between-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-3, 12px);
}

/* Section padding utilities */
.section-padding-md {
  padding-top: var(--s-6, 24px);
  padding-bottom: var(--s-5, 20px);
}
.container--centered {
  max-width: 42rem;
  margin-inline: auto;
}
.section-padding-lg {
  padding-top: var(--s-8, 48px);
  padding-bottom: var(--s-7, 36px);
}

/* Divider top utility */
.divider-top {
  border-top: 1px solid var(--border);
  padding-top: var(--s-4, 16px);
}

/* Blog filter bar */
/* Blog filter bar */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2, 8px);
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--s-5, 20px);
  max-width: 48rem;
}
.blog-filters__search {
  flex: 1 1 240px;
  min-width: 200px;
  max-width: 320px;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font: inherit;
  direction: rtl;
}
.blog-filters__search:focus {
  /* :focus است نه :focus-visible (جست‌وجوی متنی با ماوس هم فوکوس می‌گیرد و
     outline لازم دارد). outline با offset 2px بیرون از فیلد و روی پس‌زمینهٔ
     بخش است: ۵٫۰۶:۱. رنگ قبلی --accent (#C5A059) فقط ۲٫۳۲:۱ بود. */
  outline: 2px solid var(--shafa-gold-text);
  outline-offset: 2px;
  border-color: var(--shafa-gold-text);
}
.blog-filters__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.4rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--fs-small, 12px);
  color: var(--text);
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
.blog-filters__chip:hover {
  border-color: var(--shafa-gold-text);
  color: var(--shafa-gold-text);
}
.blog-filters__chip.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.blog-empty {
  text-align: center;
  padding: var(--s-6, 24px);
}

/* Share links (blog post footer) */
.share-links {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2, 8px);
}
.share-links__label {
  font-size: var(--fs-small, 12px);
  color: var(--muted);
  margin-left: var(--s-1, 4px);
}
.share-links .btn--sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
}
.share-links__copy[data-copied="true"] {
  background: var(--success);
  color: var(--on-strong);
  border-color: var(--success);
}

/* Responsive */
@media (max-width: 768px) {
  .pagination {
    gap: 4px;
  }
  .pagination .btn--sm {
    min-width: 2rem;
    padding: 0.35rem 0.5rem;
    font-size: var(--fs-small, 12px);
  }
  .blog-article__source {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-1, 4px);
  }
  .blog-article__source .source-url {
    max-width: 100%;
  }
  .flex-between-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  .share-links {
    justify-content: center;
  }
}

/* Utility classes (shared across pages) */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-soft { color: var(--text-soft); }
.mt-3 { margin-top: var(--s-3, 12px); }
.mt-4 { margin-top: var(--s-4, 16px); }
.mb-3 { margin-bottom: var(--s-3, 12px); }
.mb-4 { margin-bottom: var(--s-4, 16px); }
.lh-1-3 { line-height: 1.3; }
.lh-1-5 { line-height: 1.5; }
.lh-1-7 { line-height: 1.7; }
.lh-1-9 { line-height: 1.9; }
.icon-ml-6 { margin-left: var(--s-1, 4px); }
.icon-16 { font-size: 16px; }
.icon-18 { font-size: 18px; }
.link-accent-underline { color: var(--accent); text-decoration: underline; }
.link-accent-underline:hover { color: var(--accent-strong); }

/* ============================================================
   Footer components
   ============================================================ */

/* Back to top button
   توجه: footer.css همین کلاس را دوباره تعریف می‌کند و چون بعد از این
   فایل بارگذاری می‌شود، قاعدهٔ موبایلِ پایین‌تر (80px) بی‌اثر بود.
   منبع واحدِ positioning در footer.css است؛ اینجا فقط baseline است. */
.back-to-top {
  position: fixed;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  inset-inline-start: 1.5rem;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    background 0.2s var(--ease, ease),
    opacity 0.2s var(--ease, ease),
    outline 0.2s var(--ease, ease),
    outline-offset 0.2s var(--ease, ease),
    transform 0.2s var(--ease, ease),
    visibility 0.2s var(--ease, ease);
  z-index: 100;
  border: 0;
  cursor: pointer;
  box-shadow: var(--shadow, 0 4px 12px rgba(0,0,0,0.15));
}
/* حالت نمایان‌شدن دکمهٔ «بازگشت به بالا» در components/footer.css
   (کلاس is-visible — هم‌نام با کلاسی که main.js و footer.php تعریف می‌کنند). */
.back-to-top:hover {
  transform: scale(1.1);
  background: var(--accent-strong);
}
/* این دکمه پس‌زمینهٔ طلایی دارد، پس outline سفید فقط ۲٫۴۶:۱ بود و زیر حد
   ۳:۱. outline تیره (--shafa-focus-halo-light) روی طلا ۷٫۵۳:۱ می‌دهد —
   همان منطقی که buttons.css:52 برای .btn--gold دارد. */
.back-to-top:focus {
  outline: 2px solid var(--shafa-focus-halo);
  outline-offset: 3px;
}
@media (max-width: 768px) {
  .back-to-top {
    inset-inline-start: 1rem;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
}

/* Prose — برای صفحات قانونی و متنی */
.prose {
  max-width: 40rem;
  margin: 0 auto;
  font-size: var(--fs-body, 1rem);
  line-height: 1.8;
  color: var(--text);
}
.prose h1,
.prose h2 {
  margin: var(--s-6, 24px) 0 var(--s-3, 12px);
  color: var(--text);
}
.prose h2 { font-size: 1.25rem; font-weight: 700; }
.prose p {
  margin: var(--s-3, 12px) 0;
  color: var(--text);
}
.prose ul {
  margin: var(--s-3, 12px) 0;
  padding-right: 1.25rem;
}
.prose li {
  margin-bottom: var(--s-1, 4px);
  line-height: 1.7;
}
.prose a {
  color: var(--shafa-gold-text);
  text-decoration: none;
}
.prose a:hover {
  text-decoration: underline;
}
.prose blockquote {
  margin: var(--s-3, 12px) 0;
  padding: 0 var(--s-3, 12px) 0 var(--s-4, 16px);
  border-right: 3px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}
@media (max-width: 480px) {
  .prose { font-size: 0.95rem; }
}

