.nav__user-name {
  font-weight: 500;
  color: var(--shafa-gold-text);
  font-size: var(--fs-sm, 0.9rem);
}
.section-personalized {
  background: var(--bg);
}
.section-personalized .products-grid {
  gap: var(--s-3);
}
.section-repurchase .panel {
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(177, 95, 0, 0.06);
}
.section-personalized .section-head .eyebrow {
  font-size: var(--fs-caption);
  letter-spacing: var(--shafa-tracking-normal);
}
.section-related {
  background: linear-gradient(180deg, var(--surface-alt) 0%, var(--surface) 100%);
  border-radius: var(--radius);
  padding: var(--s-6) 0;
}
.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;
}
.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);
}
.product-card:focus-within {
  outline: 2px solid var(--shafa-gold-text);
  outline-offset: 4px;
}

.brand-accent {
  background: linear-gradient(45deg, var(--accent), var(--accent-strong));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--accent-strong);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.05));
}
html.js-motion .scroll-reveal {
  opacity: 0; transform: translateY(30px);
}
.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); }
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); }
.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 {
  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);
}

/* ===== Layout ===== */
.relative { position: relative; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
/* افزوده شد — قبلاً در markup استفاده می‌شد ولی تعریف نشده بود، پس
   input ایمیلِ lead-magnet عرضش را از size پیش‌فرض می‌گرفت و بقیهٔ
   ردیف خالی می‌ماند. */
.flex-1 { flex: 1 1 0%; min-width: 0; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--s-1); }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }

/* ===== Text ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-xs { font-size: var(--fs-small); }
.text-h2 { font-size: var(--fs-h2); }
.text-h3 { font-size: var(--fs-h3); }
.font-600 { font-weight: 500; }
.font-700 { font-weight: 700; }
.text-accent { color: var(--accent); }
.text-accent-strong { color: var(--accent-strong); }
.text-success { color: var(--success); }
.lh-1 { line-height: 1; }
.lh-1-3 { line-height: 1.3; }
.lh-1-9 { line-height: 1.9; }
.lh-2-1 { line-height: 2.1; }
.whitespace-nowrap { white-space: nowrap; }

/* ===== Form sizing ===== */
/* افزوده شد — بدون آن input ارتفاع --touch-lg (48px) می‌گرفت در حالی که
   دکمهٔ btn--sm روی --shafa-touch-sm (40px) بود ⇒ 8px عدم ترازی عمودی.

   selector عمداً روی خودِ عنصر است، نه روی فرزندش: تنها مصرف‌کنندهٔ
   زنده (lead-magnet-form.php) کلاس را مستقیم روی <input> می‌گذارد
   (`class="field field--sm flex-1"`). نسخهٔ قبلی
   `.field--sm input, …` هیچ المانی را هدف نمی‌گرفت و قاعده بی‌اثر
   می‌ماند. descendantها هم نگه داشته شده‌اند تا اگر روزی کلاس روی
   یک wrapper گذاشته شد، اندازهٔ فرزندانش هم درست شود. */
.field--sm,
.field--sm input,
.field--sm select,
.field--sm textarea {
  min-height: var(--shafa-touch-sm);
  padding: 6px 12px;
  font-size: var(--fs-small);
}

