/* ===========================================
   GapChap — تم مشکی مینیمال
   متغیرهای رنگ و فونت از پنل مدیریت تزریق می‌شوند
   =========================================== */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Layout ---------- */
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.section { padding: 30px 0; }
.section-sm { padding: 20px 0; }
/* صفحهٔ اصلی: فاصلهٔ بخش‌ها نصف */
body.is-home .section { padding: 15px 0; }
body.is-home .hero { padding-top: 14px; }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 18px;
}
.section-head h1,
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.4vw, 26px);
  margin: 0; font-weight: 800; letter-spacing: -.01em;
}
.section-head .eyebrow {
  display: block; font-size: 12px; color: var(--c-primary);
  font-weight: 700; margin-bottom: 2px;
}
.section-head a.more {
  font-size: 13px; color: var(--c-primary); white-space: nowrap; font-weight: 700;
  border: 1px solid var(--c-border); border-radius: 999px; padding: 7px 16px;
  background: var(--c-surface); transition: background .15s, color .15s, border-color .15s;
}
.section-head a.more:hover { color: #fff; background: var(--c-primary); border-color: var(--c-primary); }
.sec-actions { display: flex; align-items: center; gap: 8px; }

/* ---------- Header ---------- */
.topbar {
  display: block; background: var(--c-soft); font-size: 12.5px; color: var(--c-primary-dark);
  padding: 7px 12px; text-align: center;
}
a.topbar-link { text-decoration: none; transition: filter .15s; }
a.topbar-link:hover { filter: brightness(.95); text-decoration: underline; }
.header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--c-surface) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-border);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: 68px; }

.logo { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.logo img { height: 34px; width: auto; }
.logo .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-primary); }

.nav { display: flex; gap: 22px; margin-inline-start: 10px; }
.nav a { font-size: 14.5px; color: var(--c-text); position: relative; padding: 4px 0; }
.nav a::after {
  content: ''; position: absolute; inset-inline-start: 0; bottom: 0;
  width: 0; height: 2px; background: var(--c-primary); border-radius: 2px;
  transition: width .22s ease;
}
.nav a:hover::after { width: 100%; }

.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 13px;
  border: 1px solid var(--c-border); background: var(--c-surface);
  display: inline-grid; place-items: center; cursor: pointer;
  position: relative; transition: border-color .2s, background .2s;
}
.icon-btn:hover { border-color: var(--c-primary); background: var(--c-soft); }
.icon-btn .badge {
  position: absolute; top: -6px; inset-inline-end: -6px;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--c-primary); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}

.search-box { position: relative; flex: 1; max-width: 320px; }
.search-box input {
  width: 100%; height: 40px; border-radius: 13px; padding: 0 40px 0 14px;
  border: 1px solid var(--c-border); background: var(--c-surface);
}
.search-box input:focus { border-color: var(--c-primary); outline: none; }
.search-box svg { position: absolute; inset-inline-end: 13px; top: 11px; opacity: .45; }

.burger { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 14px; border: 1px solid transparent;
  background: var(--c-primary); color: #fff; font-weight: 700; font-size: 14.5px;
  cursor: pointer; transition: transform .15s ease, background .2s ease;
}
.btn:hover { background: var(--c-primary-dark); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--c-text); border-color: var(--c-border); }
.btn-ghost:hover { background: var(--c-soft); border-color: var(--c-primary); color: var(--c-primary-dark); }
.btn-soft { background: var(--c-soft); color: var(--c-primary-dark); }
.btn-soft:hover { background: color-mix(in srgb, var(--c-soft) 70%, var(--c-primary) 12%); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 11px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Slider ---------- */
.hero { padding-top: 22px; }
.slider {
  position: relative; border-radius: calc(var(--radius) + 8px); overflow: hidden;
  background: var(--c-soft);
}
.slides { display: flex; transition: transform .55s cubic-bezier(.4,.1,.2,1); }
.slide { min-width: 100%; }
.slide img { width: 100%; aspect-ratio: 21/8; object-fit: cover; }
.slide .mobile-img { display: none; }
.slider-dots {
  position: absolute; bottom: 14px; inset-inline-start: 50%; transform: translateX(50%);
  display: flex; gap: 7px;
}
.slider-dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.6); cursor: pointer; transition: width .2s;
}
.slider-dots button[aria-current="true"] { width: 24px; border-radius: 5px; background: #fff; }
.slider-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.85); cursor: pointer; display: grid; place-items: center;
}
.slider-nav.prev { inset-inline-start: 12px; }
.slider-nav.next { inset-inline-end: 12px; }

/* ---------- Product grid ---------- */
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .22s ease, transform .22s ease;
}
.card:hover { border-color: var(--c-primary); transform: translateY(-3px); }

.product-card .thumb { position: relative; background: var(--c-soft); }
.product-card .thumb img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.product-card .body { padding: 14px 15px 16px; }
.product-card h3 {
  margin: 0 0 10px; font-size: 14.5px; font-weight: 600; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 3.4em;
}
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-weight: 800; font-size: 16px; font-family: var(--font-display); }
.price small { font-size: 11.5px; font-weight: 500; color: var(--c-muted); margin-inline-start: 3px; }
.price-old { font-size: 12.5px; color: var(--c-muted); text-decoration: line-through; }

/* نشان تخفیف — المان امضای طراحی */
.tag-off {
  position: absolute; top: 11px; inset-inline-start: 11px;
  background: var(--c-primary); color: #fff; font-size: 12px; font-weight: 800;
  padding: 3px 9px; border-radius: 9px 9px 9px 3px;
}
.tag-out {
  position: absolute; inset: 0; background: rgba(255,255,255,.72);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--c-muted);
}

/* ---------- Category chips ---------- */
.chips { display: flex; gap: 9px; flex-wrap: wrap; }
.chip {
  padding: 7px 15px; border-radius: 999px; border: 1px solid var(--c-border);
  background: var(--c-surface); font-size: 13.5px; transition: .2s;
}
.chip:hover, .chip.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* ---------- Article card ---------- */
.article-card .thumb img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.article-card .body { padding: 16px 17px 18px; }
.article-card h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; line-height: 1.7; }
.article-card p { margin: 0; font-size: 13.5px; color: var(--c-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-meta { font-size: 12px; color: var(--c-muted); margin-top: 12px; display: flex; gap: 12px; }

/* ---------- Product page ---------- */
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.gallery-main {
  border-radius: var(--radius); overflow: hidden; background: var(--c-soft);
  border: 1px solid var(--c-border);
}
.gallery-main img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 9px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumbs button {
  width: 68px; height: 68px; padding: 0; border-radius: 12px; overflow: hidden;
  border: 1.5px solid var(--c-border); background: none; cursor: pointer;
}
.gallery-thumbs button[aria-current="true"] { border-color: var(--c-primary); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product-title { font-family: var(--font-display); font-size: clamp(21px, 3vw, 29px); margin: 0 0 12px; font-weight: 800; }
.attr-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.attr-table td { padding: 9px 0; border-bottom: 1px dashed var(--c-border); }
.attr-table td:first-child { color: var(--c-muted); width: 40%; }

.buy-box {
  border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 20px; background: var(--c-surface); margin-top: 22px;
}
.qty { display: inline-flex; align-items: center; border: 1px solid var(--c-border); border-radius: 12px; overflow: hidden; }
.qty button { width: 38px; height: 40px; border: 0; background: var(--c-surface); cursor: pointer; font-size: 17px; }
.qty button:hover { background: var(--c-soft); }
.qty input { width: 48px; height: 40px; border: 0; text-align: center; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--c-border); margin-bottom: 22px; flex-wrap: wrap; }
.tabs button {
  padding: 11px 18px; border: 0; background: none; cursor: pointer; font-size: 14.5px;
  color: var(--c-muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--c-primary); border-color: var(--c-primary); font-weight: 700; }

/* ---------- Prose (مقاله و صفحات) ---------- */
.prose { font-size: 16px; line-height: 2.1; }
.prose h1 { font-family: var(--font-display); font-size: 28px; margin: 34px 0 14px; font-weight: 800; }
.prose h2 {
  font-family: var(--font-display); font-size: 23px; margin: 32px 0 12px; font-weight: 800;
  padding-inline-start: 13px; border-inline-start: 4px solid var(--c-primary); line-height: 1.6;
}
.prose h3 { font-size: 19px; margin: 26px 0 10px; font-weight: 700; }
.prose p { margin: 0 0 18px; }
.prose a { color: var(--c-primary-dark); border-bottom: 1px solid var(--c-border); }
.prose a:hover { border-color: var(--c-primary); }
.prose img { border-radius: var(--radius); margin: 22px auto; }
.prose figure { margin: 22px 0; }
.prose figcaption { font-size: 13px; color: var(--c-muted); text-align: center; margin-top: 8px; }
.prose ul, .prose ol { padding-inline-start: 22px; margin: 0 0 18px; }
.prose li { margin-bottom: 7px; }
.prose blockquote {
  margin: 22px 0; padding: 16px 20px; background: var(--c-soft);
  border-radius: var(--radius); border-inline-start: 4px solid var(--c-primary);
}
.prose table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--c-border); padding: 10px 12px; }
.prose th { background: var(--c-soft); }
.prose iframe { width: 100%; border-radius: var(--radius); margin: 22px 0; aspect-ratio: 16/9; border: 0; }
.prose video {
  display: block; width: 100%; max-height: 540px; margin: 24px auto; border: 0;
  border-radius: calc(var(--radius) + 4px); background: #000; object-fit: contain;
  box-shadow: 0 22px 50px -24px rgba(0,0,0,.55); outline: 1px solid var(--c-border);
}

.article-hero-video { border-radius: calc(var(--radius) + 6px); overflow: hidden; margin-bottom: 26px; background: #000; }
.article-hero-video video { width: 100%; display: block; }

/* ---------- Forms ---------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13.5px; margin-bottom: 6px; color: var(--c-muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 13px;
  border: 1px solid var(--c-border); background: var(--c-surface);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--c-primary); outline: none; }
.field textarea { min-height: 120px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--c-muted); margin-top: 5px; }
.field.error input { border-color: var(--c-danger); }


/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: 13px; font-size: 14px; margin-bottom: 16px; }
.alert-success { background: #eaf7f1; color: #2c7a5c; }
.alert-error   { background: #fdecea; color: #a4342f; }
.alert-info    { background: var(--c-soft); color: var(--c-primary-dark); }

/* ---------- Cart & Checkout ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 26px; align-items: start; }
.cart-item {
  display: grid; grid-template-columns: 88px 1fr auto; gap: 15px; align-items: center;
  padding: 15px 0; border-bottom: 1px solid var(--c-border);
}
.cart-item img { width: 88px; height: 88px; object-fit: cover; border-radius: 14px; }
.summary {
  position: sticky; top: 88px; background: var(--c-surface);
  border: 1px solid var(--c-border); border-radius: var(--radius); padding: 22px;
}
.summary-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14px; }
.summary-row.total {
  border-top: 1px dashed var(--c-border); margin-top: 8px; padding-top: 14px;
  font-weight: 800; font-size: 16.5px;
}
.coupon-row { display: flex; gap: 8px; margin: 14px 0; }
.coupon-row input { flex: 1; padding: 11px 13px; border: 1px solid var(--c-border); border-radius: 12px; }

.gateway-list { display: grid; gap: 10px; }
.gateway-opt {
  display: flex; align-items: center; gap: 11px; padding: 14px 16px;
  border: 1.5px solid var(--c-border); border-radius: 14px; cursor: pointer; transition: .2s;
}
.gateway-opt:has(input:checked) { border-color: var(--c-primary); background: var(--c-soft); }

.result-box { max-width: 480px; margin: 60px auto; text-align: center; }
.result-icon { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 20px; font-size: 34px; }
.result-icon.ok   { background: #eaf7f1; color: #2c7a5c; }
.result-icon.fail { background: #fdecea; color: #a4342f; }
.tracking-code {
  display: inline-block; background: var(--c-soft); color: var(--c-primary-dark);
  padding: 10px 20px; border-radius: 13px; font-weight: 800; font-size: 18px;
  letter-spacing: .06em; margin: 14px 0; direction: ltr;
}

/* ---------- Panel ---------- */
.panel-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 26px; align-items: start; padding: 34px 0 60px; }
/* بدون این، ستون‌های گرید نمی‌توانند کوچک‌تر از محتوایشان شوند و
   جدول‌های پهن کل چیدمان را از عرض صفحه بیرون می‌زنند. */
.panel-layout > * { min-width: 0; }
.panel-box { min-width: 0; }
.panel-box table { max-width: 100%; }
.panel-side { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 20px; position: sticky; top: 88px; }

.panel-user { text-align: center; padding-bottom: 18px; border-bottom: 1px solid var(--c-border); margin-bottom: 14px; }
.pu-avatar { position: relative; width: 72px; margin: 0 auto 10px; }
.pu-avatar img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--c-soft); display: block; }
/* نشان لیگ، وسطِ زیر عکس پروفایل */
.pu-medal {
  position: absolute; inset-inline: 0; bottom: -16px; margin-inline: auto;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-surface); border: 2px solid color-mix(in srgb, var(--tier, var(--c-primary)) 45%, transparent);
  box-shadow: 0 4px 12px -4px rgba(0,0,0,.25);
}
.pu-medal .club-medal-svg { width: 22px; height: 22px; }
.panel-user:has(.pu-medal) .pu-avatar { margin-bottom: 24px; }
.pu-info strong { display: block; font-size: 14.5px; }
.pu-mobile { font-size: 12.5px; color: var(--c-muted); direction: ltr; display: inline-block; }
.pu-tier { margin-top: 9px; display: inline-flex; }

.panel-menu { display: grid; gap: 3px; }
.panel-menu a {
  padding: 10px 13px; border-radius: 12px; font-size: 14px;
  display: flex; align-items: center; gap: 10px; transition: background .15s, color .15s;
}
.panel-menu a:hover { background: var(--c-soft); }
.panel-menu a.active { background: var(--c-primary); color: #fff; }
.panel-menu .pm-ic { display: grid; place-items: center; flex: 0 0 auto; line-height: 0; opacity: .85; }
.panel-menu a.active .pm-ic { opacity: 1; }
.panel-menu .pm-out { color: var(--c-danger); }
.panel-menu .pm-extra { margin-top: 2px; }
.panel-box { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 24px; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: right; padding: 12px; background: var(--c-soft); font-weight: 700; font-size: 13px; }
.table th:first-child { border-start-end-radius: 12px; }
.table th:last-child { border-start-start-radius: 12px; }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--c-border); }