/* ===== Spacing ===== */
.m-0 { margin: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-2 { margin: var(--s-2) 0; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--s-1); }
.mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mt-7 { margin-top: var(--s-7); }
.mb-2 { margin-bottom: var(--s-2); }
.mb-3 { margin-bottom: var(--s-3); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-5 { margin-bottom: var(--s-5); }
.mb-7 { margin-bottom: var(--s-7); }

/* ===== Max-width ===== */
.max-w-32rem { max-width: 32rem; }
.max-w-38rem { max-width: 38rem; }
.max-w-42rem { max-width: 42rem; }
.max-w-400px { max-width: 400px; }
.max-w-560px { max-width: 560px; }
.max-w-800px { max-width: 800px; }

/* ===== Compound layout & Section Heading Centering ===== */
.text-center-mb-5 { text-align: center; margin-bottom: var(--s-5); }
.text-center-mb-7 { text-align: center; margin-bottom: var(--s-7); }

.section-head--centered,
.section-head.text-center,
.section-head.text-center-mb-7,
.section-head.text-center-mb-6,
.section-head.text-center-mb-5 {
  text-align: center !important;
}

.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-6 h2,
.section-head.text-center-mb-6 p,
.section-head.text-center-mb-5 h2,
.section-head.text-center-mb-5 p,
.text-center-mb-7 > p,
.text-center-mb-5 > p,
.text-center > p {
  margin-inline: auto !important;
  text-align: center !important;
}

.section-padding-lg { padding-top: var(--s-7); padding-bottom: var(--s-7); }
.section-padding-md { padding-top: var(--s-7); padding-bottom: var(--s-5); }
.panel-narrow-center { max-width: 560px; margin: 0 auto; text-align: center; }
.panel-surface-lg { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-5); margin-bottom: var(--s-6); }
.panel-surface-top { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-5); margin-top: var(--s-4); }
.panel-success { border-color: var(--success); background: color-mix(in srgb, var(--success) 8%, transparent); }
.divider-top { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--border); }
.divider-top-sm { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--border); }
.total-row { border-top: 2px solid var(--border); padding-top: var(--s-3); font-weight: 700; }
.discount-row { border-top: 1px solid var(--border); padding-top: var(--s-3); color: var(--success); }

/* ===== Links ===== */
.link-reset { color: inherit; text-decoration: none; }
.link-accent-underline { color: var(--accent-strong); text-decoration: underline; }

/* ===== Icons ===== */
.icon-16 { font-size: 16px; }
.icon-18 { font-size: 18px; }
.icon-20 { font-size: 20px; }
.icon-24 { font-size: 24px; }
.icon-48-muted { font-size: 48px; color: var(--muted); }
.icon-accent-24 { color: var(--accent); font-size: 24px; }
.icon-accent-strong-sm { color: var(--accent-strong); font-size: 18px; }
.icon-success-sm { color: var(--success); font-size: 18px; }
.icon-ml-4 { margin-left: 4px; }
.icon-ml-6 { margin-left: 6px; }
.icon-mr-6 { margin-right: 6px; }

/* ===== Misc ===== */
.input-cursor-pointer { cursor: pointer; background: var(--surface); }
.grid-col-auto { grid-column: auto; }
.grid-col-span-1 { grid-column: span 1; }
.h-120px { height: 120px; }
.radius-lg { border-radius: var(--radius-lg); }

/* ===== Compound flex/text patterns ===== */
.flex-meta { display: flex; align-items: center; justify-content: center; gap: var(--s-3); flex-wrap: wrap; color: var(--text-soft); font-size: var(--fs-small); }
.flex-between-wrap { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.flex-items-start { display: flex; align-items: flex-start; gap: var(--s-2); }
.actions-center { margin-top: var(--s-4); display: flex; gap: var(--s-3); justify-content: center; flex-wrap: wrap; }
.eyebrow-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--shafa-gold-text); }
.text-1-1rem { font-size: 1.1rem; }
.mfa-code { letter-spacing: 0.5em; font-size: 1.25em; text-align: center; }
.guarantee-list { list-style: none; display: grid; gap: var(--s-2); padding: 0; margin: 0; }