.status { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status.pending   { background: #fff4e5; color: #96631a; }
.status.paid,
.status.processing{ background: var(--c-soft); color: var(--c-primary-dark); }
.status.shipped   { background: #e8f1fd; color: #2b5f9e; }
.status.delivered { background: #eaf7f1; color: #2c7a5c; }
.status.canceled,
.status.failed    { background: #fdecea; color: #a4342f; }

.steps { display: flex; gap: 0; margin: 26px 0; }
.step { flex: 1; text-align: center; position: relative; font-size: 12.5px; color: var(--c-muted); }
.step::before {
  content: ''; display: block; width: 15px; height: 15px; border-radius: 50%;
  background: var(--c-border); margin: 0 auto 9px; position: relative; z-index: 2;
}
.step::after { content: ''; position: absolute; top: 7px; inset-inline-start: 50%; width: 100%; height: 2px; background: var(--c-border); }
.step:last-child::after { display: none; }
.step.done { color: var(--c-primary-dark); font-weight: 700; }
.step.done::before { background: var(--c-primary); }
.step.done::after { background: var(--c-primary); }
.step.active { color: var(--c-text); font-weight: 700; }
.step.active::before { background: var(--c-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-primary) 20%, transparent); }

/* ---------- Contact boxes ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.contact-box {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 26px 22px; text-align: center;
  transition: border-color .2s, transform .2s;
}
.contact-box:hover { border-color: var(--c-primary); transform: translateY(-3px); }
.contact-box .ico {
  width: 52px; height: 52px; border-radius: 16px; background: var(--c-soft);
  display: grid; place-items: center; margin: 0 auto 14px; color: var(--c-primary);
}
.contact-box h3 { margin: 0 0 5px; font-size: 15px; font-weight: 700; }
.contact-box p { margin: 0; font-size: 14px; color: var(--c-muted); direction: ltr; unicode-bidi: plaintext; }

/* ---------- Footer ---------- */
.footer { background: var(--c-soft); margin-top: 60px; padding: 48px 0 0; }
/* ستون برند + به تعداد ستون‌های تعریف‌شده (متغیر --fcols از PHP می‌آید).
   نکته: repeat(auto-fit) بعد از یک تراک fr نامعتبر است و کل قانون را باطل می‌کند. */
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(var(--fcols, 3), minmax(0, 1fr)); gap: 32px; }
.footer-text { font-size: 13.5px; line-height: 2.1; color: var(--c-muted); }
.footer-text a { color: var(--c-primary); }
.footer h4 { font-size: 15px; margin: 0 0 14px; font-weight: 800; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer a { font-size: 14px; color: var(--c-muted); }
.footer a:hover { color: var(--c-primary-dark); }
.footer p { font-size: 13.5px; color: var(--c-muted); margin: 0 0 14px; line-height: 2; }

.badges { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.badge-item {
  width: 84px; height: 84px; background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: 16px; display: grid; place-items: center; padding: 8px; transition: .2s;
}
.badge-item:hover { border-color: var(--c-primary); }
.badge-item img { max-width: 100%; max-height: 100%; object-fit: contain; }

.socials { display: flex; gap: 9px; margin-top: 16px; }
.socials a {
  width: 38px; height: 38px; border-radius: 12px; background: var(--c-surface);
  border: 1px solid var(--c-border); display: grid; place-items: center;
}
.socials a:hover { border-color: var(--c-primary); color: var(--c-primary); }

.footer-bottom {
  margin-top: 40px; border-top: 1px solid var(--c-border); padding: 18px 0;
  font-size: 13px; color: var(--c-muted); text-align: center;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.footer-bottom .footer-credit,
.footer-bottom .footer-credit a { font-size: 13px; font-weight: 500; }
.footer-bottom .footer-credit a { color: var(--c-primary); }
.footer-bottom .footer-credit a:hover { text-decoration: underline; }
@media (max-width: 560px) { .footer-bottom { justify-content: center; text-align: center; } }

/* ---------- Misc ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--c-muted); }
.empty h3 { font-size: 17px; color: var(--c-text); margin: 0 0 8px; }
.breadcrumb { font-size: 13px; color: var(--c-muted); padding: 18px 0; display: flex; gap: 7px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--c-primary); }

/* بردکرامب باکسی و کوچک (صفحهٔ محصول) */
.breadcrumb-box {
  display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: 12px; padding: 8px 14px; margin: 20px 0;
  font-size: 12.5px; max-width: 100%;
}
.breadcrumb-box a { color: var(--c-muted); }
.breadcrumb-box a:hover { color: var(--c-primary); }
.breadcrumb-box span:last-child { color: var(--c-text); font-weight: 600; }
.breadcrumb-box > span { color: var(--c-border); }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--c-border); font-size: 14px; padding: 0 10px;
}
.pagination .current { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 700; }

.filter-bar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 24px;
}
.filter-bar select { padding: 9px 12px; border-radius: 11px; border: 1px solid var(--c-border); background: var(--c-surface); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  /* در تبلت: برند تمام‌عرض، بقیهٔ ستون‌ها دوتایی کنار هم */
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 22px; }
  .footer-grid .footer-brand { grid-column: 1 / -1; }
  .cart-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
}

/* ============================================================
   پنل کاربری — رسپانسیو
   دسکتاپ: ستون کناری ۲۵۰px   |   تبلت: ستون باریک‌تر
   موبایل: تک‌ستونه با کارت فشرده و منوی افقی
   ============================================================ */

/* ---------- تبلت: هنوز دوستونه، فقط جمع‌وجورتر ---------- */
@media (min-width: 769px) and (max-width: 1024px) {
  .panel-layout { grid-template-columns: 208px minmax(0, 1fr); gap: 18px; padding: 24px 0 50px; }
  .panel-side { padding: 16px; top: 78px; }
  .pu-avatar, .panel-user:has(.pu-medal) .pu-avatar { width: 62px; }
  .pu-avatar img { width: 62px; height: 62px; }
  .pu-info strong { font-size: 13.5px; }
  .panel-menu a { padding: 9px 11px; font-size: 13px; gap: 8px; }
}

/* ---------- موبایل: منوی افقی تا محتوا بالا بیاید ---------- */
@media (max-width: 768px) {
  .panel-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 14px 0 36px; }
  .panel-side {
    /* زیر هدرِ چسبانِ سایت می‌نشیند (ارتفاع هدر ۶۸px) */
    position: sticky; top: 68px; z-index: 30; padding: 12px;
    border-radius: 16px; background: var(--c-surface);
    box-shadow: 0 6px 18px -14px rgba(0,0,0,.45);
  }
  .panel-user {
    display: flex; align-items: center; gap: 12px; text-align: start;
    padding-bottom: 11px; margin-bottom: 10px;
  }
  .pu-avatar, .panel-user:has(.pu-medal) .pu-avatar { width: 46px; margin: 0; flex: 0 0 auto; }
  .pu-avatar img { width: 46px; height: 46px; }
  .pu-medal { width: 24px; height: 24px; bottom: -6px; inset-inline: auto -4px; margin: 0; border-width: 2px; }
  .pu-medal .club-medal-svg { width: 15px; height: 15px; }
  .pu-info { min-width: 0; flex: 1; }
  .pu-info strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pu-mobile { font-size: 11.5px; }
  .pu-tier { margin-top: 5px; font-size: 10.5px; padding: 3px 9px; }

  .panel-menu {
    display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin: 0 -12px; padding: 2px 12px 3px;
  }
  .panel-menu::-webkit-scrollbar { display: none; }
  .panel-menu a {
    flex: 0 0 auto; padding: 8px 13px; border-radius: 999px; font-size: 12.5px; gap: 7px;
    border: 1px solid var(--c-border); background: var(--c-surface); white-space: nowrap;
  }
  .panel-menu a.active { border-color: var(--c-primary); background: var(--c-primary); color: #fff; }
  .panel-menu .pm-ic svg { width: 16px; height: 16px; }
  .panel-menu .pm-extra { margin-top: 0; }

  /* جعبه‌های محتوای پنل */
  .panel-box { padding: 16px 14px; }
  .panel-layout .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .panel-layout .grid-2 { grid-template-columns: 1fr; }
  /* جمع سفارش در موبایل تمام‌عرض */
  .panel-box [style*="max-width:320px"] { max-width: 100% !important; }
  /* دکمهٔ آخرِ ردیف‌های کارتی تمام‌عرض */
  .table.cards td:last-child .btn-block { width: 100%; }
}

/* ---------- موبایل کوچک ---------- */
@media (max-width: 420px) {
  .panel-layout .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .panel-box { padding: 14px 12px; }
  .panel-menu a { padding: 7px 11px; font-size: 12px; }
}

@media (max-width: 768px) {
  .nav, .search-box { display: none; }
  .burger { display: inline-grid; }
  .product-layout { grid-template-columns: 1fr; gap: 26px; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  /* بنر موبایل با نسبت طبیعیِ تصویر آپلودشده (بدون کراپ/نسبت ثابت) */
  .slide.has-mobile .desktop-img { display: none; }
  .slide.has-mobile .mobile-img { display: block; width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; }
  .slide:not(.has-mobile) .desktop-img { aspect-ratio: auto; height: auto; object-fit: contain; }
  .section { padding: 38px 0; }
}

@media (max-width: 560px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  /* در موبایل هم ستون‌های لینک کنار هم می‌مانند تا فوتر بی‌جهت بلند نشود */
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
  .footer-grid .footer-brand,
  .footer-grid .footer-badges { grid-column: 1 / -1; }
  .footer h4 { font-size: 14px; margin-bottom: 10px; }
  .footer a { font-size: 13px; }
  .cart-item { grid-template-columns: 68px 1fr; }
  .cart-item img { width: 68px; height: 68px; }
}

/* ---------- Mobile drawer ---------- */
.drawer {
  position: fixed; inset: 0; z-index: 100; visibility: hidden; opacity: 0; transition: .25s;
}
.drawer[open], .drawer.open { visibility: visible; opacity: 1; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(46,36,48,.4); }
.drawer-panel {
  position: absolute; inset-block: 0; inset-inline-end: 0; width: min(300px, 84vw);
  background: var(--c-surface); padding: 22px; overflow-y: auto;
  transform: translateX(-100%); transition: transform .28s ease;
}
.drawer.open .drawer-panel { transform: translateX(0); }
.drawer-panel nav { display: grid; gap: 3px; margin-top: 18px; }
.drawer-panel nav a { padding: 11px 13px; border-radius: 12px; }
.drawer-panel nav a:hover { background: var(--c-soft); }

/* ============ Product color swatches ============ */
.color-select { margin: 0 0 18px; }
.color-select-label { font-size: 14px; font-weight: 700; margin-bottom: 9px; }
.color-select-label span { color: var(--c-primary); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  background: var(--sw, #ccc); border: 2px solid var(--c-border);
  box-shadow: inset 0 0 0 2px #fff; padding: 0; transition: transform .12s, box-shadow .12s;
}
.swatch:hover { transform: scale(1.08); }
.swatch[aria-current="true"] { border-color: var(--c-primary); box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--c-primary); }

/* رنگ ناموجود: ضربدر قرمز روی دایره، غیرقابل انتخاب */
.swatch { position: relative; }
.swatch.is-out { cursor: not-allowed; opacity: .45; filter: grayscale(.6); }
.swatch.is-out:hover { transform: none; }
.swatch.is-out::before,
.swatch.is-out::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 128%; height: 2.5px; border-radius: 2px;
  background: #e03131; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .9);
  pointer-events: none;
}
.swatch.is-out::before { transform: translate(-50%, -50%) rotate(45deg); }
.swatch.is-out::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* طرح‌ها */
.design-select { margin: 0 0 18px; }
.design-options { display: flex; flex-wrap: wrap; gap: 9px; }
/* نام و قیمتِ طرح باید دو سطرِ جدا باشند؛ وقتی کنار هم بودند «ست ۱٬۷۵۰٬۰۰۰»
   مثل یک نامِ واحد خوانده می‌شد. */
.design-opt {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer;
  background: var(--c-surface); border: 1.5px solid var(--c-border); border-radius: 12px;
  padding: 8px 14px; font-size: 13.5px; font-weight: 600; color: var(--c-text); line-height: 1.5;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.design-opt .do-name { font-weight: 700; }
.design-opt .do-price {
  color: var(--c-muted); font-weight: 700; font-size: 11.5px;
  display: flex; align-items: center; gap: 4px;
}
.design-opt[aria-current="true"] .do-price { color: var(--c-primary); }
.design-opt .do-off {
  font-style: normal; font-size: 10.5px; font-weight: 800;
  background: var(--c-danger); color: #fff; border-radius: 6px; padding: 1px 5px;
}
.design-opt:hover { border-color: var(--c-primary); }
.design-opt[aria-current="true"] {
  border-color: var(--c-primary); background: var(--c-soft);
  box-shadow: 0 0 0 2px var(--c-primary) inset;
}

/* طرح ناموجود: نام خط‌خورده + برچسب «✕ ناموجود»، غیرقابل انتخاب */
.design-opt.is-out {
  cursor: not-allowed; opacity: .6; border-style: dashed;
  background: var(--c-soft);
}
.design-opt.is-out:hover { border-color: var(--c-border); }
.design-opt.is-out .do-name {
  text-decoration: line-through; text-decoration-color: #e03131; text-decoration-thickness: 2px;
}
.design-opt .do-out { color: #e03131; font-size: 11px; font-weight: 800; }

/* پیام «همهٔ رنگ‌ها/طرح‌ها ناموجودند» */
.vr-none { margin: 9px 0 0; font-size: 12.5px; color: var(--c-danger); }

/* متن اقساط زیر دکمهٔ خرید */
.installment-note {
  display: flex; align-items: center; gap: 10px; margin-top: 12px;
  background: color-mix(in srgb, var(--c-primary) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--c-primary) 28%, #fff);
  color: var(--c-primary); border-radius: 12px; padding: 11px 14px;
  font-size: 13px; line-height: 1.7; font-weight: 600;
}
.installment-note svg { flex: 0 0 auto; }

/* دکمهٔ خرید قسطی (باسلام) */
.btn-installment {
  display: flex; align-items: center; gap: 12px; margin-top: 10px;
  padding: 12px 15px; border-radius: 14px;
  border: 1.5px solid var(--c-accent);
  background: color-mix(in srgb, var(--c-accent) 10%, var(--c-surface));
  color: var(--c-text); transition: .2s; width: 100%;
}
.btn-installment:hover {
  background: color-mix(in srgb, var(--c-accent) 20%, var(--c-surface));
  border-color: color-mix(in srgb, var(--c-accent) 80%, #000);
  transform: translateY(-1px);
}
.btn-installment .bi-ic { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--c-accent); color: #fff; }
.btn-installment .bi-txt { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.btn-installment .bi-txt strong { font-size: 14.5px; font-weight: 800; }
.btn-installment .bi-txt small { font-size: 12px; color: var(--c-muted); line-height: 1.7; }
.btn-installment .bi-go { flex: 0 0 auto; color: var(--c-muted); }
.hint-inst { font-size: 12px; color: var(--c-muted); margin: 7px 2px 0; line-height: 1.9; }

/* صفحهٔ پرداخت کارت‌به‌کارت */
.card-pay { max-width: 560px; }
.cp-lead { color: var(--c-muted); line-height: 2; margin: 0 0 18px; }
.cp-cardbox { background: var(--c-soft); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 22px; }
.cp-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--c-border); }
.cp-row:last-of-type { border-bottom: 0; }
.cp-row span { color: var(--c-muted); font-size: 13.5px; }
.cp-cardbox .btn { margin: 12px 0; }
.cp-uplabel { display: block; font-weight: 700; margin-bottom: 8px; }
.cp-form input[type="file"] { width: 100%; padding: 10px; border: 1px dashed var(--c-border); border-radius: 10px; }

/* ============ Reviews & comments ============ */
.reviews-section { margin-top: 8px; }
.reviews-summary {
  display: flex; align-items: center; gap: 18px;
  background: var(--c-soft); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 22px;
}
.rs-score { font-size: 40px; font-weight: 800; color: var(--c-primary); line-height: 1; font-family: var(--font-display); }
.rs-score small { font-size: 14px; color: var(--c-muted); font-weight: 500; margin-inline-start: 4px; }
.rs-meta { display: flex; flex-direction: column; gap: 4px; }
.rs-meta span { font-size: 13px; color: var(--c-muted); }
.stars { color: #F2B01E; letter-spacing: 2px; font-size: 18px; }
.stars.sm { font-size: 14px; letter-spacing: 1px; margin: 2px 0 4px; }

/* انتخاب امتیاز ستاره (فرم نظر) */
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; margin: 4px 0 14px; }
.star-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.star-input label { font-size: 28px; color: var(--c-border); cursor: pointer; line-height: 1; transition: color .12s, transform .12s; }
.star-input label:hover { transform: scale(1.12); }
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: #F2B01E; }
.star-input input:focus-visible + label { outline: 2px solid var(--c-primary); outline-offset: 2px; border-radius: 4px; }

.reviews { display: flex; flex-direction: column; gap: 4px; }
.review { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--c-border); }
.review:last-child { border-bottom: 0; }
.review-avatar {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
  background: var(--c-soft); display: grid; place-items: center;
  color: var(--c-primary); font-weight: 800; font-size: 17px;
}
.review-avatar img { width: 100%; height: 100%; object-fit: cover; }
.review-content { flex: 1; min-width: 0; }
.review-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.review-top strong { font-size: 14.5px; }
.review-top time { margin-inline-start: auto; color: var(--c-muted); font-size: 12px; }
.review-content p { margin: 6px 0 0; font-size: 14.5px; line-height: 2; color: var(--c-text); }
.reviews-empty {
  text-align: center; color: var(--c-muted); font-size: 14px;
  padding: 30px 16px; background: var(--c-soft); border-radius: var(--radius);
}

.review-form {
  margin-top: 26px; max-width: 560px; background: var(--c-surface);
  border: 1px solid var(--c-border); border-radius: var(--radius); padding: 20px;
}
.review-form label { display: block; font-size: 13.5px; font-weight: 700; margin: 0 0 7px; }
.review-form select, .review-form textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--c-border);
  border-radius: 12px; font: inherit; background: var(--c-bg); margin-bottom: 14px;
}
.review-form textarea { min-height: 96px; resize: vertical; }
.review-form select:focus, .review-form textarea:focus { outline: none; border-color: var(--c-primary); }
.review-login { margin-top: 18px; font-size: 14px; }
.review-login a { color: var(--c-primary); font-weight: 700; }

/* ============ Wishlist ============ */
.wishlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.wish-card { position: relative; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.wish-card:hover { box-shadow: 0 14px 34px -22px rgba(0,0,0,.3); transform: translateY(-2px); }
.wish-remove { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 3; margin: 0; }
.wish-remove button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--c-primary); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 10px -4px rgba(0,0,0,.4); transition: background .15s, color .15s; }
.wish-remove button:hover { background: var(--c-primary); color: #fff; }
.wish-thumb { display: block; position: relative; aspect-ratio: 1; background: var(--c-soft); }
.wish-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wish-badge { position: absolute; bottom: 8px; inset-inline-start: 8px; background: var(--c-text); color: #fff; font-size: 11px; padding: 3px 9px; border-radius: 999px; }
.wish-body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.wish-title { font-size: 13.5px; font-weight: 600; color: var(--c-text); text-decoration: none; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wish-title:hover { color: var(--c-primary); }
.wish-price { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.wish-price strong { font-size: 15px; }
.wish-price small { font-weight: 400; color: var(--c-muted); font-size: 11px; }

/* ============ Search page ============ */
.search-page-form { display: flex; align-items: center; gap: 10px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px; padding: 8px 14px; margin: 0 0 22px; }
.search-page-form svg { color: var(--c-muted); flex: 0 0 auto; }
.search-page-form input { flex: 1; border: 0; background: transparent; font: inherit; padding: 8px 2px; outline: none; }
.search-page-form .btn { flex: 0 0 auto; padding: 10px 22px; }

/* ============ Default hero (no slider) ============ */
.hero-default {
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(135deg, var(--c-soft), var(--c-surface));
  border: 1px solid var(--c-border);
  padding: clamp(30px, 6vw, 64px) clamp(20px, 5vw, 54px);
  text-align: center;
}
.hero-default .eyebrow { display: inline-block; margin-bottom: 12px; }
.hero-default h1 { font-family: var(--font-display); font-size: clamp(26px, 4.6vw, 44px); font-weight: 800; margin: 0 0 12px; color: var(--c-text); }
.hero-default p { color: var(--c-muted); font-size: clamp(14px, 2vw, 17px); max-width: 560px; margin: 0 auto 22px; line-height: 2; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============ Home categories showcase ============ */
.home-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.home-cat {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px 12px; border: 1px solid var(--c-border); border-radius: var(--radius);
  background: var(--c-surface); text-decoration: none; color: var(--c-text);
  font-weight: 600; font-size: 14px; text-align: center; transition: box-shadow .15s, transform .15s, border-color .15s;
}
.home-cat:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -22px rgba(0,0,0,.3); border-color: var(--c-primary); }
.home-cat img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }

/* ============ Home carousels ============ */
.carousel-wrap { position: relative; }
.carousel { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; scroll-behavior: smooth; padding: 4px 2px 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { flex: 0 0 auto; width: clamp(165px, 44vw, 240px); scroll-snap-align: start; }
.carousel-nav { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text); cursor: pointer; display: grid; place-items: center; font-size: 20px; line-height: 1; padding: 0; transition: background .15s, color .15s, border-color .15s; }
.carousel-nav:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* ============ Home categories row (with icons) ============ */
.cats-section { padding-top: 30px; }
.cats-row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.cats-row::-webkit-scrollbar { display: none; }
.cat-chip { flex: 0 0 auto; width: 94px; display: flex; flex-direction: column; align-items: center; gap: 9px; text-decoration: none; color: var(--c-text); }
.cat-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--c-soft); color: var(--c-primary); display: grid; place-items: center; border: 1px solid var(--c-border); transition: transform .15s, background .15s, color .15s; overflow: hidden; }
.cat-icon img { width: 100%; height: 100%; object-fit: cover; }
.cat-chip:hover .cat-icon { transform: translateY(-3px); background: var(--c-primary); color: #fff; }
.cat-name { font-size: 13px; font-weight: 600; text-align: center; }

/* ============ Mobile sticky buy bar (product page) ============ */
.mobile-buybar { display: none; }
.cart-sticky { display: none; }

@media (max-width: 768px) {
  .carousel-nav { display: none; }
  .carousel > * { width: clamp(150px, 58vw, 200px); }

  .mobile-buybar {
    display: flex; align-items: center; gap: 12px;
    position: fixed; inset-inline: 0; z-index: 90;
    bottom: calc(var(--bb-h, 0px) + var(--stack-gap, 0px));   /* همیشه بالای نوار پایین */
    background: var(--c-surface); border-top: 1px solid var(--c-border);
    padding: 10px 14px calc(10px + var(--bb-safe, 0px));
    box-shadow: 0 -6px 20px -12px rgba(0,0,0,.4);
    transition: bottom .18s ease;
  }
  .mobile-buybar .mb-price { font-weight: 800; font-size: 16px; white-space: nowrap; }
  .mobile-buybar .mb-price small { font-weight: 400; color: var(--c-muted); font-size: 11px; }
  .mobile-buybar .mb-price .old { text-decoration: line-through; color: var(--c-muted); font-size: 12px; font-weight: 400; margin-inline-start: 6px; }
  .mobile-buybar form { flex: 1; margin: 0; }
  .mobile-buybar .btn { width: 100%; }
  body.has-buybar  { padding-bottom: calc(var(--bb-h, 0px) + var(--buybar-h, 64px) + 14px); }

  .cart-sticky {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; inset-inline: 0; z-index: 90;
    bottom: calc(var(--bb-h, 0px) + var(--stack-gap, 0px));
    background: var(--c-surface); border-top: 1px solid var(--c-border);
    padding: 10px 14px calc(10px + var(--bb-safe, 0px));
    box-shadow: 0 -6px 20px -12px rgba(0,0,0,.4);
    transition: bottom .18s ease;
  }
  .cart-sticky .cs-total { font-weight: 800; font-size: 15px; white-space: nowrap; }
  .cart-sticky .cs-total small { font-weight: 400; color: var(--c-muted); font-size: 11px; }
  .cart-sticky .btn { flex: 0 0 auto; }
  body.has-cartbar { padding-bottom: calc(var(--bb-h, 0px) + var(--buybar-h, 64px) + 14px); }
}

/* ============ Responsive tables → cards (panel) ============ */
@media (max-width: 620px) {
  .table.cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table.cards tr { display: block; border: 1px solid var(--c-border); border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; background: var(--c-surface); }
  .table.cards td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border: 0; text-align: left; }
  .table.cards td::before { content: attr(data-label); color: var(--c-muted); font-size: 12.5px; font-weight: 600; }
  .table.cards td:last-child { justify-content: flex-end; padding-top: 10px; }
  .table.cards td:last-child::before { content: ''; }
}

/* ============ Shop toolbar & filters (redesign) ============ */
.shop-title { font-family: var(--font-display); font-size: clamp(20px, 3vw, 28px); font-weight: 800; margin: 0 0 16px; text-align: right; }
.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--c-border); }
.shop-count { font-size: 13px; color: var(--c-muted); white-space: nowrap; }