/* ===== Additional utilities ===== */
.text-accent-soft { color: #A67C2E; }
.text-soft { color: var(--text-soft); }
.text-muted { color: var(--shafa-text-tertiary); }
.z-1 { z-index: 1; }
.z-2 { z-index: 2; }
.d-block { display: block; }
.italic { font-style: italic; }
/* .grid-4 عمداً اینجا تعریف نمی‌شود. نسخهٔ تکراریِ اینجا چون این فایل
   بعد از style.css بارگذاری می‌شود، هر media query واکنش‌گراییِ
   تعریف‌شده در style.css را در همهٔ اندازه‌ها خنثی می‌کرد.
   منبع واحد: style.css → بخش «layout». */
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.object-cover-center { object-fit: cover; object-position: center 20%; }
.border-right-accent { border-right: 3px solid var(--accent); }
.pr-4 { padding-right: var(--s-4); }
.icon-32 { font-size: 32px; }
.icon-40 { font-size: 40px; }
.lh-2 { line-height: 2; }
.max-w-28rem { max-width: 28rem; }
.max-w-36rem { max-width: 36rem; }
.max-w-40rem { max-width: 40rem; }
.max-w-48rem { max-width: 48rem; }
.m-auto { margin: auto; }
.mt-auto { margin-top: auto; }
.mb-auto { margin-bottom: auto; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

/* ============================================================================
 * لایهٔ ایمنی واکنش‌گرایی
 *
 * این فایل آخرین stylesheet بارگذاری‌شده است (header.php)، بنابراین
 * هرچه اینجا بنویسیم در صورت تساوی specificity برنده می‌شود.
 * ========================================================================== */

/* --- ۱) شبکهٔ ایمنی سرریز افقی --------------------------------------------
 * پیش از این هیچ محافظتی روی html/body نبود؛ یک عنصر سرریز (جدول، grid،
 * متن nowrap) کل صفحه را در موبایل به اسکرول افقی می‌برد. این guard
 * آخرین خط دفاع است — ریشهٔ هر سرریز باید جداگانه رفع شود. */
html {
  overflow-x: hidden;
}
body {
  overflow-x: hidden;
  /* فضای کافی زیر عناصر fixed پایین صفحه (toast / back-to-top) */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* --- ۲) گوشی‌های کوچک (۳۲۰–۴۸۰px) ---------------------------------------
 * پایین‌ترین breakpoint پیشین ۴۸۰px بود، پس iPhone SE و Galaxy Fold
 * کاملاً به قاعدهٔ پایه وابسته می‌ماندند. */
@media (max-width: 480px) {
  .container {
    padding-inline: var(--s-3);
  }

  .section {
    padding-block: var(--s-6);
  }

  /* گریدهای utility در ۳۶۰px تک‌ستونه می‌شوند (base در style.css) */
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* --- ۴) آینه‌کردن آیکون‌های جهت‌دار در RTL -------------------------------
 * در راست‌به‌چپ، «پیشرو» یعنی چپ. آیکون‌هایی مثل arrow_forward به‌صورت
 * پیش‌فرض به راست اشاره می‌کنند و بدون آینه، جهت اشتباه می‌دهند.
 * پیش از این پروژه هیچ scaleX(-1) نداشت. selector بر پایهٔ
 * data-icon است که includes/icon.php روی هر <svg> می‌گذارد.
 * توجه: فقط آیکون‌های افقی آینه می‌شوند؛ arrow_upward/arrow_downward
 * عمودی‌اند و نباید آینه شوند. */
[dir="rtl"] .material-symbols-outlined[data-icon="arrow_forward"],
[dir="rtl"] .material-symbols-outlined[data-icon="arrow_back"],
[dir="rtl"] .material-symbols-outlined[data-icon="chevron_left"],
[dir="rtl"] .material-symbols-outlined[data-icon="chevron_right"],
[dir="rtl"] .material-symbols-outlined[data-icon="send"],
[dir="rtl"] .material-symbols-outlined[data-icon="assignment_return"] {
  transform: scaleX(-1);
}

/* --- ۵) حالت افقی گوشی ---------------------------------------------------
 * کل پروژه پیش از این هیچ query مربوط به orientation نداشت. ارتفاع ثابت
 * ۵۲۰px در گوشی افقی (حدود ۳۷۵px ارتفاع) کل صفحه را سرریز می‌کرد. */
@media (orientation: landscape) and (max-height: 500px) {
  .folder-stage {
    height: auto;
    min-height: 100dvh;
  }

  .folder-gallery {
    min-height: 100dvh;
  }
}