/* ---------- کروسل افقی دسته‌بندی‌ها ---------- */
.cat-carousel { position: relative; display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.cat-carousel .cc-track {
  flex: 1 1 auto; min-width: 0;
  flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
  scroll-behavior: smooth; scroll-snap-type: x proximity;
  scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch;
  padding: 2px 1px;
}
.cat-carousel .cc-track::-webkit-scrollbar { display: none; }
.cat-carousel .chip { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }
.cat-carousel .cc-nav {
  flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--c-border); border-radius: 50%; background: var(--c-surface);
  color: var(--c-text); cursor: pointer; transition: .2s; padding: 0;
}
.cat-carousel .cc-nav:hover { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.cat-carousel .cc-nav[hidden] { display: none; }
.cat-carousel .cc-nav:disabled { opacity: .35; cursor: default; }
.cat-carousel .cc-nav:disabled:hover { background: var(--c-surface); border-color: var(--c-border); color: var(--c-text); }
/* محوشدگی لبه‌ها تا معلوم باشد فهرست ادامه دارد (مستقل از جهت صفحه) */
.cat-carousel.can-prev.can-next .cc-track {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.shop-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-select { display: flex; align-items: center; gap: 7px; border: 1px solid var(--c-border); border-radius: 12px; padding: 0 12px; background: var(--c-surface); color: var(--c-muted); }
.filter-select select { border: 0; background: transparent; font: inherit; padding: 10px 4px; cursor: pointer; outline: none; color: var(--c-text); }
.filter-toggle { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; user-select: none; white-space: nowrap; }
.filter-toggle input { display: none; }
.filter-toggle .ft-track { width: 40px; height: 22px; border-radius: 999px; background: var(--c-border); position: relative; transition: background .2s; flex: 0 0 auto; }
.filter-toggle .ft-thumb { position: absolute; top: 2px; inset-inline-start: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.filter-toggle input:checked + .ft-track { background: var(--c-primary); }
.filter-toggle input:checked + .ft-track .ft-thumb { transform: translateX(-18px); }

/* مرتب‌سازی و منظم‌کردن بالای فروشگاه در موبایل */
@media (max-width: 700px) {
  .shop-toolbar { flex-direction: column; align-items: stretch; gap: 12px; padding-bottom: 12px; margin-bottom: 16px; }
  .shop-count { display: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }
  /* روی موبایل خودِ کشیدن انگشت کافی است */
  .cat-carousel .cc-nav { display: none; }
  .cat-carousel { margin-bottom: 12px; }
  .shop-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
  .filter-select { grid-column: 1 / -1; justify-content: space-between; }
  .filter-select select { width: 100%; }
  .filter-toggle { justify-content: center; border: 1px solid var(--c-border); border-radius: 12px; padding: 9px 6px; background: var(--c-surface); font-size: 12.5px; gap: 7px; }
  .search-page-form { margin-bottom: 14px; }
  .shop-title { margin-bottom: 12px; }
}

/* ============ Mobile drawer header ============ */
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; padding-bottom: 14px; border-bottom: 1px solid var(--c-border); }
.drawer-title { font-family: var(--font-display); font-weight: 800; font-size: 17px; }

/* ============ Cart remove icon ============ */
.cart-remove { border: 0; background: transparent; color: var(--c-muted); cursor: pointer; padding: 5px; border-radius: 9px; display: grid; place-items: center; transition: color .15s, background .15s; }
.cart-remove:hover { color: var(--c-danger); background: var(--c-soft); }

/* ============ Product attributes as boxes ============ */
.attr-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.attr-box { border: 1px solid var(--c-border); border-radius: 12px; padding: 12px 14px; background: var(--c-surface); display: flex; flex-direction: column; gap: 4px; }
.attr-box .ab-key { font-size: 12px; color: var(--c-muted); }
.attr-box .ab-val { font-size: 14.5px; font-weight: 600; }

/* ============ Notify-when-available form ============ */
.notify-form { display: flex; flex-direction: column; gap: 10px; }
.notify-form input { padding: 12px 14px; border: 1px solid var(--c-border); border-radius: 12px; font: inherit; text-align: center; background: var(--c-bg); }
.notify-form input:focus { outline: none; border-color: var(--c-primary); }

/* ============ Product feature boxes ============ */
.pf-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 0; }
.pf-box {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  border: 1px solid var(--c-border); border-radius: 12px; padding: 12px 8px;
  font-size: 11.5px; color: var(--c-text); background: var(--c-surface); line-height: 1.5;
}
.pf-box svg { color: var(--c-primary); }

/* ============ Product card add-to-cart ============ */
.product-card { display: flex; flex-direction: column; }
.pc-link { display: block; }
.product-card .body { display: flex; flex-direction: column; flex: 1; }
.pc-name { color: inherit; }
.pc-name:hover h3 { color: var(--c-primary); }
.pc-add { margin-top: auto; padding-top: 12px; margin-bottom: 0; }
.pc-add .btn { gap: 6px; }

/* ============ Article "read more" ============ */
.read-more {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 12px;
  font-size: 12.5px; font-weight: 700; color: var(--c-primary);
  border: 1px solid var(--c-border); border-radius: 999px; padding: 6px 14px;
  align-self: flex-start; transition: background .15s, color .15s, border-color .15s;
}
.article-card:hover .read-more { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.article-card .body { display: flex; flex-direction: column; }

/* ============ Contact directions box ============ */
.contact-box.map-box { border-color: var(--c-primary); background: var(--c-soft); }
.contact-box.map-box .ico { background: var(--c-primary); color: #fff; }

/* ============ Floating contact FAB ============ */
.fab-wrap { position: fixed; right: 18px; left: auto; bottom: 18px; z-index: 95; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fab-actions { display: flex; flex-direction: column; gap: 10px; opacity: 0; visibility: hidden; transform: translateY(10px) scale(.9); transition: .2s; }
.fab-wrap.open .fab-actions { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.fab-btn, .fab-item {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #fff; box-shadow: 0 8px 22px -8px rgba(0,0,0,.5);
  transition: transform .15s;
}
.fab-item:hover, .fab-btn:hover { transform: scale(1.07); }
.fab-btn { background: var(--c-primary); }
.fab-wrap.open .fab-btn { background: var(--c-primary-dark); }
.fab-item.call { background: #16a34a; }
.fab-item.telegram { background: #229ED9; }
.fab-item.eitaa { background: #ea6a2b; }
.fab-item.whatsapp { background: #25D366; }
@media (max-width: 768px) {
  /* فاصلهٔ افقی؛ فاصلهٔ عمودی را قانونِ پشته‌ایِ پایین فایل تعیین می‌کند */
  .fab-wrap { right: 16px; }
}

/* ============ Cart toast ============ */
.toast {
  position: fixed; inset-inline: 0; bottom: 22px; margin-inline: auto; width: max-content; max-width: calc(100% - 32px);
  z-index: 120; display: flex; align-items: center; gap: 12px;
  background: var(--c-text); color: #fff; padding: 11px 15px; border-radius: 14px;
  box-shadow: 0 16px 42px -12px rgba(0,0,0,.5); opacity: 0; transform: translateY(16px); transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast .toast-ico { width: 24px; height: 24px; border-radius: 50%; background: #2c7a5c; color: #fff; display: grid; place-items: center; font-size: 13px; flex: 0 0 auto; }
.toast .toast-msg { font-size: 13.5px; font-weight: 600; }
.toast .toast-cta { background: var(--c-primary); color: #fff; font-size: 12.5px; font-weight: 700; padding: 7px 14px; border-radius: 10px; white-space: nowrap; }
@media (max-width: 768px) { .toast { bottom: 92px; } }

/* ============ Force managed font on article/page content ============ */
.prose, .prose p, .prose span, .prose div, .prose li, .prose a,
.prose strong, .prose em, .prose h1, .prose h2, .prose h3, .prose h4,
.prose blockquote, .prose td, .prose th { font-family: var(--font-body) !important; }

/* ============ Equal-size article cards (carousel & grid) ============ */
.article-card .thumb { aspect-ratio: 16 / 10; background: var(--c-soft); overflow: hidden; }
.article-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-card .body { padding: 13px 14px 15px; }
.article-card h3 {
  margin: 0 0 6px; font-size: 14.5px; font-weight: 700; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card p {
  margin: 0 0 4px; font-size: 12.5px; color: var(--c-muted); line-height: 1.9;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 3.8em;
}

/* ============ Product gallery nav ============ */
.gallery-main { position: relative; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--c-text); display: grid; place-items: center;
  font-size: 22px; line-height: 1; box-shadow: 0 4px 16px -6px rgba(0,0,0,.4); transition: background .15s, color .15s;
}
.gallery-nav.prev { inset-inline-start: 10px; }
.gallery-nav.next { inset-inline-end: 10px; }
.gallery-nav:hover { background: var(--c-primary); color: #fff; }

/* ============ Mobile buybar discount ============ */
.mobile-buybar .mb-price { display: flex; flex-direction: column; gap: 1px; white-space: nowrap; }
.mobile-buybar .mb-saleline { display: flex; align-items: center; gap: 7px; }
.mobile-buybar .mb-off { background: var(--c-primary); color: #fff; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 6px; }
.mobile-buybar .old { text-decoration: line-through; color: var(--c-muted); font-size: 11.5px; font-weight: 400; }
.mobile-buybar .mb-now { font-weight: 800; font-size: 16px; }
.mobile-buybar .mb-now small { font-weight: 400; color: var(--c-muted); font-size: 11px; margin-inline-start: 3px; }
.mobile-buybar .mb-save { font-size: 11px; color: #2c7a5c; font-weight: 700; }
/* ============ In-content product/article embeds ============ */
.embed-products { display: grid; gap: 12px; margin: 22px 0; }
.embed-products.cols-1 { grid-template-columns: 1fr; }
.embed-products.cols-2 { grid-template-columns: 1fr 1fr; }
.embed-products.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.embed-product { display: flex; flex-direction: column; text-decoration: none; color: var(--c-text); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 16px; overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s; }
.embed-product:hover { transform: translateY(-3px); border-color: var(--c-primary); box-shadow: 0 14px 32px -18px rgba(0,0,0,.3); }
.embed-product .ep-img { display: block; aspect-ratio: 1; background: var(--c-soft); }
.embed-product .ep-img img { width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; }
.embed-product .ep-info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.embed-product .ep-name { font-weight: 700; font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.embed-product .ep-price { color: var(--c-primary-dark); font-weight: 800; font-size: 14px; margin-top: auto; }
.embed-product .ep-btn { display: block; text-align: center; background: var(--c-primary); color: #fff; border-radius: 10px; padding: 8px; font-size: 12.5px; font-weight: 700; margin-top: 4px; }
.embed-products.cols-1 .embed-product { flex-direction: row; }
.embed-products.cols-1 .ep-img { flex: 0 0 150px; aspect-ratio: auto; }
.embed-article { margin: 22px 0; }
.embed-article a { display: flex; gap: 14px; text-decoration: none; color: var(--c-text); background: var(--c-soft); border: 1px solid var(--c-border); border-radius: 16px; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.embed-article a:hover { border-color: var(--c-primary); box-shadow: 0 14px 32px -18px rgba(0,0,0,.3); }
.embed-article .ea-img { flex: 0 0 130px; }
.embed-article .ea-img img { width: 100%; height: 100%; object-fit: cover; min-height: 120px; margin: 0; border-radius: 0; }
.embed-article .ea-info { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.embed-article .ea-title { font-weight: 800; font-size: 15px; }
.embed-article .ea-desc { font-size: 12.5px; color: var(--c-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.embed-article .ea-btn { align-self: flex-start; margin-top: auto; color: var(--c-primary); font-weight: 700; font-size: 12.5px; border: 1px solid var(--c-border); border-radius: 999px; padding: 5px 13px; }
@media (max-width: 640px) {
  .embed-products.cols-2, .embed-products.cols-3 { grid-template-columns: 1fr 1fr; }
  .embed-products.cols-1 .embed-product { flex-direction: column; }
  .embed-products.cols-1 .ep-img { flex: none; aspect-ratio: 1; }
  .embed-article a { flex-direction: column; }
  .embed-article .ea-img { flex: none; aspect-ratio: 16/9; }
}

/* ============ Embed boxes v2 (pro) ============ */
.embed-product .ep-img { position: relative; }
.embed-product .ep-off { position: absolute; top: 8px; inset-inline-start: 8px; background: var(--c-primary); color:#fff; font-size:11px; font-weight:800; padding:2px 8px; border-radius:999px; }
.embed-product .ep-priceline { display:flex; align-items:baseline; gap:8px; margin-top:auto; flex-wrap:wrap; }
.embed-product .ep-old { text-decoration: line-through; color: var(--c-muted); font-size: 11.5px; }
.embed-article .ea-eyebrow { font-size: 11px; color: var(--c-primary); font-weight: 700; }

/* ============ باکس تک‌محصولی — طراحی حرفه‌ای ============ */
.embed-products.cols-1 { margin: 26px 0; }
.embed-products.cols-1 .embed-product {
  flex-direction: row;
  align-items: stretch;
  gap: 18px;
  padding: 14px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  background: var(--c-surface);
  background:
    radial-gradient(130% 150% at 100% 0, color-mix(in srgb, var(--c-primary) 8%, transparent) 0%, transparent 52%),
    var(--c-surface);
}
.embed-products.cols-1 .embed-product::before {
  content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px;
  background: linear-gradient(180deg, var(--c-primary), var(--c-primary-dark));
}
.embed-products.cols-1 .embed-product:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--c-primary) 45%, var(--c-border));
  box-shadow: 0 26px 50px -28px color-mix(in srgb, var(--c-primary) 60%, rgba(0,0,0,.55));
}
.embed-products.cols-1 .ep-img {
  flex: 0 0 190px; aspect-ratio: 1; border-radius: 14px; overflow: hidden; align-self: center;
}
.embed-products.cols-1 .ep-img img { transition: transform .45s ease; }
.embed-products.cols-1 .embed-product:hover .ep-img img { transform: scale(1.06); }
.embed-products.cols-1 .ep-off {
  top: 10px; inset-inline-start: 10px; padding: 4px 11px; font-size: 11px;
  box-shadow: 0 8px 18px -8px var(--c-primary);
}
.embed-products.cols-1 .ep-info { padding: 6px 6px 6px 4px; gap: 9px; justify-content: center; }
.embed-products.cols-1 .ep-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .2px; color: var(--c-primary-dark);
}
.embed-products.cols-1 .ep-eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--c-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-primary) 20%, transparent);
}
.embed-products.cols-1 .ep-name {
  font-size: 18px; font-weight: 800; line-height: 1.6; -webkit-line-clamp: 2;
  font-family: var(--font-display, inherit);
}
.embed-products.cols-1 .ep-desc {
  font-size: 13px; color: var(--c-muted); line-height: 1.95;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.embed-products.cols-1 .ep-priceline { margin-top: 4px; align-items: baseline; gap: 10px; }
.embed-products.cols-1 .ep-price { font-size: 21px; font-weight: 800; color: var(--c-primary-dark); }
.embed-products.cols-1 .ep-price small { font-size: 12px; font-weight: 500; color: var(--c-muted); margin-inline-start: 3px; }
.embed-products.cols-1 .ep-old { font-size: 13px; }
.embed-products.cols-1 .ep-btn {
  align-self: flex-start; width: auto; margin-top: 8px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 999px; font-size: 13.5px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
  box-shadow: 0 14px 26px -14px var(--c-primary);
}
.embed-products.cols-1 .ep-arrow { font-weight: 900; transition: transform .25s ease; }
.embed-products.cols-1 .embed-product:hover .ep-arrow { transform: translateX(-4px); }

@media (max-width: 640px) {
  .embed-products.cols-1 .embed-product { flex-direction: column; gap: 14px; padding: 12px; }
  .embed-products.cols-1 .embed-product::before { inset-block: auto; inset-inline: 0; inset-block-start: 0; width: auto; height: 4px; }
  .embed-products.cols-1 .ep-img { flex: none; width: 100%; aspect-ratio: 16/10; align-self: stretch; }
  .embed-products.cols-1 .ep-info { padding: 0 4px 6px; }
  .embed-products.cols-1 .ep-btn { align-self: stretch; justify-content: center; }
}

/* ============ استوری‌ها ============ */
.stories-tray {
  display: flex; gap: 16px; overflow-x: auto; padding: 16px 2px 6px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.stories-tray::-webkit-scrollbar { display: none; }
.story-bubble {
  flex: 0 0 auto; background: none; border: 0; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 74px;
}
.sb-ring {
  display: block; width: 68px; height: 68px; border-radius: 50%; padding: 3px;
  background: conic-gradient(from 210deg, var(--c-primary), var(--c-accent), #6B7280, var(--c-primary));
  transition: transform .18s ease;
}
.story-bubble:hover .sb-ring { transform: scale(1.05); }
.sb-img {
  display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  background: var(--c-soft); border: 2.5px solid var(--c-surface);
}
.sb-img img { width: 100%; height: 100%; object-fit: cover; }
.sb-ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--c-primary); font-size: 20px; }
.sb-label {
  font-size: 11.5px; color: var(--c-text); max-width: 74px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* نمایشگر استوری */
.story-viewer {
  position: fixed; inset: 0; z-index: 1000; background: rgba(10,10,14,.92);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
}
.story-viewer[hidden] { display: none; }
.sv-stage {
  position: relative; width: min(440px, 100vw); height: min(88vh, 860px);
  background: #000; border-radius: 18px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8);
}
.sv-stage img, .sv-stage video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.sv-progress {
  position: fixed; top: max(14px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  width: min(420px, 92vw); display: flex; gap: 4px; z-index: 3;
}
.sv-bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.32); overflow: hidden; }
.sv-bar > i { display: block; height: 100%; width: 0; background: #fff; border-radius: 3px; }
.sv-title {
  position: fixed; top: max(26px, calc(env(safe-area-inset-top) + 12px)); left: 50%; transform: translateX(-50%);
  width: min(420px, 92vw); color: #fff; font-size: 13.5px; font-weight: 700; z-index: 3;
  text-shadow: 0 1px 6px rgba(0,0,0,.6); padding-top: 10px; text-align: right;
}
.sv-close {
  position: fixed; top: max(20px, env(safe-area-inset-top)); inset-inline-end: 16px; z-index: 4;
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.16); color: #fff; font-size: 22px; line-height: 1;
}
.sv-close:hover { background: rgba(255,255,255,.28); }
.sv-nav {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.16); color: #fff; font-size: 24px; line-height: 1;
  display: grid; place-items: center; transition: background .15s, transform .15s;
  backdrop-filter: blur(2px);
}
.sv-nav:hover { background: rgba(255,255,255,.3); }
.sv-nav:active { transform: translateY(-50%) scale(.92); }
.sv-nav.prev { inset-inline-start: 18px; }   /* هماهنگ با اسلایدر سایت: چپ = قبلی */
.sv-nav.next { inset-inline-end: 18px; }      /* راست = بعدی */
@media (max-width: 480px) { .sv-nav { width: 38px; height: 38px; font-size: 21px; } .sv-nav.prev { inset-inline-start: 10px; } .sv-nav.next { inset-inline-end: 10px; } }
.sv-bottom {
  position: fixed; bottom: max(24px, calc(env(safe-area-inset-bottom) + 14px)); left: 50%; transform: translateX(-50%);
  z-index: 4; width: min(420px, 90vw); display: flex; align-items: center; gap: 12px; justify-content: center;
}
.sv-cta {
  flex: 1; text-align: center; background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
  color: #fff; font-weight: 800; font-size: 14px; padding: 13px 22px; border-radius: 999px; text-decoration: none;
  box-shadow: 0 14px 34px -12px rgba(0,0,0,.7);
}
.sv-cta[hidden] { display: none; }
.sv-like {
  flex: 0 0 auto; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; border: 0; cursor: pointer;
  background: transparent; color: #fff; padding: 4px; font: inherit; font-weight: 700;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
}
.sv-like svg { fill: none; stroke: #fff; stroke-width: 2; transition: fill .18s, transform .18s, stroke .18s; }
.sv-like:hover svg { stroke: #ffd0dc; }
.sv-like:active svg { transform: scale(.85); }
.sv-like.liked svg { fill: #ff3b6b; stroke: #ff3b6b; animation: heartPop .3s ease; }
@keyframes heartPop { 0% { transform: scale(.8); } 50% { transform: scale(1.25); } 100% { transform: scale(1); } }
.sv-like-count { font-size: 11px; }
.sv-like-count:empty { display: none; }
@media (max-width: 480px) {
  .sv-stage { width: 100vw; height: 100dvh; border-radius: 0; }
}

/* ============ فیلدهای مشترکِ تأیید موبایل (پاپ‌آپ تسویه) ============ */
.ag-icon {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 16px;
  color: var(--c-primary); background: color-mix(in srgb, var(--c-primary) 12%, #fff);
}
.ag-field input, .otp-box {
  width: 100%; border: 1.5px solid var(--c-border); border-radius: 12px; background: #fff;
  font: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
.ag-field input { padding: 13px 15px; font-size: 16px; letter-spacing: 1px; text-align: center; margin-bottom: 14px; }
.ag-field input:focus, .otp-box:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary) 16%, transparent); }
.otp-inputs { display: flex; gap: 10px; justify-content: center; margin-bottom: 16px; }
.otp-box { width: 54px; height: 60px; font-size: 24px; font-weight: 800; text-align: center; }
.ag-error { color: var(--c-danger); font-size: 13px; margin-bottom: 12px; }
.ag-debug { background: #fff8e6; border: 1px dashed #e6c34d; color: #8a6d1a; font-size: 12.5px; padding: 8px 12px; border-radius: 10px; margin-bottom: 12px; direction: ltr; text-align: center; }
.ag-back { display: block; text-align: center; margin-top: 14px; color: var(--c-muted); font-size: 13px; }
.ag-back:hover { color: var(--c-primary); }
.ag-foot { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; font-size: 13px; color: var(--c-muted); flex-wrap: wrap; }
.ag-link { background: none; border: 0; color: var(--c-primary); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
@media (max-width: 820px) {
  .otp-box { width: 46px; height: 54px; font-size: 22px; }
}

/* ============ پاپ‌آپ تأیید موبایل (تسویه) ============ */
.otp-modal {
  position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center;
  background: rgba(12,12,18,.55); backdrop-filter: blur(4px); padding: 18px;
}
.otp-modal[hidden] { display: none; }
.otp-modal-card {
  position: relative; width: 100%; max-width: 440px; background: var(--c-surface);
  border-radius: 20px; padding: 30px 28px 24px; box-shadow: 0 40px 90px -30px rgba(0,0,0,.6);
  animation: otpPop .22s ease;
}
@keyframes otpPop { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.otp-modal-card h3 { font-family: var(--font-display); font-size: 20px; font-weight: 800; margin: 0 0 8px; }
.otp-modal-card p { color: var(--c-muted); font-size: 14px; line-height: 1.9; margin: 0 0 18px; }
.otp-modal-x {
  position: absolute; inset-block-start: 14px; inset-inline-end: 14px; width: 34px; height: 34px;
  border: 0; border-radius: 50%; background: var(--c-soft); color: var(--c-muted); font-size: 20px; cursor: pointer;
}
.otp-modal-x:hover { background: var(--c-border); color: var(--c-text); }

/* ============ توضیحات محصول: خلاصه + نمایش بیشتر ============ */
.desc-clamp { position: relative; max-height: 300px; overflow: hidden; transition: max-height .35s ease; }
.desc-clamp.open { max-height: 6000px; }
.desc-clamp:not(.open)::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 90px; pointer-events: none;
  background: linear-gradient(to top, var(--c-surface), transparent);
}
.desc-toggle {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  background: var(--c-soft); color: var(--c-primary-dark); border: 1px solid var(--c-border);
  border-radius: 999px; padding: 9px 20px; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.desc-toggle:hover { border-color: var(--c-primary); background: color-mix(in srgb, var(--c-primary) 8%, var(--c-soft)); }
.desc-toggle::after { content: "▾"; font-size: 11px; transition: transform .2s; }
.desc-toggle.open::after { transform: rotate(180deg); }

/* ============ کمبوباکس استان/شهر ============ */
.combo-wrap { position: relative; }
.combo-list {
  position: absolute; z-index: 30; inset-inline: 0; top: calc(100% + 4px);
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 12px;
  box-shadow: 0 20px 44px -18px rgba(0,0,0,.28); max-height: 240px; overflow-y: auto; padding: 5px;
}
.combo-list[hidden] { display: none; }
.combo-opt {
  display: block; width: 100%; text-align: right; border: 0; background: transparent;
  padding: 9px 12px; border-radius: 9px; font: inherit; font-size: 14px; cursor: pointer; color: var(--c-text);
}
.combo-opt:hover { background: var(--c-soft); color: var(--c-primary-dark); }

/* ============ بلوک انیمیشن (دو عکس متحرک با اسکرول) ============ */
/* ---------- بلوک انیمیشن: دو تصویر که از بیرونِ قاب وارد می‌شوند ----------
   محلِ سکونِ هر تصویر با چیدمان flex تعیین می‌شود (نه با عدد حدسی)، و
   جاوااسکریپت فقط آن را از بیرونِ صفحه تا همان‌جا می‌آورد. */
.anim-block { overflow: hidden; }
.anim-stage {
  --anim-gap: 30px;
  --anim-h: clamp(200px, 40vw, 460px);
  direction: ltr;                 /* ترتیب فیزیکی ثابت: فرزند اول چپ، دوم راست */
  display: flex; align-items: center; justify-content: center;
  gap: var(--anim-gap);
  min-height: var(--anim-h);
}
/* «چسبیدن به لبه»: تصویر فقط تا انتهای عرض خودش وارد می‌شود */
.anim-stage.pin-left  { justify-content: flex-start; }
.anim-stage.pin-right { justify-content: flex-end; }
.anim-stage.pin-both  { justify-content: space-between; }

.anim-img {
  flex: 0 1 auto; min-width: 0; line-height: 0;
  will-change: transform;
  /* بدون transition — حرکت با هر فریمِ اسکرول ساخته می‌شود؛ ترنزیشن هم
     حرکت را عقب می‌انداخت و هم اندازه‌گیریِ محلِ سکون را خراب می‌کرد. */
}
.anim-img img {
  display: block; max-width: 100%; max-height: var(--anim-h);
  width: auto; height: auto; object-fit: contain;
}
@media (max-width: 640px) {
  .anim-stage { --anim-h: 200px; --anim-gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .anim-img { transition: none; transform: none !important; }
}

/* ============ بلوک بنر ============ */
.home-banner { display: block; border-radius: var(--radius); overflow: hidden; }
.home-banner img { width: 100%; height: auto; display: block; }
.home-banner .bn-mobile { display: none; }
@media (max-width: 768px) {
  .home-banner.banner-has-mobile .bn-desktop { display: none; }
  .home-banner.banner-has-mobile .bn-mobile  { display: block; }
  .home-banner.banner-hide-mobile { display: none; }
}

/* ============ دسته‌بندی طرح ۲ (کارت تصویری) ============ */
.cat-grid2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat-card2 { position: relative; display: block; aspect-ratio: 3/4; border-radius: 18px; overflow: hidden; background: var(--c-soft); text-decoration: none; }
.cat-card2 img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.cat-card2:hover img { transform: scale(1.08); }

/* گرادیان پایه برای خوانایی عنوان */
.cat-card2 .cc2-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(0,0,0,.74) 0%, rgba(0,0,0,.15) 48%, transparent 72%); transition: opacity .4s ease; }

/* لایهٔ شیشه‌ای (glassmorphism) که هنگام هاور ظاهر می‌شود */
.cat-card2::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: rgba(18,18,24,.18);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  opacity: 0; transition: opacity .4s ease;
}
.cat-card2:hover::after { opacity: 1; }

/* عنوان + دکمه، بالای همهٔ لایه‌ها */
.cat-card2 .cc2-body { position: absolute; inset: 0; z-index: 3; padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 12px; text-align: center; }
.cat-card2 .cc2-title { color: #fff; font-family: var(--font-display); font-size: clamp(16px, 2vw, 20px); font-weight: 800; text-shadow: 0 2px 10px rgba(0,0,0,.55); transition: transform .4s ease; }
.cat-card2:hover .cc2-title { transform: translateY(-4px); }

.cat-card2 .cc2-btn {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  background: rgba(255,255,255,.2); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; border: 1px solid rgba(255,255,255,.45); border-radius: 999px;
  padding: 8px 18px; font-size: 13px; font-weight: 700; line-height: 1;
  opacity: 0; transform: translateY(10px);
  transition: opacity .35s ease, transform .35s ease, background .15s, border-color .15s;
}
.cat-card2:hover .cc2-btn { opacity: 1; transform: translateY(0); }
.cat-card2 .cc2-btn:hover { background: var(--c-primary); border-color: var(--c-primary); }

/* موبایل/لمسی: هاور نداریم، پس دکمه و عنوان همیشه دیده شوند و دکمه تک‌خطی بماند */
@media (max-width: 640px) {
  .cat-grid2 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-card2 .cc2-body { padding: 12px; gap: 9px; }
  .cat-card2 .cc2-btn { opacity: 1; transform: none; padding: 7px 14px; font-size: 11.5px; white-space: nowrap; }
}
@media (hover: none) {
  .cat-card2 .cc2-btn { opacity: 1; transform: none; }
}

/* آیکن اختصاصی دکمهٔ شناور */
.fab-item .fab-ic { width: 22px; height: 22px; object-fit: contain; display: block; }

/* ---------------- رسید پرداخت (صفحهٔ پس از پرداخت) ---------------- */
.receipt {
  max-width: 620px; margin: 30px auto; background: var(--c-surface);
  border: 1px solid var(--c-border); border-radius: 22px; padding: 30px 30px 24px;
  box-shadow: 0 24px 60px -34px rgba(0,0,0,.35); position: relative; overflow: hidden;
}
.receipt::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--c-primary), var(--c-accent, var(--c-primary))); }
.rc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.rc-brand { display: flex; align-items: center; gap: 10px; }
.rc-brand img { height: 34px; width: auto; object-fit: contain; }
.rc-brand .rc-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c-primary); }
.rc-brand .rc-name { font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.rc-badge { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; }
.rc-badge.ok { background: #e7f7ee; color: #1c9a55; }
.rc-hero { text-align: center; padding: 8px 0 20px; }
.rc-check { width: 62px; height: 62px; border-radius: 50%; background: #e7f7ee; color: #1c9a55; display: grid; place-items: center; margin: 0 auto 14px; animation: rcpop .4s ease; }
@keyframes rcpop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.rc-hero h1 { font-family: var(--font-display); font-size: 21px; margin: 0 0 6px; }
.rc-hero p { color: var(--c-muted); margin: 0; font-size: 14px; }
.rc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; background: var(--c-bg); border-radius: 14px; padding: 16px 18px; margin-bottom: 18px; }
.rc-meta > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rc-meta .k { font-size: 11.5px; color: var(--c-muted); }
.rc-meta .v { font-size: 14px; font-weight: 600; word-break: break-word; }
.rc-items { border: 1px solid var(--c-border); border-radius: 14px; overflow: hidden; margin-bottom: 16px; }
.rc-items table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rc-items th { background: var(--c-bg); text-align: right; padding: 10px 14px; font-weight: 700; color: var(--c-muted); font-size: 12.5px; }
.rc-items td { padding: 11px 14px; border-top: 1px solid var(--c-border); text-align: right; }
.rc-items td:nth-child(2), .rc-items th:nth-child(2) { text-align: center; }
.rc-variant { display: block; font-size: 11.5px; color: var(--c-muted); margin-top: 2px; }
.rc-totals { border-top: 1px dashed var(--c-border); padding-top: 14px; }
.rc-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 14px; }
.rc-row.disc span:last-child { color: #1c9a55; }
.rc-row.grand { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--c-border); font-family: var(--font-display); font-weight: 800; font-size: 17px; }
.rc-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 22px 0 6px; }
.rc-foot { text-align: center; color: var(--c-muted); font-size: 12.5px; margin: 12px 0 0; }
@media (max-width: 560px) { .receipt { padding: 22px 18px; margin: 16px auto; } .rc-meta { grid-template-columns: 1fr; } }
@media print {
  body * { visibility: hidden; }
  .receipt, .receipt * { visibility: visible; }
  .receipt { position: absolute; inset-inline: 0; top: 0; margin: 0 auto; box-shadow: none; border: none; }
  .rc-actions, .header, .footer, .topbar, .fab-wrap { display: none !important; }
}

/* ============================================================
   فرم‌ساز — نمایش فرم در صفحه‌ها و مقاله‌ها
   ============================================================ */
.fb-wrap {
  border: 1px solid var(--c-border); border-radius: var(--radius);
  background: var(--c-surface); overflow: hidden; margin: 26px 0;
}
/* دوستونه: فرم و رسانه هم‌ارتفاع */
.fb-wrap.fb-two { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.fb-wrap.fb-two .fb-media { order: 2; }
.fb-wrap.fb-two.fb-media-start .fb-media { order: 0; }

.fb-media { position: relative; min-height: 100%; background: var(--c-soft); }
.fb-media img, .fb-media video {
  display: block; width: 100%; height: 100%; min-height: 260px;
  object-fit: cover; background: #000;
}
.fb-body { padding: 26px 26px 28px; display: flex; flex-direction: column; justify-content: center; }
.fb-title { font-family: var(--font-display); font-size: 20px; font-weight: 800; margin: 0 0 8px; }
.fb-desc { color: var(--c-muted); font-size: 13.5px; line-height: 2; margin: 0 0 18px; }

.fb-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.fb-field { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.fb-field.fb-half { grid-column: span 1; }
.fb-field > label { font-size: 13px; font-weight: 600; }
.fb-field > label em { color: var(--c-danger); font-style: normal; }
.fb-field input[type="text"], .fb-field input[type="email"], .fb-field input[type="tel"],
.fb-field input[type="number"], .fb-field input[type="date"], .fb-field input[type="file"],
.fb-field select, .fb-field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--c-border); border-radius: 12px;
  font: inherit; background: var(--c-bg); color: var(--c-text);
}
.fb-field textarea { resize: vertical; min-height: 100px; }
.fb-field input:focus, .fb-field select:focus, .fb-field textarea:focus {
  outline: none; border-color: var(--c-primary);
}
.fb-opts { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.fb-opt { display: flex; align-items: center; gap: 7px; font-size: 13.5px; cursor: pointer; }
.fb-accept { line-height: 1.9; align-items: flex-start; }
.fb-accept input { margin-top: 4px; }
.fb-hint { font-size: 11.5px; color: var(--c-muted); }
.fb-submit { margin-top: 18px; width: 100%; }
.fb-hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

.fb-success {
  border: 1px solid var(--c-accent); background: color-mix(in srgb, var(--c-accent) 12%, var(--c-surface));
  color: var(--c-text); border-radius: 12px; padding: 16px 18px; font-size: 14px; line-height: 2;
}
.fb-errors {
  border: 1px solid var(--c-danger); background: color-mix(in srgb, var(--c-danger) 8%, var(--c-surface));
  border-radius: 12px; padding: 12px 16px; margin-bottom: 16px;
}
.fb-errors ul { margin: 0; padding-inline-start: 18px; font-size: 13px; color: var(--c-danger); line-height: 2; }

@media (max-width: 800px) {
  .fb-wrap.fb-two { grid-template-columns: 1fr; }
  .fb-wrap.fb-two .fb-media { order: 0; }
  .fb-media img, .fb-media video { min-height: 200px; max-height: 320px; }
  .fb-body { padding: 20px 18px 22px; }
  .fb-fields { grid-template-columns: 1fr; }
  .fb-field.fb-half { grid-column: 1 / -1; }
}

/* ============ پرسش‌های متداول (FAQ schema) ============ */
.faq-block { margin: 34px 0 10px; }
.faq-title { font-family: var(--font-display); font-size: 20px; font-weight: 800; margin: 0 0 14px; }
.faq-list { display: grid; gap: 10px; }
.faq-item {
  border: 1px solid var(--c-border); border-radius: 14px; background: var(--c-surface);
  padding: 0 16px; transition: border-color .2s;
}
.faq-item[open] { border-color: var(--c-primary); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 15px 0; font-weight: 700; font-size: 14.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-size: 19px; color: var(--c-primary); flex: 0 0 auto; line-height: 1;
  transition: transform .2s;
}
.faq-item[open] summary::after { content: '−'; }
.faq-a { padding: 0 0 16px; font-size: 13.5px; line-height: 2.1; color: var(--c-muted); }

/* ============================================================
   نوار پایین سایت (Bottom Bar) — چهار استایل: کلاسیک، شناور، کپسولی، داک
   ============================================================ */
.bottombar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
  display: none; align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottombar .bb-item {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 9px 4px 8px; color: var(--c-muted); font-size: 11px; font-weight: 600;
  transition: color .18s, background .18s; text-align: center;
}
.bottombar .bb-lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bottombar .bb-ic { position: relative; display: grid; place-items: center; line-height: 0; }
.bottombar .bb-badge {
  position: absolute; top: -6px; inset-inline-end: -9px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--c-primary); color: #fff;
  font-size: 10px; font-weight: 800; display: grid; place-items: center; line-height: 1;
}
.bottombar .bb-item.on { color: var(--c-primary); }

/* ---- استایل ۱: کلاسیک (نوار چسبیده به لبه) ---- */
.bottombar.bb-classic {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  box-shadow: 0 -4px 22px rgba(0, 0, 0, .07);
}
.bottombar.bb-classic .bb-item.on { background: color-mix(in srgb, var(--c-primary) 8%, transparent); }
.bottombar.bb-classic .bb-item.on::before {
  content: ''; position: absolute; top: 0; inset-inline-start: 18%; width: 64%; height: 3px;
  border-radius: 0 0 4px 4px; background: var(--c-primary);
}
.bottombar.bb-classic .bb-item { position: relative; }

/* ---- استایل ۲: شناور (کارت گرد با فاصله از لبه) ---- */
.bottombar.bb-floating {
  inset-inline: 12px; bottom: 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 20px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .14);
  overflow: hidden;
  margin-bottom: env(safe-area-inset-bottom, 0);
  padding-bottom: 0;
}
.bottombar.bb-floating .bb-item { padding: 10px 4px; border-radius: 16px; }
.bottombar.bb-floating .bb-item.on {
  background: var(--c-primary); color: #fff;
}
.bottombar.bb-floating .bb-item.on .bb-badge { background: #fff; color: var(--c-primary); }

/* ---- استایل ۳: کپسولی (آیتم فعال با عنوان در یک کپسول رنگی باز می‌شود) ---- */
.bottombar.bb-pill {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  box-shadow: 0 -4px 22px rgba(0, 0, 0, .07);
  justify-content: space-around; gap: 4px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0));
}
.bottombar.bb-pill .bb-item {
  flex: 0 1 auto; flex-direction: row; gap: 7px;
  min-height: 46px; padding: 0 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700;
  transition: background .22s, color .22s, padding .22s;
}
.bottombar.bb-pill .bb-item:not(.on) .bb-lbl {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.bottombar.bb-pill .bb-item.on {
  flex: 0 0 auto; padding: 0 18px;
  background: color-mix(in srgb, var(--c-primary) 13%, transparent); color: var(--c-primary);
}

/* ---- استایل ۴: داک (کپسول تیرهٔ شناور، فقط آیکن، نقطهٔ زیر آیتم فعال) ---- */
.bottombar.bb-dock {
  inset-inline: 18px; bottom: 14px;
  justify-content: space-around;
  padding: 6px 8px;
  background: color-mix(in srgb, var(--c-text) 94%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
  margin-bottom: env(safe-area-inset-bottom, 0);
}
.bottombar.bb-dock .bb-item {
  flex: 1 1 0; position: relative; min-height: 50px; padding: 0;
  color: rgba(255, 255, 255, .62); border-radius: 999px;
}
.bottombar.bb-dock .bb-lbl {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.bottombar.bb-dock .bb-ic { isolation: isolate; }
.bottombar.bb-dock .bb-item.on { color: #fff; }
.bottombar.bb-dock .bb-item.on .bb-ic::before {
  content: ''; position: absolute; inset: -8px -14px; z-index: -1;
  border-radius: 999px; background: rgba(255, 255, 255, .14);
}
.bottombar.bb-dock .bb-item.on::after {
  content: ''; position: absolute; bottom: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: #fff;
}
.bottombar.bb-dock .bb-badge { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-text) 94%, #000); }
body.bb-style-dock { --stack-gap: 10px; }
@media (max-width: 768px) {
  body.bb-style-dock.has-bottombar .mobile-buybar,
  body.bb-style-dock.has-bottombar .cart-sticky {
    inset-inline: 12px; border: 1px solid var(--c-border); border-top: 1px solid var(--c-border);
    border-radius: 18px; box-shadow: 0 8px 28px rgba(0,0,0,.14);
    padding-bottom: 10px;
  }
}

/* ---- چیدمان پشته‌ای: نوار پایین → نوار خرید → دکمهٔ تماس ----
   ارتفاع‌ها را جاوااسکریپت اندازه می‌گیرد و در --bb-h و --buybar-h می‌گذارد،
   پس هر ترکیبی از این سه (و هر دو استایل نوار) بدون هم‌پوشانی می‌نشیند. */
:root { --bb-h: 0px; --buybar-h: 0px; --stack-gap: 0px; --bb-safe: env(safe-area-inset-bottom, 0px); }
body.bb-style-floating { --stack-gap: 10px; }

/* در استایل شناور، نوار خرید هم کارتی می‌شود تا با نوار پایین یک‌دست باشد */
@media (max-width: 768px) {
  body.bb-style-floating.has-bottombar .mobile-buybar,
  body.bb-style-floating.has-bottombar .cart-sticky {
    inset-inline: 12px; border: 1px solid var(--c-border); border-top: 1px solid var(--c-border);
    border-radius: 18px; box-shadow: 0 8px 28px rgba(0,0,0,.14);
    padding-bottom: 10px;
  }
}

/* نمایش فقط در موبایل و تبلت کوچک */
@media (max-width: 860px) {
  .bottombar { display: flex; }
  body.has-bottombar { padding-bottom: calc(var(--bb-h, 74px) + 10px); }
}
/* دکمهٔ شناور تماس همیشه بالای هر دو نوار می‌ماند */
body .fab-wrap {
  bottom: calc(var(--bb-h, 0px) + var(--buybar-h, 0px) + var(--stack-gap, 0px) + 18px);
  transition: bottom .18s ease;
}
@media print { .bottombar { display: none !important; } }

/* ============================================================
   گردونهٔ شانس
   ============================================================ */
.wheel-page { max-width: 980px; }
.wheel-head { text-align: center; margin-bottom: 28px; }
.wheel-head h1 { font-family: var(--font-display); font-size: clamp(22px, 3.4vw, 32px); font-weight: 800; margin: 0 0 8px; }
.wheel-head p { color: var(--c-muted); font-size: 14.5px; line-height: 2; margin: 0; }

.wheel-stage { display: grid; grid-template-columns: 1fr 300px; gap: 34px; align-items: center; }
.wheel-box { position: relative; max-width: 420px; margin: 0 auto; width: 100%; }
.wheel-box svg { width: 100%; height: auto; display: block; }
.wheel-spinner { transform: rotate(0deg); position: relative; will-change: transform; }
.wheel-label { font-size: 8.5px; font-weight: 700; fill: #fff; font-family: var(--font-body); }

.wheel-pointer {
  position: absolute; top: -12px; inset-inline-start: 50%; transform: translateX(50%) rotate(180deg);
  z-index: 3; filter: drop-shadow(0 3px 5px rgba(0,0,0,.25));
}
.wheel-hub {
  position: absolute; top: 50%; inset-inline-start: 50%; transform: translate(50%, -50%);
  width: 23%; aspect-ratio: 1; border-radius: 50%; background: #fff;
  display: grid; place-items: center; overflow: hidden; z-index: 2;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.wheel-hub img { width: 76%; height: 76%; object-fit: contain; }
.wheel-hub span { font-weight: 800; font-size: 13px; color: var(--c-primary-dark); text-align: center; padding: 0 4px; }

.wheel-side { display: grid; gap: 12px; align-content: start; }
.wheel-note {
  background: var(--c-soft); border-radius: 13px; padding: 13px 15px;
  font-size: 13.5px; line-height: 2; color: var(--c-text);
}
.wheel-btn { font-size: 16px; font-weight: 800; padding: 14px; }
.wheel-btn:disabled { opacity: .55; cursor: not-allowed; }

.wheel-result {
  border: 2px dashed var(--c-primary); border-radius: 15px; padding: 16px;
  background: color-mix(in srgb, var(--c-primary) 7%, var(--c-surface)); text-align: center;
}
.wheel-result.lose { border-color: var(--c-border); background: var(--c-soft); }
.wheel-result .wr-title { font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.wheel-result .wr-reward { font-size: 13.5px; color: var(--c-muted); line-height: 2; }
.wheel-result .wr-code {
  margin-top: 12px; display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap;
}
.wheel-result .wr-code code {
  direction: ltr; font-size: 15px; font-weight: 800; letter-spacing: 1px;
  background: #fff; border: 1px dashed var(--c-primary); border-radius: 10px; padding: 8px 14px; color: var(--c-primary-dark);
}
.wr-copy { border: 0; background: var(--c-primary); color: #fff; border-radius: 9px; padding: 8px 13px; cursor: pointer; font-family: inherit; font-size: 12.5px; }

.wheel-history { border-top: 1px solid var(--c-border); padding-top: 12px; }
.wheel-history h3 { font-size: 13.5px; margin: 0 0 9px; font-weight: 800; }
.wh-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 12.5px; padding: 6px 0; border-bottom: 1px dashed var(--c-border); }
.wh-row code { direction: ltr; color: var(--c-primary-dark); font-size: 12px; }

@media (max-width: 820px) {
  .wheel-stage { grid-template-columns: 1fr; gap: 24px; }
  .wheel-box { max-width: 330px; }
}

/* ============================================================
   گنج را پیدا کن — صندوقچهٔ چسبان
   ============================================================ */
/* صندوقچه در گوشهٔ مقابلِ دکمهٔ تماس می‌نشیند (تماس: راست، صندوق: چپ)
   وگرنه روی هم می‌افتادند و صندوق زیر دکمهٔ تماس پنهان و غیرقابل‌کلیک می‌شد. */
.treasure-chest {
  /* ترتیب مهم است: اول ریست منطقی، بعد مقدار فیزیکی — وگرنه شورت‌هند
     inset-inline مقدار left را دوباره auto می‌کند. */
  position: fixed; inset-inline: auto; left: 16px; right: auto; bottom: 16px; z-index: 96;
  width: 58px; height: 58px; border: 0; padding: 0; cursor: pointer;
  border-radius: 16px; background: linear-gradient(155deg, #f7c66a, #d99a2b);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
  display: grid; place-items: center; color: #6b4407;
  animation: chestFloat 2.6s ease-in-out infinite;
}
.treasure-chest:hover { transform: scale(1.06); }
.treasure-chest::after {
  content: ''; position: absolute; inset: -5px; border-radius: 20px;
  border: 2px solid rgba(247, 198, 106, .55); animation: chestPulse 2.2s ease-out infinite;
}
@keyframes chestFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes chestPulse { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) {
  .treasure-chest, .treasure-chest::after { animation: none; }
}
/* هم‌ارتفاع با دکمهٔ تماس، بالای نوار پایین و نوار خرید */
body .treasure-chest {
  bottom: calc(var(--bb-h, 0px) + var(--buybar-h, 0px) + var(--stack-gap, 0px) + 18px);
  transition: bottom .18s ease;
}

.treasure-modal {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: rgba(20, 12, 20, .55); padding: 20px; backdrop-filter: blur(2px);
}
.treasure-modal[hidden] { display: none; }
.tm-card {
  width: min(420px, 100%); background: var(--c-surface); border-radius: 20px;
  padding: 26px 24px; text-align: center; box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.tm-emoji { font-size: 46px; line-height: 1; margin-bottom: 10px; }
.tm-card h3 { font-family: var(--font-display); font-size: 19px; font-weight: 800; margin: 0 0 8px; }
.tm-card p { color: var(--c-muted); font-size: 13.5px; line-height: 2.1; margin: 0 0 16px; }
.tm-code {
  direction: ltr; display: inline-block; font-size: 17px; font-weight: 800; letter-spacing: 1.5px;
  background: var(--c-soft); border: 1px dashed var(--c-primary); border-radius: 12px;
  padding: 11px 18px; color: var(--c-primary-dark); margin-bottom: 14px;
}
.tm-actions { display: grid; gap: 8px; }

/* حالت پیش‌نمایش صندوق برای مدیر */
.treasure-chest.is-preview { background: linear-gradient(155deg, #a8b7f0, #6c8ae4); color: #fff; animation: none; }
.treasure-chest.is-preview::after { display: none; }
.treasure-chest { overflow: visible; }
.treasure-chest .tc-preview {
  position: absolute; inset-inline: auto; top: -9px; left: auto; right: -6px;
  background: #2b2530; color: #fff; font-size: 9px; font-weight: 700;
  border-radius: 999px; padding: 2px 7px; white-space: nowrap;
}

/* ============ متن معرفی و متن سئوی دسته‌بندی ============ */
.shop-intro { color: var(--c-muted); font-size: 14.5px; line-height: 2.1; margin: -6px 0 18px; max-width: 760px; }

.cat-seo {
  margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--c-border); position: relative;
}
.cat-seo-body { font-size: 14px; line-height: 2.2; color: var(--c-text); }
.cat-seo-body h2 { font-size: 18px; font-weight: 800; margin: 22px 0 10px; }
.cat-seo-body h3 { font-size: 15.5px; font-weight: 700; margin: 18px 0 8px; }
.cat-seo-body p  { margin: 0 0 12px; color: var(--c-muted); }
.cat-seo-body ul, .cat-seo-body ol { color: var(--c-muted); padding-inline-start: 20px; margin: 0 0 12px; }
.cat-seo-body li { margin-bottom: 6px; }
.cat-seo-body a { color: var(--c-primary); }
.cat-seo-body img { max-width: 100%; height: auto; border-radius: 12px; }

/* حالت جمع‌شده: بخشی از متن با محو شدن تدریجی */
.cat-seo.is-clamped .cat-seo-body {
  max-height: 190px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
}
.cat-seo-toggle {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  background: transparent; border: 1px solid var(--c-border); border-radius: 999px;
  padding: 8px 18px; font-family: inherit; font-size: 13px; color: var(--c-primary);
  cursor: pointer; transition: .2s;
}
.cat-seo-toggle:hover { background: var(--c-soft); border-color: var(--c-primary); }

/* ============================================================
   صفحهٔ ۴۰۴ هوشمند
   ============================================================ */
.nf-page { max-width: 1000px; }
.nf-head { text-align: center; margin-bottom: 30px; }
.nf-code {
  font-family: var(--font-display); font-size: clamp(56px, 12vw, 92px); font-weight: 800; line-height: 1;
  background: linear-gradient(180deg, var(--c-primary), color-mix(in srgb, var(--c-primary) 40%, transparent));
  -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 6px;
}
.nf-head h1 { font-family: var(--font-display); font-size: clamp(19px, 3vw, 26px); font-weight: 800; margin: 0 0 8px; }
.nf-head p { color: var(--c-muted); font-size: 14px; line-height: 2.1; margin: 0 auto 20px; max-width: 520px; }

.nf-search {
  display: flex; align-items: center; gap: 9px; max-width: 520px; margin: 0 auto;
  border: 1px solid var(--c-border); background: var(--c-surface);
  border-radius: 999px; padding: 6px 6px 6px 6px; padding-inline-start: 16px;
}
.nf-search svg { color: var(--c-muted); flex: 0 0 auto; }
.nf-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; padding: 10px 0; color: var(--c-text); }
.nf-search .btn { flex: 0 0 auto; border-radius: 999px; }

.nf-exact {
  display: flex; align-items: center; gap: 14px; max-width: 620px; margin: 0 auto 30px;
  border: 1.5px solid var(--c-accent); border-radius: 16px; padding: 14px 16px;
  background: color-mix(in srgb, var(--c-accent) 10%, var(--c-surface)); transition: .2s;
}
.nf-exact:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -18px rgba(0,0,0,.4); }
.nf-exact-ic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; background: var(--c-accent); color: #fff; display: grid; place-items: center; }
.nf-exact-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nf-exact-txt strong { font-size: 12px; color: var(--c-muted); font-weight: 600; }
.nf-exact-txt span { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nf-exact-go { flex: 0 0 auto; font-size: 13px; color: var(--c-primary); font-weight: 700; }

.nf-block { margin-bottom: 34px; }
.nf-block h2 { font-family: var(--font-display); font-size: 17px; font-weight: 800; margin: 0 0 16px; }
.nf-block h3 { font-size: 14px; font-weight: 700; margin: 0 0 10px; }
.nf-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.nf-artlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nf-artlist a { font-size: 13.5px; color: var(--c-muted); }
.nf-artlist a:hover { color: var(--c-primary); }
.nf-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding-top: 8px; }

@media (max-width: 560px) {
  .nf-exact { flex-wrap: wrap; }
  .nf-exact-go { width: 100%; text-align: center; }
  .nf-actions .btn { flex: 1 1 100%; text-align: center; justify-content: center; }
}

/* ============ کلاب مشتریان ============ */
.summary-row.club-row { color: #2c7a5c; font-weight: 700; }

/* ============ کلاب مشتریان — پنل کاربری ============ */
.club-badge {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 4px 11px;
  color: var(--tier, var(--c-primary));
  background: color-mix(in srgb, var(--tier, var(--c-primary)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tier, var(--c-primary)) 34%, transparent);
}
.club-medal-svg { display: block; }

.club-hero { display: flex; gap: 20px; align-items: flex-start; }
.club-hero .ch-medal { flex: 0 0 auto; color: var(--c-muted); }
.club-hero .ch-info { min-width: 0; flex: 1; }
.ch-eyebrow { font-size: 12px; font-weight: 700; color: var(--tier, var(--c-muted)); letter-spacing: .02em; }
.ch-title { font-family: var(--font-display); font-size: 25px; font-weight: 800; margin: 4px 0 8px; }
.ch-desc { font-size: 13.5px; line-height: 2.1; color: var(--c-muted); margin: 0 0 16px; }

.ch-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.ch-stats > div {
  background: var(--c-soft); border: 1px solid var(--c-border); border-radius: 13px; padding: 10px 13px;
}
.ch-stats span { display: block; font-size: 11.5px; color: var(--c-muted); }
.ch-stats strong { display: block; font-size: 14px; margin-top: 3px; white-space: nowrap; }

.ch-next { margin-top: 16px; }
.ch-next-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--c-muted); margin-bottom: 7px; }
.ch-next-top strong { color: var(--c-text); white-space: nowrap; }
.ch-bar { height: 9px; border-radius: 999px; background: var(--c-soft); border: 1px solid var(--c-border); overflow: hidden; }
.ch-bar span { display: block; height: 100%; background: var(--tier, var(--c-primary)); transition: width .4s ease; }

.club-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(146px, 1fr)); gap: 12px; }
.club-tier-card {
  position: relative; text-align: center; padding: 16px 12px 14px;
  border: 1px solid var(--c-border); border-radius: 16px; background: var(--c-surface);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.club-tier-card.is-mine {
  border-color: color-mix(in srgb, var(--tier) 55%, transparent);
  background: color-mix(in srgb, var(--tier) 7%, var(--c-surface));
}
.club-tier-card strong { font-size: 14.5px; margin-top: 6px; }
.club-tier-card .ct-off { font-size: 12.5px; font-weight: 800; color: var(--tier); }
.club-tier-card .ct-min { font-size: 11px; color: var(--c-muted); line-height: 1.8; }
.club-tier-card .ct-mine {
  position: absolute; top: -9px; inset-inline-start: 50%; transform: translateX(50%);
  background: var(--tier); color: #fff; font-size: 10px; font-weight: 800;
  border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}

.club-board .cb-rank {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px;
  background: var(--c-soft); font-size: 12.5px; font-weight: 800; color: var(--c-muted);
}
.club-board .cb-rank.rank-1 { background: #C8A24A; color: #fff; }
.club-board .cb-rank.rank-2 { background: #9AA0A6; color: #fff; }
.club-board .cb-rank.rank-3 { background: #B87333; color: #fff; }
.club-board tr.is-me td { background: color-mix(in srgb, var(--c-primary) 7%, transparent); }

@media (max-width: 700px) {
  .club-hero { flex-direction: column; align-items: center; text-align: center; gap: 12px; }
  .club-hero .ch-info { text-align: center; }
  .ch-title { font-size: 21px; }
  .ch-next-top { justify-content: center; }
}

/* ============================================================
   سفارش نگه‌داشته‌شده — ادامهٔ پرداخت از پنل کاربری
   ============================================================ */
.pending-wrap { border-color: color-mix(in srgb, #d9822b 40%, var(--c-border)); }
.pw-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 16.5px; font-weight: 800; margin: 0 0 6px;
}
.pw-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #d9822b; flex: 0 0 auto;
  box-shadow: 0 0 0 4px color-mix(in srgb, #d9822b 20%, transparent);
  animation: pwPulse 2s ease-in-out infinite;
}
@keyframes pwPulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .pw-dot { animation: none; } }
.pw-note { font-size: 13px; color: var(--c-muted); margin: 0 0 14px; line-height: 1.9; }

.pw-list { display: grid; gap: 10px; }
.pw-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: color-mix(in srgb, #d9822b 6%, var(--c-surface));
  border: 1px solid color-mix(in srgb, #d9822b 26%, var(--c-border));
  border-radius: 14px; padding: 13px 15px;
}
.pw-info { min-width: 0; }
.pw-code { font-weight: 800; font-size: 14px; }
.pw-meta { font-size: 12px; color: var(--c-muted); margin-top: 2px; }
.pw-total { font-size: 15px; font-weight: 800; margin-top: 5px; white-space: nowrap; }
.pw-total small { font-weight: 400; font-size: 11.5px; color: var(--c-muted); }
.pw-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-inline-start: auto; }
.pw-left {
  font-size: 12px; font-weight: 700; color: #8a5a12; white-space: nowrap;
  background: color-mix(in srgb, #d9822b 16%, transparent);
  border-radius: 999px; padding: 4px 11px;
}
.pw-left.is-up { color: var(--c-danger); background: color-mix(in srgb, var(--c-danger) 12%, transparent); }
.pw-pay { white-space: nowrap; }
.pw-more { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--c-primary); }

/* ردیف سفارش پرداخت‌نشده در جدول */
.table tr.row-pending td { background: color-mix(in srgb, #d9822b 5%, transparent); }

/* ---------- جعبهٔ پرداخت در صفحهٔ سفارش ---------- */
.pay-due {
  background: var(--c-surface);
  border: 1px solid color-mix(in srgb, #d9822b 34%, var(--c-border));
  border-radius: var(--radius); padding: 20px;
  box-shadow: 0 12px 30px -22px rgba(217,130,43,.7);
}
.pay-due.is-expired { border-color: color-mix(in srgb, var(--c-danger) 38%, var(--c-border)); }
.pd-head { display: flex; gap: 12px; align-items: flex-start; }
.pd-ic {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: #d9822b;
  background: color-mix(in srgb, #d9822b 12%, transparent);
}
.pay-due.is-expired .pd-ic { color: var(--c-danger); background: color-mix(in srgb, var(--c-danger) 12%, transparent); }
.pd-head strong { display: block; font-size: 15.5px; }
.pd-head p { font-size: 13px; color: var(--c-muted); line-height: 2; margin: 4px 0 0; }

.pd-timer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 16px; padding: 11px 14px; border-radius: 12px;
  background: color-mix(in srgb, #d9822b 9%, transparent);
}
.pd-timer-lbl { font-size: 12.5px; color: var(--c-muted); }
.pd-clock { font-size: 19px; font-weight: 800; letter-spacing: 1px; color: #8a5a12; font-variant-numeric: tabular-nums; }
.pd-timer.is-up .pd-clock { color: var(--c-danger); }

.pd-amount {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--c-border);
}
.pd-amount span { font-size: 13px; color: var(--c-muted); }
.pd-amount strong { font-size: 20px; font-weight: 800; white-space: nowrap; }
.pd-amount small { font-size: 12px; font-weight: 400; color: var(--c-muted); }

.pd-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.pd-gw { display: grid; gap: 5px; flex: 1; min-width: 190px; }
.pd-gw span { font-size: 12.5px; color: var(--c-muted); }
.pd-gw select {
  width: 100%; padding: 11px 12px; border-radius: 12px;
  border: 1px solid var(--c-border); background: var(--c-surface); font: inherit;
}
.pd-pay { flex: 1; min-width: 200px; justify-content: center; gap: 8px; padding: 13px 22px; font-size: 15px; }

.pd-cancel { margin-top: 12px; text-align: center; }
.pd-cancel button {
  background: none; border: 0; color: var(--c-muted); font: inherit;
  font-size: 12.5px; cursor: pointer; text-decoration: underline;
}
.pd-cancel button:hover { color: var(--c-danger); }

@media (max-width: 560px) {
  .pw-card { flex-direction: column; align-items: stretch; }
  .pw-side { margin-inline-start: 0; justify-content: space-between; }
  .pw-pay { flex: 1; justify-content: center; }
  .pd-form { flex-direction: column; align-items: stretch; }
  .pd-pay { width: 100%; }
  .pd-amount strong { font-size: 18px; }
}

/* وضعیت موجودی در سبد خرید */
.cart-low {
  font-size: 11.5px; font-weight: 700; color: #8a5a12; white-space: nowrap;
  background: color-mix(in srgb, #d9822b 14%, transparent); border-radius: 999px; padding: 3px 9px;
}
.cart-out {
  font-size: 12px; font-weight: 700; color: var(--c-danger);
  background: color-mix(in srgb, var(--c-danger) 10%, transparent); border-radius: 9px; padding: 5px 10px;
}

/* مراحل خرید روی موبایل: متن کوتاه‌تر و بدون شکستن خط */
@media (max-width: 480px) {
  .steps { margin: 18px 0; }
  .step { font-size: 11px; line-height: 1.5; padding: 0 2px; }
  .step::before { width: 13px; height: 13px; margin-bottom: 7px; }
  .step::after { top: 6px; }
}

/* فقط برای موتور جستجو و صفحه‌خوان — از دید کاربر پنهان ولی در DOM هست */
.sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ============ صفحهٔ ورود ============
   کارت ورود دو تعریفِ رقیب داشت (یکی برای همین صفحه، یکی برای چیدمانی که هیچ‌وقت
   ساخته نشد) و تعریفِ دوم بی‌سروصدا اولی را بازنویسی می‌کرد. حالا یکجا تعریف است. */
.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 64vh; padding: clamp(26px, 6vh, 62px) 16px;
}
.auth-shell { width: 100%; max-width: 424px; }

.auth-brand {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-display); font-weight: 800; font-size: 19px;
  color: var(--c-text); margin-bottom: 20px;
}
.auth-brand img { height: 40px; width: auto; }
.auth-brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-primary); }

.auth-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: 22px; padding: 32px 28px 26px;
  box-shadow: 0 26px 60px -38px rgba(0, 0, 0, .34);
}
.auth-ico {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  margin: 0 0 16px; color: var(--c-primary);
  background: color-mix(in srgb, var(--c-primary) 12%, var(--c-surface));
}
.auth-card h1 { font-family: var(--font-display); font-size: 21px; font-weight: 800; margin: 0 0 7px; }
.auth-sub { color: var(--c-muted); font-size: 13.5px; line-height: 2; margin: 0 0 22px; }
.auth-mob {
  direction: ltr; display: inline-block; font-weight: 800; color: var(--c-text);
  font-variant-numeric: tabular-nums;
}

.auth-alert { font-size: 13.5px; line-height: 1.9; padding: 11px 14px; border-radius: 13px; margin-bottom: 14px; }
.auth-alert.is-error { background: #fdecea; color: #a4342f; }
.auth-alert.is-note  { background: #fff8e6; border: 1px dashed #e6c34d; color: #8a6d1a; }

/* شمارهٔ موبایل: عددها چپ‌به‌راست ولی خودِ فیلد سرجای RTL خودش می‌ماند */
.ltr-num { direction: ltr; text-align: center; letter-spacing: 1.5px; font-variant-numeric: tabular-nums; }
.ltr-num::placeholder { letter-spacing: 1px; opacity: .5; }

/* رمز عبور + دکمهٔ چشم */
.pw-wrap { position: relative; }
.pw-wrap input { padding-inline-end: 44px; }
.pw-eye {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer;
  background: none; border: 0; border-radius: 9px; color: var(--c-muted);
}
.pw-eye:hover { color: var(--c-primary); background: var(--c-soft); }
.pw-eye.on { color: var(--c-primary); }

/* ---- خانه‌های کد تأیید ---- */
.otp-wrap { margin-bottom: 18px; }
.otp-plain {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--c-border); border-radius: 12px;
  background: var(--c-surface); color: var(--c-text); font: inherit; font-size: 20px; font-weight: 800;
  text-align: center; letter-spacing: .5em; text-indent: .5em; direction: ltr; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.otp-plain:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary) 16%, transparent); }
/* وقتی جاوااسکریپت خانه‌ها را ساخت، ورودیِ اصلی پنهان می‌شود ولی در فرم می‌ماند */
.otp-wrap.is-split .otp-plain { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.otp-cells { display: flex; gap: 9px; justify-content: center; direction: ltr; }
.otp-cell {
  width: 54px; height: 60px; flex: 0 1 54px; min-width: 0;
  border: 1.5px solid var(--c-border); border-radius: 13px; background: var(--c-surface);
  color: var(--c-text); font: inherit; font-size: 23px; font-weight: 800; text-align: center;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.otp-cell:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary) 16%, transparent); }
.otp-cell.filled { border-color: color-mix(in srgb, var(--c-primary) 55%, var(--c-border)); }

/* ---- پاورقیِ کارت ---- */
.auth-foot {
  display: flex; align-items: center; justify-content: center; gap: 6px 16px;
  flex-wrap: wrap; margin-top: 16px; font-size: 13px; color: var(--c-muted);
}
.auth-foot form { margin: 0; }
.auth-link {
  background: none; border: 0; padding: 0; font: inherit; font-weight: 700;
  color: var(--c-primary); cursor: pointer;
}
.auth-link:hover { text-decoration: underline; }
.auth-link.is-muted { color: var(--c-muted); font-weight: 600; }
.auth-link.is-muted:hover { color: var(--c-primary); }

.auth-switch {
  text-align: center; font-size: 13.5px; color: var(--c-muted);
  margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--c-border);
}
.auth-switch a { color: var(--c-primary); font-weight: 700; }
.auth-switch a:hover { text-decoration: underline; }

.auth-note {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 16px 0 0; font-size: 12.5px; color: var(--c-muted); text-align: center; line-height: 1.8;
}
.auth-note svg { flex: 0 0 auto; color: var(--c-primary); }

@media (max-width: 480px) {
  .auth-page { min-height: 0; padding: 22px 14px 34px; }
  .auth-card { padding: 26px 20px 22px; border-radius: 18px; }
  .otp-cell { width: 48px; height: 55px; flex: 0 1 48px; font-size: 21px; }
  .otp-cells { gap: 7px; }
}

/* نشانِ روش پرداخت و شیوهٔ ارسال در صفحهٔ تسویه */
.gateway-opt .go-ico {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px;
  display: grid; place-items: center; overflow: hidden;
  color: var(--brand, var(--c-primary));
  background: color-mix(in srgb, var(--brand, var(--c-primary)) 12%, var(--c-surface));
}
.gateway-opt .go-ico img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
/* لوگوی بارگذاری‌شدهٔ درگاه: زمینهٔ سفید تا رنگ‌های خود لوگو درست دیده شوند */
.gateway-opt .go-ico.has-logo { width: 42px; height: 42px; background: #fff; border: 1px solid var(--c-border); }
.gateway-opt .go-ico.has-logo img { padding: 4px; }

/* اطلاعات تماس زیر لوگوی فوتر */
.footer-contact { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 9px; }
.footer-contact li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.9; color: var(--c-muted); }
.footer-contact .fc-ic { flex: 0 0 auto; color: var(--c-primary); margin-top: 2px; }
.footer-contact a { color: var(--c-muted); font-size: 13px; }
.footer-contact a:hover { color: var(--c-primary); }
.footer-contact small { font-size: 11.5px; opacity: .85; }
.footer-legal { font-size: 12px; color: var(--c-muted); margin: 12px 0 0; line-height: 1.9; }

/* ---------- نتایج جستجوی زنده ---------- */
.ls-box {
  position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 80;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 16px;
  box-shadow: 0 24px 54px -26px rgba(0,0,0,.42); overflow: hidden auto; max-height: 62vh;
}
.ls-box[hidden] { display: none; }
.ls-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 13px;
  border-bottom: 1px solid var(--c-border); color: var(--c-text);
}
.ls-item:last-child { border-bottom: 0; }
.ls-item:hover, .ls-item.on { background: var(--c-soft); }
.ls-item img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; background: var(--c-soft); }
.ls-t { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-m { font-size: 12.5px; font-weight: 700; color: var(--c-primary); white-space: nowrap; }
.ls-m.is-out { color: var(--c-muted); font-weight: 600; }
.ls-empty { padding: 18px; text-align: center; color: var(--c-muted); font-size: 13.5px; }
@media (max-width: 560px) { .ls-item img { width: 36px; height: 36px; } .ls-t { font-size: 13px; } }


/* پاسخ به نظر (مثلاً پاسخ فروشگاه) */
.review-reply {
  margin: 12px 0 0; padding: 11px 14px; border-radius: 12px;
  background: var(--c-soft); border-inline-start: 3px solid var(--c-primary);
}
.review-reply .review-top { margin-bottom: 4px; }
.review-reply strong { font-size: 13px; }
.review-reply p { margin: 0; font-size: 13.5px; line-height: 2; color: var(--c-muted); }

/* انصراف از پیامک تبلیغاتی در پروفایل کاربر */
.opt-out { display: flex; align-items: flex-start; gap: 9px; margin: 4px 0 18px; cursor: pointer; }
.opt-out input[type="checkbox"] { margin-top: 4px; flex: none; }
.opt-out span { font-size: 13.5px; line-height: 1.7; }
.opt-out small { display: block; color: var(--c-muted); font-size: 12px; }

/* ==========================================================
   پکیج چاپ — پلکان تیراژ، نوع چاپ، راهنما و فایل مشتری
   ========================================================== */

/* ---------- پلکان تیراژ ---------- */
.tier-select { margin: 0 0 18px; }
.tier-options {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}
.tier-opt {
  position: relative; cursor: pointer; text-align: start;
  display: flex; flex-direction: column; gap: 3px;
  background: var(--c-surface); border: 1.5px solid var(--c-border);
  border-radius: var(--radius); padding: 12px 14px; color: var(--c-text);
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.tier-opt:hover { border-color: var(--c-primary); }
.tier-opt[aria-current="true"] {
  border-color: var(--c-primary); background: var(--c-soft);
  box-shadow: 0 0 0 1.5px var(--c-primary) inset;
}
.tier-opt .to-qty   { font-size: 14px; font-weight: 800; }
.tier-opt .to-price { font-size: 14.5px; font-weight: 800; color: var(--c-primary); }
.tier-opt .to-price small { font-size: 11px; font-weight: 600; color: var(--c-muted); margin-inline-start: 3px; }
.tier-opt .to-unit  { font-size: 11.5px; color: var(--c-muted); }
.tier-opt .to-off {
  position: absolute; inset-block-start: 8px; inset-inline-end: 8px;
  font-style: normal; font-size: 10.5px; font-weight: 800;
  background: var(--c-danger); color: #fff; border-radius: 6px; padding: 1px 5px;
}

/* ---------- انتخاب یک رو / دو رو ---------- */
.side-select { margin: 0 0 18px; }
.side-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.side-opt {
  display: flex; align-items: center; gap: 10px; cursor: pointer; text-align: start;
  background: var(--c-surface); border: 1.5px solid var(--c-border);
  border-radius: var(--radius); padding: 11px 13px; color: var(--c-text);
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.side-opt:hover { border-color: var(--c-primary); }
.side-opt[aria-current="true"] {
  border-color: var(--c-primary); background: var(--c-soft);
  box-shadow: 0 0 0 1.5px var(--c-primary) inset;
}
.side-opt .so-ic { flex: 0 0 auto; color: var(--c-primary); display: inline-flex; }
.side-opt .so-txt { display: flex; flex-direction: column; line-height: 1.6; min-width: 0; }
.side-opt .so-txt strong { font-size: 14px; font-weight: 800; }
.side-opt .so-txt small  { font-size: 11.5px; color: var(--c-muted); }

.side-fixed {
  display: flex; align-items: center; gap: 9px; margin: 0 0 18px;
  background: var(--c-accent-soft); border: 1px solid color-mix(in srgb, var(--c-accent) 22%, #fff);
  color: var(--c-accent-dark); border-radius: var(--radius); padding: 11px 14px;
  font-size: 13px; line-height: 1.75;
}
.side-fixed svg { flex: 0 0 auto; }

/* ---------- زمان آماده‌سازی و فایل قالب ---------- */
.print-lead {
  display: flex; align-items: center; gap: 9px; margin-top: 12px;
  background: var(--c-accent-soft); border: 1px solid color-mix(in srgb, var(--c-accent) 22%, #fff);
  color: var(--c-accent-dark); border-radius: var(--radius); padding: 11px 14px;
  font-size: 13px; font-weight: 600; line-height: 1.7;
}
.print-lead svg { flex: 0 0 auto; }
.print-template {
  display: flex; align-items: center; gap: 9px; margin-top: 10px;
  border: 1px dashed var(--c-border); border-radius: var(--radius);
  padding: 11px 14px; font-size: 13px; font-weight: 600; color: var(--c-text);
  transition: border-color .15s, color .15s, background .15s;
}
.print-template:hover { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-soft); }
.print-template svg { flex: 0 0 auto; color: var(--c-primary); }

/* ---------- راهنمای آماده‌سازی فایل ---------- */
.print-note {
  margin: 14px 0 0; font-size: 13.5px; line-height: 2; color: var(--c-muted);
  background: var(--c-soft); border-radius: var(--radius); padding: 13px 16px;
}
.print-guide {
  margin-top: 16px; border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  background: var(--c-surface); padding: 16px 18px; box-shadow: var(--sh-1);
}
.print-guide h3 {
  display: flex; align-items: center; gap: 8px; margin: 0 0 10px;
  font-size: 15px; font-weight: 800; color: var(--c-primary);
}
.print-guide ul { margin: 0; padding-inline-start: 20px; font-size: 13.5px; line-height: 2.1; color: var(--c-text); }
.print-guide a { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--c-accent); }

/* ---------- جعبهٔ فایل طرح (پرداخت و پنل کاربر) ---------- */
.art-box {
  border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  background: var(--c-surface); padding: 15px 16px; margin-bottom: 12px;
}
.art-box + .art-box { margin-top: 0; }
.art-head { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.art-head strong { font-size: 14px; font-weight: 800; }
.art-head .art-meta { font-size: 12px; color: var(--c-muted); display: block; margin-top: 2px; }
.art-slots { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.art-slot {
  border: 1px dashed var(--c-border); border-radius: var(--radius);
  padding: 12px 13px; background: var(--c-bg);
}
.art-slot > label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 7px; }
.art-slot input[type="file"] { width: 100%; font-size: 12px; }
.art-current {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font-size: 12px; background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); padding: 7px 9px;
}
.art-current img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.art-current .ac-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: start; }
.art-status {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800;
  border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}
.art-status.pending  { background: var(--c-accent-soft); color: var(--c-accent-dark); }
.art-status.approved { background: color-mix(in srgb, var(--c-success) 14%, #fff); color: var(--c-success); }
.art-status.rejected { background: color-mix(in srgb, var(--c-danger) 12%, #fff);  color: var(--c-danger); }
.art-reject-note {
  margin: 8px 0 0; font-size: 12.5px; line-height: 1.9; color: var(--c-danger);
  background: color-mix(in srgb, var(--c-danger) 7%, #fff); border-radius: var(--radius-sm); padding: 8px 10px;
}
.art-hint { font-size: 12px; color: var(--c-muted); margin: 10px 0 0; line-height: 1.9; }

/* نوار وضعیت فایل روی سفارش */
.print-state {
  display: flex; align-items: center; gap: 10px; border-radius: var(--radius);
  padding: 12px 15px; font-size: 13.5px; font-weight: 600; line-height: 1.8; margin-bottom: 14px;
}
.print-state svg { flex: 0 0 auto; }
.print-state.warn    { background: color-mix(in srgb, var(--c-warning) 12%, #fff); color: #8a4500; }
.print-state.info    { background: var(--c-accent-soft); color: var(--c-accent-dark); }
.print-state.success { background: color-mix(in srgb, var(--c-success) 12%, #fff); color: var(--c-success); }
.print-state.error   { background: color-mix(in srgb, var(--c-danger) 10%, #fff);  color: var(--c-danger); }

@media (max-width: 560px) {
  .side-options { grid-template-columns: 1fr; }
  .tier-options { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
}

/* «از …» روی قیمت کارهای چاپی (قیمت بر اساس تیراژ تعیین می‌شود) */
.price .price-from { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--c-muted); }
/* ============ تنوعِ اجباری در صفحهٔ محصول ============ */
.price-from { font-size: 14px; font-weight: 600; color: var(--c-muted); margin-inline-end: 5px; }
.price-note { margin: -8px 0 14px; font-size: 12.5px; color: var(--c-muted); line-height: 1.9; }

.vr-req {
  font-style: normal; font-size: 11px; font-weight: 700; color: #a4342f;
  background: #fdecea; border-radius: 999px; padding: 2px 8px; margin-inline-start: 6px;
  vertical-align: middle;
}
.variant-warn {
  display: flex; align-items: center; gap: 8px; margin: 0 0 14px;
  background: #fff6e6; border: 1px solid #f0d9a8; color: #7a5410;
  border-radius: 12px; padding: 10px 13px; font-size: 13px; line-height: 1.8;
}
.variant-warn svg { flex: 0 0 auto; }

/* دکمهٔ خرید وقتی تنوع انتخاب نشده: کلیک‌پذیر می‌ماند تا هشدار را نشان دهد، ولی خاموش دیده می‌شود */
[data-add-cart].is-locked button[type="submit"] { opacity: .55; }

@keyframes vrShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}
.vr-shake { animation: vrShake .38s ease; }

/* باکس نظرها هم‌عرض متن مطلب (پیش‌تر ۵۶۰px بود و از نظر ux ناهمخوان می‌شد) */
.review-form { max-width: none; }

/* ---------- پیگیری سفارش از کانال تلگرام (پنل کاربر) ---------- */
.otg {
  --tg: #229ed9;
  display: flex; gap: 18px; align-items: flex-start;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tg) 9%, var(--c-surface)), var(--c-surface) 70%);
  border: 1px solid color-mix(in srgb, var(--tg) 30%, var(--c-border));
  border-radius: var(--radius); padding: 26px;
  box-shadow: 0 14px 34px -26px color-mix(in srgb, var(--tg) 80%, transparent);
}
.otg-ic {
  flex: 0 0 auto; width: 56px; height: 56px; border-radius: 18px;
  display: grid; place-items: center; color: #fff; background: var(--tg);
  box-shadow: 0 10px 22px -12px var(--tg);
}
.otg-body { min-width: 0; flex: 1; }
.otg h2 { font-size: 18px; margin: 2px 0 8px; }
.otg p { margin: 0; color: var(--c-muted); font-size: 14px; line-height: 2; }
.otg-steps {
  margin: 14px 0 0; padding: 0; list-style: none; counter-reset: otg;
  display: grid; gap: 8px; font-size: 13.5px;
}
.otg-steps li { counter-increment: otg; display: flex; gap: 10px; align-items: center; }
.otg-steps li::before {
  content: counter(otg, persian); flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  color: var(--tg); background: color-mix(in srgb, var(--tg) 13%, transparent);
}
.otg-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 18px; }
.otg-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--tg); border-color: var(--tg); color: #fff;
}
.otg-btn:hover { background: color-mix(in srgb, var(--tg) 85%, #000); border-color: transparent; color: #fff; }
.otg-handle { font-size: 13px; color: var(--c-muted); font-weight: 600; }
.otg-missing { font-size: 13px; color: var(--c-danger); }
.otg-code {
  display: inline-flex; align-items: center; gap: 8px; margin-inline-start: auto;
  padding: 7px 12px; border-radius: 10px; cursor: pointer; font: inherit; font-size: 12.5px;
  color: var(--c-muted); background: var(--c-surface); border: 1px dashed var(--c-border);
}
.otg-code strong { color: var(--c-text); font-size: 13.5px; letter-spacing: .5px; }
.otg-code em { font-style: normal; color: var(--tg); font-weight: 700; }
.otg-code:hover { border-color: var(--tg); }
.otg-compact { padding: 18px 20px; }
.otg-compact .otg-ic { width: 46px; height: 46px; border-radius: 14px; }
.otg-compact h2 { font-size: 16px; }
.otg-compact .otg-actions { margin-top: 14px; }
.otg-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13.5px; color: var(--c-muted); }
@media (max-width: 600px) {
  .otg { flex-direction: column; padding: 20px; gap: 14px; }
  .otg-btn { width: 100%; justify-content: center; }
  .otg-code { margin-inline-start: 0; width: 100%; justify-content: space-between; }
}

/* ============================================================
   فیلتر بازهٔ قیمت فروشگاه
   ============================================================ */
.price-filter { position: relative; }
.pf-trigger {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 13px;
  border: 1px solid var(--c-border); border-radius: 12px; background: var(--c-surface);
  font: inherit; font-size: 13.5px; color: var(--c-text); cursor: pointer; white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s;
}
.pf-trigger svg { color: var(--c-muted); flex: 0 0 auto; }
.pf-trigger:hover { border-color: var(--c-text); }
.pf-caret { transition: transform .2s; }
.price-filter.open .pf-caret { transform: rotate(180deg); }
.price-filter.is-active .pf-trigger { border-color: var(--c-primary); background: var(--c-primary); color: #fff; font-weight: 700; }
.price-filter.is-active .pf-trigger svg { color: currentColor; }

.pf-panel {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60;
  width: 360px; max-width: calc(100vw - 32px); padding: 18px 18px 16px;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.05);
  animation: pfIn .18s ease both;
}
.pf-panel[hidden], .pf-backdrop[hidden] { display: none; }
@keyframes pfIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.pf-grab { display: none; }
.pf-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.pf-head strong { font-size: 15px; font-weight: 800; }
.pf-unit { font-size: 12px; color: var(--c-muted); }
.pf-x {
  margin-inline-start: auto; align-self: center; width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; border-radius: 9px; background: var(--c-soft, #f4f4f4); color: var(--c-muted); cursor: pointer; padding: 0;
}
.pf-x:hover { color: var(--c-text); }

.pf-histo { display: flex; align-items: flex-end; gap: 2px; height: 46px; padding: 0 11px; }
.pf-histo i { flex: 1; border-radius: 3px 3px 0 0; background: var(--c-border); transition: background .15s; }
.pf-histo i.in { background: color-mix(in srgb, var(--c-primary) 55%, transparent); }

.pf-slider { position: relative; height: 34px; margin: 0 11px; touch-action: none; cursor: pointer; }
.pf-track { position: absolute; inset-inline: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 99px; background: var(--c-border); }
.pf-fill  { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: var(--c-primary); }
.pf-thumb {
  position: absolute; top: 50%; width: 24px; height: 24px; margin-top: -12px; margin-inline-start: -12px;
  border-radius: 50%; border: 2px solid var(--c-primary); background: #fff; padding: 0; cursor: grab; z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,.18); touch-action: none; transition: box-shadow .15s, transform .15s;
}
.pf-thumb:hover { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c-primary) 12%, transparent), 0 2px 6px rgba(0,0,0,.18); }
.pf-thumb:focus-visible { outline: none; box-shadow: 0 0 0 6px color-mix(in srgb, var(--c-primary) 22%, transparent), 0 2px 6px rgba(0,0,0,.18); }
.pf-thumb.dragging { cursor: grabbing; transform: scale(1.12); }
.pf-scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--c-muted); margin: 2px 0 14px; }

.pf-inputs { display: flex; align-items: center; gap: 8px; }
.pf-dash { color: var(--c-muted); flex: 0 0 auto; }
.pf-field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 0 10px;
  border: 1px solid var(--c-border); border-radius: 12px; background: var(--c-surface); cursor: text;
  transition: border-color .15s, box-shadow .15s;
}
.pf-field:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary) 14%, transparent); }
.pf-field span { font-size: 12px; color: var(--c-muted); flex: 0 0 auto; }
.pf-field em { font-style: normal; font-size: 11.5px; color: var(--c-muted); flex: 0 0 auto; }
.pf-field input {
  flex: 1; min-width: 0; width: 100%; border: 0; outline: none; background: transparent; padding: 11px 0;
  font: inherit; font-size: 14px; font-weight: 700; text-align: center; direction: rtl;
}

.pf-foot { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--c-border); }
.pf-reset { border: 0; background: none; font: inherit; font-size: 13px; color: var(--c-muted); cursor: pointer; padding: 8px 4px; text-decoration: underline; text-underline-offset: 4px; }
.pf-reset:hover { color: var(--c-text); }
.pf-apply { margin-inline-start: auto; min-width: 150px; justify-content: center; }
.pf-apply:disabled { opacity: .45; cursor: not-allowed; }

/* برچسب فیلترهای فعال */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 20px; }
.af-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px;
  border-radius: 999px; background: var(--c-soft, #f4f4f4); border: 1px solid var(--c-border);
  font-size: 12.5px; color: var(--c-text); transition: border-color .15s, background .15s;
}
.af-chip svg { color: var(--c-muted); }
.af-chip:hover { border-color: var(--c-text); }
.af-chip:hover svg { color: var(--c-danger, #c0392b); }
.af-clear { font-size: 12.5px; color: var(--c-muted); text-decoration: underline; text-underline-offset: 4px; padding: 6px 4px; }
.af-clear:hover { color: var(--c-text); }

/* موبایل: برگهٔ پایینی تمام‌عرض */
@media (max-width: 700px) {
  .price-filter { grid-column: 1 / -1; }
  .pf-trigger { width: 100%; justify-content: center; }
  .pf-trigger .pf-caret { margin-inline-start: auto; }
  .pf-trigger svg:first-child { margin-inline-start: 0; }
  .pf-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.42); animation: pfFade .2s ease both; }
  .pf-panel {
    position: fixed; top: auto; bottom: 0; inset-inline: 0; width: auto; max-width: none; z-index: 1001;
    border-radius: 22px 22px 0 0; border-bottom: 0; padding: 10px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    animation: pfUp .26s cubic-bezier(.2,.8,.2,1) both;
  }
  .pf-grab { display: block; width: 42px; height: 5px; border-radius: 99px; background: var(--c-border); margin: 0 auto 12px; }
  .pf-thumb { width: 28px; height: 28px; margin-top: -14px; margin-inline-start: -14px; }
  .pf-apply { flex: 1; }
  .active-filters { margin: -4px 0 14px; }
  html.pf-lock, html.pf-lock body { overflow: hidden; }
}
@keyframes pfUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes pfFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pf-panel, .pf-backdrop { animation: none; } }

/* ============================================================
   صفحهٔ تسویه: نوع بسته‌بندی
   ============================================================ */
.pack-sub { margin: 0 0 14px; font-size: 13px; color: var(--c-muted); }
.pack-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pack-opt {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 12px;
  border: 1.5px solid var(--c-border); border-radius: 14px; cursor: pointer; background: var(--c-surface);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.pack-opt:hover { border-color: color-mix(in srgb, var(--c-primary) 45%, var(--c-border)); }
.pack-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pack-opt:has(input:checked) { border-color: var(--c-primary); background: var(--c-soft); box-shadow: 0 0 0 1px var(--c-primary) inset; }
.pack-opt:has(input:focus-visible) { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.pack-media { flex: 0 0 auto; }
.pack-ico {
  width: 64px; height: 64px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c-primary) 8%, var(--c-surface)); color: var(--c-primary);
}
.pack-zoom {
  position: relative; display: block; width: 64px; height: 64px; padding: 0; border: 0; border-radius: 12px;
  overflow: hidden; cursor: zoom-in; background: var(--c-soft);
}
.pack-zoom img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.pack-zoom:hover img { transform: scale(1.07); }
.pack-zoom-ico {
  position: absolute; inset-inline-end: 4px; bottom: 4px; width: 20px; height: 20px; border-radius: 7px;
  display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff;
}
.pack-txt { flex: 1; min-width: 0; }
.pack-txt strong { display: block; font-size: 14px; }
.pack-txt small { display: block; font-size: 12px; color: var(--c-muted); margin-top: 3px; line-height: 1.7; }
.pack-price { flex: 0 0 auto; align-self: flex-start; margin-top: 2px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.pack-price small { font-weight: 500; font-size: 11px; color: var(--c-muted); }
.pack-check {
  position: absolute; top: -8px; inset-inline-start: -8px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; background: var(--c-primary); color: #fff;
  transform: scale(0); transition: transform .2s cubic-bezier(.3,1.5,.6,1); box-shadow: 0 0 0 3px var(--c-surface);
}
.pack-opt:has(input:checked) .pack-check { transform: scale(1); }
@media (max-width: 640px) {
  .pack-list { grid-template-columns: minmax(0, 1fr); }
  .pack-opt { align-items: flex-start; }
  .pack-qty { margin-top: 8px; }
  .pack-ico, .pack-zoom { width: 56px; height: 56px; }
}

/* بزرگ‌نمایی عکس بسته‌بندی */
.pack-lightbox {
  position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 20px;
  background: rgba(0,0,0,.72); animation: pfFade .2s ease both;
}
.pack-lightbox figure { position: relative; margin: 0; max-width: min(520px, 100%); }
.pack-lightbox img { display: block; width: 100%; max-height: 75vh; object-fit: contain; border-radius: 16px; background: #fff; }
.pack-lightbox figcaption { color: #fff; text-align: center; margin-top: 10px; font-size: 14px; font-weight: 700; }
.pack-lightbox button {
  position: absolute; top: -14px; inset-inline-start: -14px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: #fff; color: #111; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.3);
}

/* بازخورد تغییر مبلغ قابل پرداخت */
#sumTotal.bump, #stickyTotal.bump { display: inline-block; animation: sumBump .45s ease; }
@keyframes sumBump { 0% { transform: scale(1); } 40% { transform: scale(1.12); color: var(--c-primary); } 100% { transform: scale(1); } }
/* بسته‌بندی: نشان «ضروری»، خطای انتخاب نشده و انتخاب تعداد */
.pack-req { display: inline-block; margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c-danger, #c0392b) 10%, transparent); color: var(--c-danger, #c0392b); font-size: 11px; font-weight: 700; vertical-align: 2px; }
.pack-err { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--c-danger, #c0392b) 9%, transparent); color: var(--c-danger, #c0392b); font-size: 13px; font-weight: 600; }
#packBox.is-invalid .pack-opt { border-color: color-mix(in srgb, var(--c-danger, #c0392b) 55%, var(--c-border)); }
.pack-qty { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; padding: 3px; border: 1px solid var(--c-border); border-radius: 10px; background: var(--c-surface); }
.pack-qty-l { font-size: 12px; color: var(--c-muted); padding: 0 6px; }
.pack-qty button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: var(--c-soft); color: var(--c-text); font: inherit; font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.pack-qty button:hover:not(:disabled) { background: var(--c-primary); color: #fff; }
.pack-qty button:disabled { opacity: .35; cursor: default; }
.pack-opt .pack-qty input { width: 38px !important; min-width: 0; height: 28px !important; min-height: 0 !important; margin: 0; border: 0 !important; border-radius: 0; box-shadow: none !important; background: transparent !important; text-align: center; font: inherit; font-size: 14px; font-weight: 700; color: var(--c-text) !important; -moz-appearance: textfield; appearance: textfield; padding: 0 !important; position: static; opacity: 1; pointer-events: auto; }
.pack-qty input::-webkit-inner-spin-button, .pack-qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pack-qty input:focus { outline: none; }
.pack-qty:focus-within { border-color: var(--c-primary); }
.pack-opt:not(:has(input[name="packaging"]:checked)) .pack-qty { opacity: .6; }

@media (prefers-reduced-motion: reduce) { #sumTotal.bump, #stickyTotal.bump, .pack-lightbox { animation: none; } }

/* بسته‌بندی: هیچ بخشی از کارت نباید صفحه را از عرض گوشی پهن‌تر کند */
.pack-list > .pack-opt { min-width: 0; }
.pack-txt { min-width: 0; overflow-wrap: break-word; }
.pack-per { display: block; text-align: end; font-weight: 500; font-size: 10.5px; color: var(--c-muted); margin-top: 1px; }
.pack-qty { max-width: 100%; }
.pack-qty-l { white-space: nowrap; }
@media (max-width: 640px) {
  /* در گوشی قیمت زیر عنوان می‌نشیند تا ستون متن و انتخاب تعداد جا داشته باشند */
  .pack-opt { flex-wrap: wrap; row-gap: 6px; }
  .pack-price { order: 3; flex: 1 0 100%; margin: 0; padding-inline-start: 68px; text-align: start; }
  .pack-price .pack-per { display: inline; margin-inline-start: 4px; }
}

/* ============================================================
   تبلیغ خرید قسطی (ترب‌پی یا ارائه‌دهندهٔ دلخواه)
   ============================================================ */
/* نشان گوشهٔ عکس کارت محصول: لوگو، با هاور باز می‌شود */
.inst-badge { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 3; direction: rtl; pointer-events: none; }
.inst-badge .ipb-in {
  display: inline-flex; align-items: center; pointer-events: auto;
  background: #fff; border: 1px solid var(--ipb-accent, #9CE76A); border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08); overflow: hidden;
  transition: box-shadow .3s ease, padding .3s ease;
}
.inst-badge img, .inst-badge .ipb-ini { width: 26px; height: 26px; flex: 0 0 auto; display: block; object-fit: contain; }
.inst-badge .ipb-ini { display: grid; place-items: center; border-radius: 50%; background: var(--ipb-accent); color: var(--ipb-ink); font-size: 12px; font-weight: 800; }
.inst-badge .ipb-txt {
  max-width: 0; opacity: 0; white-space: nowrap; overflow: hidden;
  font-size: 11.5px; font-weight: 600; color: var(--ipb-ink, #003D01);
  transition: max-width .3s ease, opacity .3s ease, margin .3s ease;
}
.inst-badge .ipb-txt b { font-weight: 800; }
@media (hover: hover) {
  .product-card:hover .inst-badge .ipb-in, .inst-badge:hover .ipb-in { box-shadow: 0 6px 16px rgba(0,61,1,.14); }
  .product-card:hover .inst-badge .ipb-txt, .inst-badge:hover .ipb-txt { max-width: 220px; opacity: 1; margin-inline: 4px 10px; }
}
/* برچسب تخفیف هم‌گوشه است؛ زیر نشان قسطی می‌نشیند */
.product-card .thumb:has(.inst-badge) .tag-off { top: 46px; }
@media (prefers-reduced-motion: reduce) { .inst-badge .ipb-in, .inst-badge .ipb-txt { transition: none; } }

/* نوار تبلیغی بالای سبد خرید */
.inst-cart {
  display: flex; align-items: center; gap: 14px; margin: 0 0 18px; padding: 14px 16px;
  border-radius: 16px; border: 1px solid color-mix(in srgb, var(--ipb-accent, #9CE76A) 70%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--ipb-accent, #9CE76A) 22%, #fff), #fff 70%);
  color: var(--ipb-ink, #003D01);
}
.inst-cart-mark { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 14px; background: #fff; display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.inst-cart-mark img { width: 40px; height: 40px; object-fit: contain; }
.inst-cart-mark .ipb-ini { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--ipb-accent); color: var(--ipb-ink); font-weight: 800; font-size: 18px; }
.inst-cart-t { flex: 1; min-width: 0; }
.inst-cart-t strong { display: block; font-size: 15px; font-weight: 800; }
.inst-cart-t p { margin: 3px 0 0; font-size: 13px; line-height: 1.9; color: color-mix(in srgb, var(--ipb-ink, #003D01) 80%, #555); }
.inst-cart-t p b { color: var(--ipb-ink, #003D01); white-space: nowrap; }
.inst-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex: 0 0 auto; }
.inst-steps li { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1.5px solid var(--ipb-accent, #9CE76A); font-size: 12px; font-weight: 800; color: var(--ipb-ink, #003D01); }
.inst-steps li:first-child { background: var(--ipb-accent, #9CE76A); }
.inst-cart-more { flex: 0 0 auto; font-size: 12.5px; font-weight: 700; color: var(--ipb-ink, #003D01); text-decoration: underline; text-underline-offset: 3px; }
.inst-cart.is-image { padding: 0; border: 0; background: none; display: block; overflow: hidden; }
.inst-cart.is-image img { display: block; width: 100%; height: auto; border-radius: 16px; }
@media (max-width: 640px) {
  .inst-cart { flex-wrap: wrap; padding: 12px; gap: 10px 12px; }
  .inst-cart-mark { width: 44px; height: 44px; }
  .inst-cart-mark img { width: 34px; height: 34px; }
  .inst-cart-t { flex-basis: calc(100% - 60px); }
  .inst-steps { width: 100%; justify-content: center; }
}
/* عکس کارت (cover، تمام‌عرض، زوم با هاور) نباید به لوگوی نشان قسطی سرایت کند */
.product-card .thumb .inst-badge img,
.product-card:hover .thumb .inst-badge img {
  position: static !important; inset: auto !important;
  width: 26px !important; height: 26px !important; max-width: none !important;
  aspect-ratio: 1 !important; object-fit: contain !important;
  transform: none !important; filter: none !important; opacity: 1 !important;
  border-radius: 50% !important; margin: 0 !important; background: none !important;
}
.inst-steps li.is-gap { border: 0; background: none; width: auto; min-width: 14px; }

/* ==========================================================================
   پیشنهاد شگفت‌انگیز (بلوک صفحهٔ اصلی — الهام از دیجی‌کالا)
   رنگ نوار از چیدمان قابل تغییر است (--deal)
   ========================================================================== */
.deals { --deal: #EF394E; padding: 18px 0; }
.deals-band {
  position: relative; display: grid; grid-template-columns: 172px minmax(0, 1fr); align-items: stretch; gap: 0;
  background: var(--deal); border-radius: calc(var(--radius, 14px) + 6px); padding: 18px 0 18px 18px; overflow: hidden;
  isolation: isolate;
}
/* نقش‌مایهٔ ملایم پس‌زمینه */
.deals-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 92% 12%, rgba(255,255,255,.22) 0 46px, transparent 47px),
    radial-gradient(circle at 84% 88%, rgba(255,255,255,.12) 0 70px, transparent 71px),
    linear-gradient(160deg, rgba(255,255,255,.10), rgba(0,0,0,.08));
}
.deals-head {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 6px 14px; color: #fff; text-align: center;
}
.deals-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.deals-mark {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.18); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
  animation: deals-pulse 2.6s ease-in-out infinite;
}
@keyframes deals-pulse { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.06) rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .deals-mark { animation: none; } }
.deals-title { margin: 0; font-size: 21px; font-weight: 900; line-height: 1.45; color: #fff; letter-spacing: -.2px; }
.deals-timer { display: flex; flex-direction: column; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.deals-clock { display: inline-flex; align-items: center; gap: 3px; }
.deals-clock span {
  min-width: 30px; height: 30px; padding: 0 4px; border-radius: 8px; display: grid; place-items: center;
  background: #fff; color: var(--deal); font-weight: 800; font-size: 14px; box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.deals-clock i { font-style: normal; font-weight: 800; color: #fff; }
.deals-days { font-size: 12px; font-weight: 700; color: #fff; opacity: .95; }
.deals-all {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px;
  color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; background: rgba(255,255,255,.16);
  transition: background .15s;
}
.deals-all:hover { background: rgba(255,255,255,.28); color: #fff; }

.deals-rail { position: relative; min-width: 0; }
.deals-track {
  display: flex; gap: 3px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; border-radius: calc(var(--radius, 14px) - 2px);
  overscroll-behavior-x: contain;
}
.deals-track::-webkit-scrollbar { display: none; }

.deal-card {
  position: relative; flex: 0 0 auto; width: 188px; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 12px;
  background: var(--c-surface, #fff); color: var(--c-text, #1f2937); text-decoration: none;
  transition: box-shadow .18s, transform .18s;
}
.deal-card:first-child { border-start-start-radius: inherit; border-end-start-radius: inherit; }
.deal-card:hover { z-index: 1; box-shadow: 0 10px 26px rgba(15,23,42,.16); color: var(--c-text, #1f2937); }
.deal-media { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--c-soft, #f5f5f7); }
.deal-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.deal-card:hover .deal-media img { transform: scale(1.04); }
.deal-name {
  font-size: 13px; line-height: 1.75; font-weight: 600; min-height: calc(1.75em * 2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.deal-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.deal-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.deal-price { font-size: 15px; font-weight: 800; white-space: nowrap; }
.deal-price small { font-size: 11px; font-weight: 600; margin-inline-start: 3px; color: var(--c-muted, #6b7280); }
.deal-off {
  flex: none; min-width: 38px; padding: 2px 7px; border-radius: 999px; text-align: center;
  background: var(--deal); color: #fff; font-size: 12px; font-weight: 800;
}
.deal-old { align-self: flex-start; font-size: 12px; color: var(--c-muted, #9ca3af); text-decoration-thickness: 1px; }
.deal-card.is-out .deal-media img { filter: grayscale(1); opacity: .55; }
.deal-soldout {
  position: absolute; inset: auto 8px 8px; padding: 3px 0; border-radius: 8px; text-align: center;
  background: rgba(17,24,39,.75); color: #fff; font-size: 12px; font-weight: 700;
}
.deal-more {
  width: 150px; align-items: center; justify-content: center; gap: 10px; text-align: center;
  font-weight: 700; font-size: 14px; color: var(--deal); border-start-end-radius: inherit; border-end-end-radius: inherit;
}
.deal-more:hover { color: var(--deal); }
.deal-more-ico { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; border: 2px solid currentColor; }

.deals-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--c-surface, #fff); color: var(--c-text, #1f2937);
  box-shadow: 0 4px 14px rgba(15,23,42,.22); transition: transform .15s, opacity .15s;
}
.deals-nav:hover { transform: translateY(-50%) scale(1.08); }
.deals-nav.is-prev { inset-inline-start: 6px; }
.deals-nav.is-next { inset-inline-end: 6px; }

@media (max-width: 900px) {
  .deals-band { grid-template-columns: 140px minmax(0, 1fr); }
  .deals-title { font-size: 18px; }
  .deal-card { width: 170px; }
}
/* موبایل: سرتیتر افقی بالای نوار، کارت‌ها با کشیدن انگشت */
@media (max-width: 680px) {
  .deals { padding: 12px 0; }
  .deals .wrap { width: 100%; }
  .deals-band { grid-template-columns: 1fr; padding: 12px 0 14px; border-radius: 0; gap: 10px; }
  .deals-head { flex-direction: row; justify-content: space-between; gap: 8px; padding: 0 16px; }
  .deals-brand { flex-direction: row; gap: 8px; min-width: 0; }
  .deals-mark { width: 38px; height: 38px; }
  .deals-mark svg { width: 22px; height: 22px; }
  .deals-title { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .deals-timer { flex-direction: row; gap: 6px; margin-inline-start: auto; }
  .deals-clock span { min-width: 26px; height: 26px; font-size: 12.5px; border-radius: 7px; }
  .deals-all { padding: 5px 9px; font-size: 12px; }
  .deals-all { display: none; }               /* «مشاهده همه» در انتهای ریل هم هست */
  .deals-track { padding-inline: 16px; scroll-padding-inline: 16px; border-radius: 0; gap: 8px; scroll-snap-type: x proximity; }
  .deal-card { width: 42vw; max-width: 180px; min-width: 140px; border-radius: 12px; padding: 10px 10px 10px; }
  .deal-card:first-child { border-radius: 12px; }
  .deal-more { width: 120px; border-radius: 12px; }
  .deals-nav { display: none; }
  .deal-price { font-size: 14px; }
}
@media (hover: none) { .deals-nav { display: none; } }
.deals-nav.is-hidden { opacity: 0; pointer-events: none; }

/* کارت شگفت‌انگیز: لینک محصول + دکمهٔ افزودن به سبد */
.deal-link { flex: 1; display: flex; flex-direction: column; gap: 8px; color: inherit; text-decoration: none; min-width: 0; }
.deal-link:hover { color: inherit; }
.deal-add { margin: 2px 0 0; }
.deal-add button, a.deal-add.is-view {
  width: 100%; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 10px; border: 1.5px solid var(--deal); background: transparent; color: var(--deal);
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background .15s, color .15s, transform .1s;
}
.deal-add button:hover, .deal-add button:focus-visible { background: var(--deal); color: #fff; }
.deal-add button:active { transform: scale(.97); }
.deal-add button:disabled { opacity: .75; cursor: progress; }
a.deal-add.is-view { border-color: var(--c-border, #e5e7eb); color: var(--c-muted, #6b7280); text-decoration: none; }
a.deal-add.is-view:hover { border-color: var(--c-text, #111827); color: var(--c-text, #111827); }
@media (max-width: 680px) {
  .deal-add button, a.deal-add.is-view { height: 34px; font-size: 12px; gap: 4px; }
  .deal-add button svg { width: 14px; height: 14px; }
}
