/* ============================================================
   کارت محصول صفحهٔ نخست — طراحی جدید (مستقل از استایل‌های قبلی)
   فایل: /assets/product-card-home.css
   ============================================================ */

/* فاصله افقی مشترک صفحهٔ نخست — مثل هایلایت و پروفایل */
body.home-pcard-v2 {
  --home-inset: 12px;
}

.product-grid-home {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 !important;
  width: 100%;
  box-sizing: border-box;
}

/* فقط خود section یک‌بار inset می‌گیرد — نه grid جداگانه */
body.home-pcard-v2 .section:has(.product-grid-home) {
  margin-left: var(--home-inset) !important;
  margin-right: var(--home-inset) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}

body.home-pcard-v2 .section:has(.product-grid-home) .section-head {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.home-pcard-v2 .section:has(.product-grid-home) .product-grid-home {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* هایلایت و پروفایل هم همان inset */
body.home-pcard-v2 .hhl {
  padding-left: var(--home-inset) !important;
  padding-right: var(--home-inset) !important;
}

body.home-pcard-v2 .hpc {
  margin-left: var(--home-inset) !important;
  margin-right: var(--home-inset) !important;
}

@media (min-width: 640px) {
  body.home-pcard-v2 {
    --home-inset: 16px;
  }
  .product-grid-home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (min-width: 960px) {
  .product-grid-home {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }
}

/* --- کارت --- */
.pcard-home {
  --pcard-radius: 22px;
  /* رنگ دکمه از تم فروشگاه (پنل) — fallback در صورت نبودن تم */
  --pcard-btn: var(--primary, #6b4e3d);
  --pcard-btn-hover: var(--primary-dark, #5a4032);
  --pcard-btn-text: var(--btn-on-primary, #fff);
  --pcard-price: #c45c3a;
  --pcard-old: #9ca3af;
  --pcard-stock: #16a34a;
  --pcard-oos: #ef4444;
  --pcard-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  --pcard-shadow-hover: 0 18px 40px rgba(15, 23, 42, 0.14);

  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--pcard-radius);
  box-shadow: var(--pcard-shadow);
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  direction: rtl;
  height: 100%;
  min-height: 250px; /* موبایل */
}

.pcard-home:hover {
  transform: translateY(-6px);
  box-shadow: var(--pcard-shadow-hover);
}

/* --- تصویر --- */
.pcard-home-img-wrap {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1.05;
  overflow: hidden;
  background: #f5f3f0;
  border-radius: var(--pcard-radius) var(--pcard-radius) 0 0;
}

.pcard-home-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.pcard-home:hover .pcard-home-img-wrap img {
  transform: scale(1.05);
}

/* بج‌ها روی تصویر — موقعیت مطلق برای کنترل دقیق در RTL */
.pcard-home-badges {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.pcard-home-badge {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* تعداد عکس: سمت چپ تصویر (در صفحه RTL = left) */
.pcard-home-badge-photos {
  left: 12px;
  right: auto;
  background: rgba(40, 40, 45, 0.82);
  color: #fff;
  backdrop-filter: blur(6px);
}

.pcard-home-badge-photos svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* تخفیف: سمت راست تصویر */
.pcard-home-badge-discount {
  right: 12px;
  left: auto;
  background: #e83a5a;
  color: #fff;
}

/* --- بدنه --- */
.pcard-home-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px 18px;
  flex: 1;
}

.pcard-home-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.55;
  color: #1f2937;
}

.pcard-home-title a {
  color: inherit;
  text-decoration: none;
}

.pcard-home-title a:hover {
  color: var(--pcard-btn);
}

/* متا: ستون راست = موجودی + تعداد | ستون چپ = قیمت‌ها */
.pcard-home-meta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 1px;
}

.pcard-home-col-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  flex-shrink: 0;
}

.pcard-home-col-left {
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* در RTL = سمت چپ کارت */
  gap: 2px;
}

.pcard-home-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  flex-shrink: 0;
}

.pcard-home-stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pcard-stock);
  flex-shrink: 0;
}

.pcard-home-stock.is-oos {
  color: var(--pcard-oos, #ef4444);
}

.pcard-home-stock.is-oos .pcard-home-stock-dot {
  background: var(--pcard-oos, #ef4444);
}

.pcard-home-prices {
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* سمت چپ کارت در RTL */
  gap: 2px;
  text-align: left;
  width: 100%;
}

.pcard-home-price-old {
  font-size: 12.5px;
  color: #6b7280;
  text-decoration: line-through;
  font-weight: 500;
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 4px;
  direction: ltr;
}

.pcard-home-price-new {
  font-size: 16px;
  font-weight: 800;
  color: #000;
  letter-spacing: -0.01em;
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 4px;
  direction: ltr;
}

.pcard-home-price-call {
  font-size: 14px;
  font-weight: 700;
  color: #6b7280;
}

/* تعداد */
.pcard-home-qty {
  display: inline-flex;
  align-items: center;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 3px;
  width: fit-content;
  gap: 0;
}

.pcard-home-qty button {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 600;
  color: #4b5563;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

.pcard-home-qty button:hover {
  background: #e5e7eb;
  color: #111;
}

.pcard-home-qty input {
  width: 36px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  padding: 0;
  outline: none;
  -moz-appearance: textfield;
}

.pcard-home-qty input::-webkit-outer-spin-button,
.pcard-home-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* دکمه افزودن */
.pcard-home-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: auto;
  padding: 13px 16px;
  border: none;
  border-radius: 999px;
  background: var(--pcard-btn);
  color: var(--pcard-btn-text);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  font-family: inherit;
}

.pcard-home-add:hover {
  background: var(--pcard-btn-hover);
}

.pcard-home-add:active {
  transform: scale(0.98);
}

.pcard-home-add svg,
.pcard-home-cart-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  /* جهت آیکون سبد به سمت چپ */
  transform: scaleX(-1);
}

.pcard-home-add:disabled,
.pcard-home-add.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* تماس بگیرید (قیمت صفر) */
.pcard-home-call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: auto;
  padding: 13px 16px;
  border-radius: 999px;
  background: var(--pcard-btn);
  color: var(--pcard-btn-text);
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}

.pcard-home-call-btn:hover {
  background: var(--pcard-btn-hover);
  color: var(--pcard-btn-text);
}

/* موبایل */
@media (max-width: 480px) {
  .pcard-home-body {
    padding: 14px 14px 16px;
    gap: 10px;
  }

  .pcard-home-title {
    font-size: 14.5px;
  }

  .pcard-home-price-new {
    font-size: 15px;
  }

  .pcard-home-add,
  .pcard-home-call-btn {
    padding: 12px 14px;
    font-size: 13.5px;
  }
}

/* ============================================================
   کارت پروفایل صفحهٔ نخست (hpc) — طبق ماکاپ
   ============================================================ */

.hpc {
  --hpc-radius: 24px;
  --hpc-gold: #e8b923;
  --hpc-gold-dark: #d4a017;
  --hpc-navy: #0f2744;
  margin: 16px 12px 20px;
  background: #fff;
  border-radius: var(--hpc-radius);
  box-shadow: 0 10px 36px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  direction: rtl;
}

/* کاور */
.hpc-cover {
  position: relative;
  height: 150px;
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: #0c1f38;
  background-image: url('/assets/bg-cover-1.png');
  background-position: center center;
  background-size: 100% 100%; /* کامل در عرض و ارتفاع، بدون کراپ کناری */
  background-repeat: no-repeat;
  overflow: hidden;
  border-radius: var(--hpc-radius, 24px) var(--hpc-radius, 24px) 0 0;
}

/* بدنه */
.hpc-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 20px 22px;
}

/* آواتار روی همپوشانی کاور */
.hpc-avatar-wrap {
  position: relative;
  margin-top: -48px;
  margin-bottom: 12px;
}

.hpc-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 4px solid #fff;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.15);
  background: #f3f4f6;
}

.hpc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* تیک تأیید طلایی */
.hpc-verified {
  position: absolute;
  bottom: 2px;
  left: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f5d76e 0%, #e8b923 45%, #c9920e 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 8px rgba(201, 146, 14, 0.45);
}

.hpc-verified svg {
  display: block;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}

.hpc-name {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 900;
  color: var(--hpc-navy, #0f2744);
  line-height: 1.4;
}

/* توضیحات — حدود ۱٫۵ خط + لینک بیشتر */
.hpc-desc {
  width: 100%;
  max-width: 420px;
  margin: 0 0 16px;
}

.hpc-desc-content {
  font-size: 13.5px;
  line-height: 1.85;
  color: #6b7280;
  margin: 0;
}

.hpc-desc.is-collapsed .hpc-desc-content {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-height: calc(1.85em * 2);
}

.hpc-desc-more {
  display: inline-block;
  margin-top: 4px;
  padding: 0;
  border: none;
  background: none;
  color: var(--primary, #2563eb);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.hpc-desc-more:hover {
  text-decoration: none;
  opacity: 0.85;
}

/* دکمه خبرنامه */
.hpc-newsletter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #f0c94a 0%, var(--hpc-gold) 50%, var(--hpc-gold-dark) 100%);
  color: var(--hpc-navy, #0f2744);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 6px 18px rgba(212, 160, 23, 0.35);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.15s;
  margin-bottom: 20px;
}

.hpc-newsletter-btn:hover {
  filter: brightness(1.04);
  box-shadow: 0 8px 22px rgba(212, 160, 23, 0.45);
  transform: translateY(-1px);
}

.hpc-newsletter-btn:active {
  transform: scale(0.98);
}

.hpc-newsletter-btn svg {
  flex-shrink: 0;
}

/* آمار — آیکون سمت راست | تعداد + برچسب زیر آن سمت چپ */
.hpc-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 340px;
}

.hpc-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  padding: 6px 16px;
  border-radius: 12px;
  transition: background 0.15s;
}

.hpc-stat:hover {
  background: #f8fafc;
}

/* در RTL: اولین فرزند (متن) سمت راست، آیکون سمت چپ می‌شود.
   برای آیکون سمت راست: ترتیب DOM = متن سپس آیکون، با direction:rtl روی .hpc-stat
   یا flex-direction: row با order. ساختار فعلی: text سپس icon
   با direction:rtl روی کارت، icon می‌رود سمت چپ.
   برای آیکون سمت راست بصری: از order استفاده می‌کنیم. */
.hpc-stat-icon {
  order: -1; /* در RTL با order:-1 آیکون می‌رود سمت راست */
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hpc-stat-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: right;
}

.hpc-stat-num {
  font-size: 18px;
  font-weight: 900;
  color: var(--hpc-navy, #0f2744);
  line-height: 1.15;
}

.hpc-stat-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #6b7280;
  line-height: 1.2;
}

.hpc-stat-icon-article {
  background: #e8eef8;
  color: #3b5bdb;
}

.hpc-stat-icon-product {
  background: #fef6e4;
  color: #b8860b;
}

.hpc-stats-divider {
  width: 1px;
  height: 32px;
  background: #e5e7eb;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .hpc {
    margin: 12px 8px 16px;
    border-radius: 20px;
  }

  .hpc-cover {
    height: 120px;
  }

  .hpc-avatar {
    width: 84px;
    height: 84px;
  }

  .hpc-avatar-wrap {
    margin-top: -42px;
  }

  .hpc-name {
    font-size: 18px;
  }

  .hpc-newsletter-btn {
    padding: 11px 22px;
    font-size: 13.5px;
    width: 100%;
    max-width: 280px;
  }

  .hpc-stat {
    padding: 6px 10px;
    gap: 6px;
  }

  .hpc-stat-num {
    font-size: 16px;
  }

  .hpc-stat-icon {
    width: 32px;
    height: 32px;
  }
}

/* ============================================================
   اسلایدر صفحهٔ نخست (hslider) — peek چپ/راست + گوشه گرد
   رنگ نقطه فعال = var(--primary) از تم پنل
   ============================================================ */

.hslider {
  padding: 12px 0 20px;
  margin: 0 0 8px;
  background: transparent;
  overflow: hidden;
}

.hslider-inner {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  background: transparent;
  touch-action: pan-y;
  user-select: none;
}

/* viewport کمی padding افقی تا لبه‌های اسلاید کناری دیده شود */
.hslider-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 0 28px;
}

.hslider-track {
  position: relative;
  width: 100%;
  /* ارتفاع پایدار برای اسلایدهای absolute — نسبت تقریبی بنر */
  min-height: 180px;
  aspect-ratio: 16 / 7;
  max-height: 420px;
  display: block;
}

/* اسلایدها روی هم با موقعیت مطلق — وسط فعال، چپ/راست peek */
.hslider-slide {
  position: absolute;
  top: 0;
  left: 50%;
  width: 88%;
  max-width: 920px;
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: #f3f0eb;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
  transform: translateX(-50%) scale(0.92);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
  transition:
    transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1),
    opacity 0.4s ease,
    visibility 0.4s ease,
    box-shadow 0.35s ease;
}

.hslider-slide.is-active {
  position: absolute;
  top: 0;
  left: 50%;
  width: 88%;
  transform: translateX(-50%) scale(1); /* بدون زوم اضافه */
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 3;
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.04),
    0 18px 44px rgba(15, 23, 42, 0.14);
}

/* اسلاید قبلی — کمی از سمت چپ دیده می‌شود */
.hslider-slide.is-prev {
  transform: translateX(calc(-50% - 58%)) scale(0.88);
  opacity: 0.55;
  visibility: visible;
  pointer-events: none;
  z-index: 2;
}

/* اسلاید بعدی — کمی از سمت راست دیده می‌شود */
.hslider-slide.is-next {
  transform: translateX(calc(-50% + 58%)) scale(0.88);
  opacity: 0.55;
  visibility: visible;
  pointer-events: none;
  z-index: 2;
}

.hslider-slide img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 22px;
}

.hslider-slide {
  height: 100%;
}

.hslider-slide a {
  height: 100%;
}

.hslider-slide a {
  display: block;
  line-height: 0;
  border-radius: 22px;
  overflow: hidden;
}

/* دکمه‌های قبلی/بعدی — دایره سفید */
.hslider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.15s, box-shadow 0.2s;
}

.hslider-btn:hover {
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.2);
  transform: translateY(-50%) scale(1.06);
}

.hslider-btn:active {
  transform: translateY(-50%) scale(0.96);
}

.hslider-prev {
  left: 10px;
}

.hslider-next {
  right: 10px;
}

.hslider-btn svg {
  display: block;
}

/* نقطه‌ها — فعال = رنگ تم پنل */
.hslider-dots {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding: 0;
}

.hslider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: #d1d5db;
  cursor: pointer;
  transition: width 0.2s, background 0.2s, border-radius 0.2s;
}

.hslider-dot.is-active {
  width: 22px;
  border-radius: 999px;
  background: var(--primary, #5c4033);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb, 92, 64, 51), 0.35);
}

@media (max-width: 640px) {
  .hslider {
    padding: 8px 0 14px;
  }

  .hslider-viewport {
    padding: 0 8px; /* کمتر تا اسلاید عریض‌تر دیده شود */
  }

  .hslider-track {
    aspect-ratio: 16 / 9;
    max-height: 280px;
  }

  .hslider-slide,
  .hslider-slide.is-active {
    width: 94%; /* عریض‌تر — دکمه‌ها روی اسلاید فعال */
    border-radius: 18px;
    transform: translateX(-50%) scale(1);
  }

  .hslider-slide.is-prev {
    transform: translateX(calc(-50% - 70%)) scale(0.96);
    opacity: 0.4;
  }

  .hslider-slide.is-next {
    transform: translateX(calc(-50% + 70%)) scale(0.96);
    opacity: 0.4;
  }

  .hslider-slide img {
    border-radius: 18px;
    object-fit: cover;
    /* بدون زوم بصری */
    transform: none;
  }

  .hslider-slide a {
    border-radius: 18px;
  }

  .hslider-btn {
    width: 36px;
    height: 36px;
  }

  /* دکمه‌ها روی خود اسلاید فعال */
  .hslider-prev {
    left: 8%;
  }

  .hslider-next {
    right: 8%;
  }

  .hslider-dots {
    margin-top: 10px;
  }
}

@media (min-width: 960px) {
  .hslider {
    padding: 16px 0 24px;
  }

  .hslider-viewport {
    padding: 0 40px;
  }

  .hslider-slide {
    width: 78%;
  }

  .hslider-slide.is-prev {
    transform: translateX(calc(-50% - 55%)) scale(0.88);
  }

  .hslider-slide.is-next {
    transform: translateX(calc(-50% + 55%)) scale(0.88);
  }

  .hslider-slide img {
    max-height: 400px;
  }

  .hslider-prev {
    left: 16px;
  }

  .hslider-next {
    right: 16px;
  }
}

/* ============================================================
   هایلایت‌های صفحهٔ نخست (hhl) — طبق ماکاپ
   ============================================================ */

.hhl {
  padding: 8px 12px 16px;
  margin: 0;
}

.hhl-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  padding: 20px 18px 22px;
  direction: rtl;
}

.hhl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.hhl-head-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.hhl-accent {
  width: 4px;
  height: 36px;
  border-radius: 4px;
  background: var(--primary, #e8b923);
  flex-shrink: 0;
  margin-top: 2px;
}

.hhl-head-text {
  min-width: 0;
}

.hhl-title {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  color: #0f2744;
  line-height: 1.35;
}

.hhl-sub {
  margin: 2px 0 0;
  font-size: 12.5px;
  font-weight: 500;
  color: #9ca3af;
  line-height: 1.4;
}

.hhl-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fef6e4;
  color: #b8860b;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.hhl-badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d4a017;
}

.hhl-badge-text {
  line-height: 1;
}

/* ردیف افقی اسکرول‌پذیر */
.hhl-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.hhl-row::-webkit-scrollbar {
  display: none;
}

.hhl-item.hl-circle {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 78px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  scroll-snap-align: start;
  font-family: inherit;
}

.hhl-avatar.hl-circle-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
  border: none !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  background: #f8fafc;
  transition: transform 0.2s, box-shadow 0.2s;
}

.hhl-item:hover .hhl-avatar {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.hhl-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hhl-label.hl-circle-label {
  font-size: 12px;
  font-weight: 700;
  color: #0f2744;
  text-align: center;
  line-height: 1.35;
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}

@media (max-width: 480px) {
  .hhl {
    padding: 6px 8px 12px;
  }

  .hhl-card {
    border-radius: 20px;
    padding: 16px 14px 18px;
  }

  .hhl-title {
    font-size: 15.5px;
  }

  .hhl-badge {
    padding: 6px 10px;
    font-size: 11.5px;
  }

  .hhl-item.hl-circle {
    width: 70px;
  }

  .hhl-avatar.hl-circle-ring {
    width: 64px;
    height: 64px;
  }

  .hhl-label.hl-circle-label {
    font-size: 11.5px;
    max-width: 70px;
  }
}

@media (min-width: 768px) {
  .hhl {
    padding: 10px 16px 18px;
  }

  .hhl-card {
    padding: 22px 24px 24px;
  }

  .hhl-row {
    gap: 18px;
  }

  .hhl-item.hl-circle {
    width: 88px;
  }

  .hhl-avatar.hl-circle-ring {
    width: 80px;
    height: 80px;
  }

  .hhl-label.hl-circle-label {
    max-width: 88px;
    font-size: 12.5px;
  }
}

/* ============================================================
   هدر ثابت فرانت (htb) — طبق ماکاپ
   ============================================================ */

/* هدر ثابت — عرض هم‌راستا با ستون محتوا (محصولات/مقالات/هایلایت) */
header.store-topbar.htb {
  /* نمایش در همه عرض‌ها — استایل قدیمی display:none را خنثی می‌کند */
  display: block !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 900 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  padding: 10px var(--home-inset, 12px) 8px !important;
  margin: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  left: auto !important;
  right: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}

header.store-topbar.htb .htb-inner {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* در همه صفحات ویترین inset مشترک */
body.store-lux-v2 {
  --home-inset: 12px;
}
@media (min-width: 640px) {
  body.store-lux-v2 {
    --home-inset: 16px;
  }
}

.htb-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  direction: rtl;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
  padding: 8px 10px;
  max-width: 100%;
}

.htb-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.htb-left {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.htb-divider {
  width: 1px;
  height: 36px;
  background: #e8eaed;
  flex-shrink: 0;
  margin: 0 4px;
}

/* منو */
/* منو */
header.store-topbar.htb .htb-menu,
.htb-menu {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 5px !important;
  width: auto !important;
  height: auto !important;
  min-width: 48px !important;
  min-height: 0 !important;
  padding: 4px 6px !important;
  border: none !important;
  background: transparent !important;
  border-radius: 12px !important;
  cursor: pointer;
  box-shadow: none !important;
  overflow: visible !important;
}

/* استایل قدیمی .mobile-menu-btn span را کامل خنثی کن */
header.store-topbar.htb .htb-menu > span,
header.store-topbar.htb .htb-menu span {
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  border-radius: 0 !important;
}

header.store-topbar.htb .htb-menu-icon {
  width: 42px !important;
  height: 32px !important;
  border-radius: 999px !important;
  background: #f3f4f6 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #374151 !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

header.store-topbar.htb .htb-menu-icon svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
}

header.store-topbar.htb .htb-menu .htb-item-label {
  display: block !important;
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #6b7280 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  margin-top: 2px !important;
}

.htb-item-label {
  font-size: 10px;
  font-weight: 600;
  color: #6b7280;
  line-height: 1.2;
  white-space: nowrap;
}

/* برند */
.htb-brand.mobile-brand {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  max-width: none !important;
  overflow: visible !important;
  text-decoration: none !important;
  color: inherit !important;
  flex: 1 1 auto !important;
}

/* لوگو هدر — بدون border / سایه / قاب؛ فقط گوشه گرد */
header.store-topbar.htb .htb-logo,
.htb-logo {
  flex-shrink: 0 !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

header.store-topbar.htb .htb-logo img,
header.store-topbar.htb .htb-logo .store-logo,
header.store-topbar.htb .htb-logo .store-logo-wrap,
header.store-topbar.htb .htb-logo .store-logo-wrap img,
.htb-logo img,
.htb-logo .store-logo,
.htb-logo .store-logo-wrap,
.htb-logo .store-logo-wrap img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 12px !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

header.store-topbar.htb .htb-logo .store-logo-wrap {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

header.store-topbar.htb .htb-logo {
  position: relative !important;
}

.htb-logo .store-logo-fallback {
  color: #f5c542;
  font-weight: 900;
  font-size: 14px;
}

/* خط دوم: نام فروشگاه */
.htb-name.mobile-brand-name {
  font-size: 13px !important;
  font-weight: 600 !important; /* کمی کمتر */
  color: #0f2744 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  max-width: none !important;
  width: auto !important;
  min-width: 0 !important;
  line-height: 1.25 !important;
  display: block !important;
  order: 1 !important;
}

/* خط اول: تیک طلایی */
.htb-brand-text .htb-verified,
.htb-verified {
  position: static !important;
  flex-shrink: 0 !important;
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  background: linear-gradient(145deg, #f5d76e 0%, #e8b923 45%, #c9920e 100%) !important;
  color: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 4px rgba(201, 146, 14, 0.35) !important;
  border: none !important;
  margin: 0 !important;
  order: 0 !important;
}

.htb-verified svg {
  width: 10px !important;
  height: 10px !important;
  display: block !important;
}

/* دو خط کنار لوگو: خط ۱ تیک طلایی، خط ۲ نام فروشگاه */
.htb-brand-text {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 2px !important;
  min-width: 0 !important;
  max-width: none !important;
  overflow: visible !important;
  flex-shrink: 0 !important;
  line-height: 1.15 !important;
}

.htb-verified svg {
  display: block;
}

/* اکشن‌ها: جستجو / گزارش / سبد */
.htb-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 5px !important; /* فاصله عنوان از آیکون — هم‌خط با منو */
  min-width: 48px;
  padding: 4px 6px !important;
  border: none !important;
  background: transparent !important;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none !important;
  color: #374151 !important;
  box-shadow: none !important;
}

.htb-item .htb-item-label {
  margin-top: 0 !important;
  line-height: 1.2 !important;
}

.htb-icon-wrap {
  width: 42px;
  height: 32px;
  border-radius: 999px; /* بیضی / کپسولی */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.htb-icon-wrap svg {
  width: 18px;
  height: 18px;
}

.htb-icon-search {
  background: #f3f4f6;
  color: #374151;
}

.htb-icon-report {
  background: #fef3f2;
  color: #e11d48;
}

.htb-icon-cart {
  background: #f3f4f6;
  color: #0f2744;
}

.htb-cart-badge.cart-count {
  position: absolute;
  top: -4px;
  left: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e8b923;
  color: #0f2744;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(232, 185, 35, 0.4);
}

.htb-cart-badge.cart-count.hidden {
  display: none !important;
}

@media (max-width: 380px) {
  .htb-name.mobile-brand-name {
    max-width: none !important;
    font-size: 12.5px;
  }

  .htb-item-label {
    font-size: 9px;
  }

  .htb-item {
    min-width: 40px;
    padding: 2px 4px !important;
  }
}

@media (min-width: 768px) {
  header.store-topbar.htb {
    padding: 12px var(--home-inset, 16px) 10px !important;
  }

  .htb-inner {
    padding: 10px 14px;
    border-radius: 20px;
  }

  .htb-name.mobile-brand-name {
    max-width: none !important;
    font-size: 15px;
  }

  .htb-logo {
    width: 46px;
    height: 46px;
  }
}


/* ============================================================
   کارت مقاله صفحهٔ نخست (acard-home) — طبق ماکاپ
   هم‌راستا با محصولات از طریق --home-inset
   ============================================================ */

body.home-pcard-v2 .section-articles-home {
  margin-left: var(--home-inset, 12px) !important;
  margin-right: var(--home-inset, 12px) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}

body.home-pcard-v2 .section-articles-home .section-head {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.article-grid-home {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 720px) {
  .article-grid-home {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1100px) {
  .article-grid-home {
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
  }
}

.acard-home {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.14);
}

.acard-home-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.acard-home-media {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: #1a1a1a;
}

.acard-home-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.45s ease;
}

.acard-home:hover .acard-home-img {
  transform: scale(1.04);
}

/* بج تاریخ — بالا راست */
.acard-home-date {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(20, 24, 32, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  direction: ltr;
}

.acard-home-date svg {
  flex-shrink: 0;
  opacity: 0.9;
}

/* گرادیان + متن پایین */
.acard-home-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  padding: 22px 18px 18px;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 28%,
    rgba(0, 0, 0, 0.35) 52%,
    rgba(0, 0, 0, 0.78) 100%
  );
  text-align: right;
  direction: rtl;
  box-sizing: border-box;
}

.acard-home-title {
  margin: 0 0 8px;
  font-size: clamp(18px, 4.2vw, 26px);
  font-weight: 900;
  color: #fff;
  line-height: 1.35;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.acard-home-excerpt {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* دکمه مطالعه مقاله */
.acard-home-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 4px 4px 4px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.acard-home-cta-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
}

.acard-home-cta-icon svg {
  display: block;
}

.acard-home-cta-text {
  padding-left: 4px;
}

.acard-home:hover .acard-home-cta {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 480px) {
  .acard-home-media {
    aspect-ratio: 4 / 5;
  }

  .acard-home-overlay {
    padding: 18px 14px 14px;
  }

  .acard-home-title {
    font-size: 17px;
  }

  .acard-home-excerpt {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .acard-home-cta {
    font-size: 12.5px;
    gap: 8px;
    padding: 3px 3px 3px 12px;
  }

  .acard-home-cta-icon {
    width: 32px;
    height: 32px;
  }
}

/* ============================================================
   سایدبار جدید (nsb) — طبق ماکاپ
   ============================================================ */

/* سایدبار کشویی — در همه عرض‌ها پیش‌فرض بسته */
aside.store-sidebar.nsb {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 100vh !important;
  height: 100dvh !important;
  width: min(360px, 92vw) !important;
  max-width: 380px !important;
  background: #fff !important;
  border-radius: 24px 0 0 24px !important;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.14) !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border: none !important;
  z-index: 1000 !important;
  transform: translateX(105%) !important;
  transition: transform 0.3s ease !important;
  pointer-events: none;
}

aside.store-sidebar.nsb.open {
  transform: translateX(0) !important;
  pointer-events: auto;
}

/* وقتی سایدبار nsb است، محتوا همیشه تمام‌عرض (بدون حاشیه دسکتاپ) */
body.store-lux-v2 .store-main {
  margin-right: 0 !important;
}

body.store-lux-v2 .sidebar-close {
  display: flex !important;
}

/* overlay */
body.store-lux-v2 .sidebar-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999 !important;
  background: rgba(15, 23, 42, 0.45) !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

body.store-lux-v2 .sidebar-overlay.open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto;
}

.nsb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 10px;
  direction: rtl; /* برند راست، ضربدر چپ */
}

.nsb-close.sidebar-close {
  width: 36px !important;
  height: 36px !important;
  border-radius: 12px !important;
  border: none !important;
  background: var(--sidebar-close-bg, #f3f4f6) !important;
  color: var(--sidebar-close-text, #374151) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}
.nsb-close.sidebar-close svg {
  stroke: var(--sidebar-close-text, #374151) !important;
  color: var(--sidebar-close-text, #374151) !important;
}

.nsb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  justify-content: flex-start; /* در RTL: لوگو راست، متن چپ لوگو */
  direction: rtl;
}

.nsb-brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  overflow: hidden;
  background: #0f2744;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(15, 39, 68, 0.2);
}

.nsb-brand-logo img,
.nsb-brand-logo .store-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 14px;
  border: none !important;
}

.nsb-brand-logo .store-logo-fallback {
  color: #f5c542;
  font-weight: 900;
  font-size: 16px;
}

.nsb-brand-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* در RTL = سمت راستِ بصری کنار لوگو */
  justify-content: center;
  gap: 3px;
  text-align: right;
}

/* خط اول: تیک طلایی */
.nsb-brand-line1 {
  display: flex;
  align-items: center;
  min-height: 16px;
}

.nsb-name-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f5d76e 0%, #e8b923 45%, #c9920e 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(201, 146, 14, 0.35);
}

.nsb-name-check svg {
  width: 11px;
  height: 11px;
  display: block;
}

/* خط دوم: نام کامل فروشگاه */
.nsb-brand-name {
  display: block;
  max-width: 100%;
}

.nsb-brand-name strong {
  font-size: 15px;
  font-weight: 800;
  color: #0f2744;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* گرید دو ستونه بالای محصولات: خانه/پروفایل | ساعت باز/بسته */
.nsb-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 4px 14px 12px;
  direction: rtl; /* ستون راست = خانه/پروفایل */
}

.nsb-top-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nsb-top-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  color: var(--sidebar-link-text, #0f2744);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.nsb-top-link:hover {
  background: var(--sidebar-btn-hover-bg, #f1f5f9);
  color: var(--sidebar-btn-hover-text, var(--sidebar-link-text, #0f2744));
}

.nsb-mini-ic {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e8eef5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f2744;
  flex-shrink: 0;
}

.nsb-top-hours {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--sidebar-hours-bg, #ecfdf5);
  border: 1.5px solid var(--sidebar-hours-border, #059669);
  color: var(--sidebar-hours-text, #065f46);
}

.nsb-top-hour {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
}

.nsb-top-hour-label {
  opacity: 0.85;
}

.nsb-top-hour strong {
  font-weight: 900;
  color: var(--sidebar-hours-text, #047857);
  font-size: 13.5px;
  letter-spacing: 0.02em;
}

.nsb-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 20px;
  -webkit-overflow-scrolling: touch;
}

.nsb-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* آیتم منو */
.nsb-item.sidebar-link,
a.nsb-item,
summary.nsb-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 12px 12px !important;
  border-radius: 14px !important;
  background: #f8fafc !important;
  border: 1px solid #eef2f7 !important;
  color: #0f2744 !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  cursor: pointer;
  list-style: none;
  box-shadow: none !important;
  margin: 0 !important;
  width: 100%;
  box-sizing: border-box;
  direction: rtl;
}

.nsb-item.sidebar-link:hover,
a.nsb-item:hover,
summary.nsb-item:hover {
  background: #f1f5f9 !important;
}

.nsb-ic {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e8eef5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f2744;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.nsb-label {
  flex: 1;
  text-align: right;
}

.nsb-chev {
  color: #9ca3af;
  display: flex;
  flex-shrink: 0;
}

.nsb-caret {
  color: #9ca3af;
  display: flex;
  margin-right: auto;
  transition: transform 0.2s;
}

.nsb-group[open] > summary .nsb-caret {
  transform: rotate(180deg);
}

.nsb-group > summary.nsb-item::-webkit-details-marker,
.nsb-group > summary.nsb-item::marker {
  display: none;
  content: '';
}

/* مخفی کردن ::after قدیمی سایدبار */
.nsb-group > summary.sidebar-link::after {
  display: none !important;
  content: none !important;
}

.nsb-subwrap {
  margin: 6px 0 4px;
  padding: 4px;
  border-radius: 14px;
  background: #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nsb-sub.sidebar-sublink {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 11px 12px !important;
  border-radius: 10px !important;
  color: var(--sidebar-link-text, #374151) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  background: transparent !important;
  direction: rtl;
}

.nsb-sub.sidebar-sublink:hover {
  background: #fff !important;
  color: var(--sidebar-btn-hover-text, var(--sidebar-link-text, #374151)) !important;
}

.nsb-sub.sidebar-sublink .nsb-chev,
.nsb-sub.sidebar-sublink .nsb-chev svg {
  color: var(--sidebar-chevron, #9ca3af) !important;
  stroke: var(--sidebar-chevron, #9ca3af) !important;
}

.nsb-cart-badge.cart-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e8b923 !important;
  color: #0f2744 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
}

.nsb-cart-badge.cart-count.hidden {
  display: none !important;
}

/* کارت تماس */
.nsb-phone {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f0f7ff;
  border: 1px solid #dbeafe;
  text-decoration: none;
  color: var(--sidebar-phone-text, #0f2744);
  direction: rtl;
}

.nsb-phone-ic {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.nsb-phone-text {
  flex: 1;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nsb-phone-text strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--sidebar-phone-text, inherit);
}

.nsb-phone-text small {
  font-size: 11.5px;
  color: #9ca3af;
  font-weight: 600;
}

/* دکمه‌های پایین */
.nsb-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.nsb-act {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  direction: rtl;
  text-align: right;
  font-family: inherit;
}

.nsb-act-install {
  background: #ecfdf5;
  color: #047857;
}

.nsb-act-report {
  background: #fef2f2;
  color: #b91c1c;
}

.nsb-act-ic {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nsb-act-install .nsb-act-ic {
  background: #d1fae5;
  color: #059669;
}

.nsb-act-report .nsb-act-ic {
  background: #fee2e2;
  color: #dc2626;
}

.nsb-act-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.nsb-act-text strong {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.nsb-act-text small {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.75;
}

.nsb-act .nsb-chev {
  opacity: 0.6;
}

@media (max-width: 380px) {
  .nsb-actions {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   اطلاعیه سراسری (sanc) — طبق ماکاپ
   ============================================================ */


.store-announce.sanc {
  margin: 8px 10px 12px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
}

.sanc-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  direction: rtl;
  background: transparent;
  border-radius: 12px;
  padding: 0;
  box-shadow: none;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.sanc-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  box-sizing: border-box;
}

/* ردیف عنوان: سفید، عریض، فاصله از لبه */
.sanc-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border-radius: 12px 12px 0 0;
  padding: 5px 10px;
  border: 1px solid #fecdd3;
  border-bottom: none;
}

.sanc-title-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* آیکون قرمز با border قرمز کنار عنوان (سمت راست در RTL) */
.sanc-icon-bang {
  color: #e11d48;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e11d48;
  border-radius: 50%;
  background: #fff;
  box-sizing: border-box;
}

.sanc-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #be123c;
  line-height: 1.3;
}

/* متن اطلاعیه — بک‌گراند قرمز روشن، عریض، فاصله از لبه */
.sanc-text.store-announce-text {
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: #9f1239;
  line-height: 1.6;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 16px 12px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-top: none;
  border-radius: 0 0 12px 12px;
}

.sanc-badge,
.sanc-badge-circle,
.sanc-badge-bang {
  display: none !important;
}

/* دکمه بستن کنار عنوان اطلاعیه (سمت چپ در RTL) */
.sanc-close.store-announce-close {
  flex-shrink: 0;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  border: none !important;
  background: #fecdd3 !important;
  color: #9f1239 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  padding: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
}
.sanc-title-row .sanc-close { order: unset; }


@media (max-width: 480px) {
  .sanc-inner {
    padding: 12px 0 12px 10px;
    min-height: 64px;
    gap: 8px;
  }

  .sanc-badge {
    width: 58px;
    min-width: 58px;
  }

  .sanc-badge-circle {
    width: 34px;
    height: 34px;
  }

  .sanc-badge-bang {
    font-size: 18px;
  }

  .sanc-title {
    font-size: 13.5px;
  }

  .sanc-text.store-announce-text {
    font-size: 11.5px;
  }
}


/* هایلایت + پروفایل کنار هم در دسکتاپ */
.home-hl-profile-row {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  box-sizing: border-box;
}

.home-hl-profile-row .hhl,
.home-hl-profile-row .hpc {
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .home-hl-profile-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: stretch;
    padding: 0;
    margin: 0 var(--home-inset, 12px) 12px;
  }

  body.home-pcard-v2 .home-hl-profile-row .hhl {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  body.home-pcard-v2 .home-hl-profile-row .hpc {
    margin: 0 !important;
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .home-hl-profile-row .hhl-card {
    flex: 1 1 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }

  .home-hl-profile-row .hhl-row {
    flex: 1 1 auto;
  }

  .home-hl-profile-row .hpc {
    height: 100%;
  }

  .home-hl-profile-row .hpc-body {
    flex: 1 1 auto;
  }
}


/* ============================================================
   صفحه نخست — لایه‌بندی v3 (هدر مینیمال، هایلایت ساده، ۲ستونه، پروفایل وسط)
   ============================================================ */

body.home-layout-v3 .store-topbar.htb-minimal {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

body.home-layout-v3 .htb-inner-minimal {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 52px;
  padding: 8px 12px;
}

body.home-layout-v3 .htb-brand,
body.home-layout-v3 .topbar-actions,
body.home-layout-v3 .htb-divider {
  display: none !important;
}
body.home-layout-v3 .store-topbar.htb {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}
body.home-layout-v3 .htb-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 52px;
  padding: 8px 12px;
}

body.home-layout-v3 .htb-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

body.home-layout-v3 .htb-announce-slot {
  flex: 1;
  min-width: 0;
}

body.home-layout-v3 .htb-announce {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  max-width: 100%;
}

body.home-layout-v3 .htb-announce-ic {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f97316;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

body.home-layout-v3 .htb-announce-text {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* باکس اطلاعیه کامل زیر هدر در صفحه خانه مخفی — نسخه فشرده در هدر است */
body.home-layout-v3 .store-content > .store-announce.sanc {
  display: none !important;
}

/* هایلایت ساده: عنوان + تعداد + دایره‌ها */
body.home-layout-v3 .hhl-simple {
  padding: 12px var(--home-inset, 12px) 4px;
}

body.home-layout-v3 .hhl-simple .hhl-card {
  display: none;
}

body.home-layout-v3 .hhl-simple-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

body.home-layout-v3 .hhl-simple-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

body.home-layout-v3 .hhl-simple-count {
  font-size: 12px;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

body.home-layout-v3 .hhl-simple .hhl-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  scrollbar-width: none;
}
body.home-layout-v3 .hhl-simple .hhl-row::-webkit-scrollbar { display: none; }

/* عنوان بخش محصولات/مقالات یک‌خطی */
body.home-layout-v3 .section-head-home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

body.home-layout-v3 .section-head-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

body.home-layout-v3 .section-title-oneline {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  min-width: 0;
}

body.home-layout-v3 .section-count-pill {
  flex-shrink: 0;
  font-size: 12px;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 3px 9px;
}

body.home-layout-v3 .section-view-all {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary, #2563eb);
  text-decoration: none;
  white-space: nowrap;
}

/* صفحه‌بندی */
body.home-layout-v3 .home-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 16px 0 4px;
}

body.home-layout-v3 .home-pager-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

body.home-layout-v3 .home-pager-btn.is-active {
  background: var(--primary, #2563eb);
  border-color: var(--primary, #2563eb);
  color: #fff;
  font-weight: 700;
}

/* سه باکس دسترسی سریع */
body.home-layout-v3 .home-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px var(--home-inset, 12px);
}

body.home-layout-v3 .hqa-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 88px;
  padding: 12px 8px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  -webkit-tap-highlight-color: transparent;
}

body.home-layout-v3 .hqa-item:active {
  transform: scale(0.98);
}

body.home-layout-v3 .hqa-ic {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary, #2563eb);
}

body.home-layout-v3 .hqa-label {
  font-size: 13px;
  font-weight: 700;
}

/* پروفایل قبل از فوتر — وسط‌چین */
body.home-layout-v3 .home-profile-before-footer {
  display: flex;
  justify-content: center;
  padding: 8px var(--home-inset, 12px) 20px;
}

body.home-layout-v3 .home-profile-before-footer .hpc {
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100%;
  max-width: 520px;
}
@media (min-width: 960px) {
  body.home-layout-v3 .home-profile-before-footer .hpc {
    max-width: 900px !important;
  }
}

body.home-layout-v3 .article-grid-home {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  body.home-layout-v3 .article-grid-home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ============================================================
   اصلاح کارت محصول دوستونه + هدر سراسری مینیمال + بنر وسط
   ============================================================ */

/* کارت‌ها در عرض کم نریزند */
.product-grid-home .pcard-home {
  min-width: 0;
  max-width: 100%;
}

.product-grid-home .pcard-home-body {
  padding: 10px 10px 12px;
  gap: 8px;
}

.product-grid-home .pcard-home-title {
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 0;
}

.product-grid-home .pcard-home-meta {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.product-grid-home .pcard-home-col-right,
.product-grid-home .pcard-home-col-left {
  width: 100%;
  align-items: flex-start;
}

.product-grid-home .pcard-home-prices {
  align-items: flex-start;
  text-align: right;
}

.product-grid-home .pcard-home-price-new {
  font-size: 13.5px;
}

.product-grid-home .pcard-home-price-old {
  font-size: 11px;
}

.product-grid-home .pcard-home-stock {
  font-size: 11.5px;
}

.product-grid-home .pcard-home-qty {
  padding: 2px;
}

.product-grid-home .pcard-home-qty button {
  width: 28px;
  height: 28px;
  font-size: 14px;
}

.product-grid-home .pcard-home-qty input {
  width: 28px;
  font-size: 13px;
}

.product-grid-home .pcard-home-add,
.product-grid-home .pcard-home-call-btn {
  padding: 10px 12px;
  font-size: 12.5px;
  gap: 6px;
  border-radius: 14px;
}

.product-grid-home .pcard-home-badge {
  top: 8px;
  padding: 4px 8px;
  font-size: 10.5px;
}

.product-grid-home .pcard-home-badge-photos { left: 8px; }
.product-grid-home .pcard-home-badge-discount { right: 8px; }

.product-grid-home .pcard-home-img-wrap {
  aspect-ratio: 1 / 1;
  border-radius: 16px 16px 0 0;
}

.product-grid-home .pcard-home {
  --pcard-radius: 16px;
}

@media (min-width: 640px) {
  .product-grid-home .pcard-home-body {
    padding: 14px 14px 16px;
    gap: 10px;
  }
  .product-grid-home .pcard-home-title {
    font-size: 14.5px;
  }
  .product-grid-home .pcard-home-meta {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
  .product-grid-home .pcard-home-col-right {
    width: auto;
  }
  .product-grid-home .pcard-home-col-left {
    width: auto;
    align-items: flex-end;
  }
  .product-grid-home .pcard-home-prices {
    align-items: flex-end;
    text-align: left;
  }
  .product-grid-home .pcard-home-add,
  .product-grid-home .pcard-home-call-btn {
    font-size: 13.5px;
    padding: 12px 14px;
  }
}

/* در عرض خیلی کم دکمه فقط آیکون */
@media (max-width: 380px) {
  .product-grid-home .pcard-home-add .pcard-home-add-label,
  .product-grid-home .pcard-home-call-btn span:not(.pcard-home-cart-icon) {
    /* keep text for clarity */
  }
}

/* ============================================================
   هدر مینیمال سراسری + بنر وسط‌چین با سایه
   ============================================================ */

/* هدر: فقط همبرگر + اطلاعیه مختصر — همه صفحات فروشگاه */
.store-topbar.htb {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.store-topbar.htb .htb-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  max-height: 52px;
  padding: 6px 10px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.store-topbar.htb .htb-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.store-topbar.htb .htb-brand,
.store-topbar.htb .topbar-actions,
.store-topbar.htb .htb-divider,
.store-topbar.htb .htb-left {
  display: none !important;
}

.store-topbar.htb .htb-menu {
  flex-shrink: 0;
}

.store-topbar.htb .htb-announce-slot {
  flex: 1;
  min-width: 0;
}

.htb-announce {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  cursor: default;
}

.htb-announce.is-truncated {
  cursor: pointer;
}

.htb-announce-ic {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f97316;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.htb-announce-text {
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.htb-announce.is-open .htb-announce-text {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.htb-announce-more {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #c2410c;
  font-size: 11px;
  font-weight: 800;
  padding: 0 2px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

/* پاپ‌آپ کامل اطلاعیه */
.htb-announce-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.htb-announce-modal.is-open { display: flex; }
.htb-announce-modal-box {
  background: #fff;
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  padding: 18px 16px 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
  position: relative;
}
.htb-announce-modal-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}
.htb-announce-modal-text {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.8;
  color: #334155;
  white-space: pre-wrap;
}
.htb-announce-modal-close {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 10px;
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

/* بنر وسط‌چین با سایه — همه جا */
.banner-slot,
.banner-slot-v2 {
  display: flex;
  justify-content: center;
  margin: 16px auto !important;
  padding: 0 12px !important;
  max-width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.banner-slot-inner {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.banner-slot .banner-item,
.banner-slot-v2 .banner-item,
.banner-slot > a,
.banner-slot > img {
  display: block;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
  background: #fff;
}

.banner-slot img,
.banner-slot-v2 img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .banner-slot-inner,
  .banner-slot .banner-item,
  .banner-slot-v2 .banner-item,
  .banner-slot > a,
  .banner-slot > img {
    max-width: 560px;
  }
  .store-topbar.htb .htb-inner {
    max-width: 760px;
    padding: 6px 14px;
  }
}

/* باکس اطلاعیه کامل زیر محتوا — نسخه فشرده در هدر است */
.store-content > .store-announce.sanc {
  display: none !important;
}


/* ============================================================
   فیکس‌های UI: بنر کمتر گرد، هدر جمع‌شونده، سایدبار روی bottom-nav
   ============================================================ */

/* بنر: گوشه کمی گرد + بدون border خاکستری */
.banner-slot .banner-item,
.banner-slot-v2 .banner-item,
.banner-slot > a,
.banner-slot > img,
.banner-slot img,
.banner-slot-v2 img {
  border-radius: 10px !important;
  border: none !important;
  outline: none !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.09) !important;
}

.banner-item,
.banner-slot a {
  border: none !important;
}

/* شمارنده محصولات/مقالات با آیکون */
.section-count-pill {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.section-count-ic {
  flex-shrink: 0;
  opacity: 0.75;
}
.section-view-arrow {
  display: inline-block;
  margin-right: 2px;
  font-weight: 700;
}

/* هدر: وقتی اطلاعیه نیست جمع شود */
.store-topbar.htb .htb-inner {
  width: auto !important;
  max-width: 100% !important;
  margin-right: 0 !important;
  margin-left: auto !important;
  justify-content: flex-start !important;
}
.store-topbar.htb {
  background: transparent !important;
  box-shadow: none !important;
}
.store-topbar.htb .htb-inner {
  background: #fff;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  padding: 6px 10px !important;
  min-height: 44px !important;
  max-height: none !important;
  display: inline-flex !important;
  width: fit-content !important;
  max-width: calc(100% - 16px) !important;
}
.store-topbar.htb .htb-right {
  flex: 0 1 auto !important;
  width: auto !important;
}
.store-topbar.htb .htb-announce-slot:empty {
  display: none !important;
}
.store-topbar.htb .htb-announce-slot:not(:empty) {
  flex: 0 1 auto;
  max-width: min(62vw, 280px);
}

/* خانه/پروفایل در یک خط وقتی ساعت نیست */
.nsb-top-grid-links-only {
  display: flex !important;
  grid-template-columns: none !important;
}
.nsb-top-grid-links-only .nsb-top-links {
  display: flex !important;
  width: 100%;
  gap: 8px;
}
.nsb-top-grid-links-only .nsb-top-link {
  flex: 1 1 0;
  justify-content: center;
}

/* سایدبار و اورلی بالای منوی پایین */
aside.store-sidebar.nsb,
.store-sidebar.nsb,
aside#storeSidebar {
  z-index: 2100 !important;
}
.sidebar-overlay,
#sidebarOverlay,
body.store-lux-v2 .sidebar-overlay {
  z-index: 2050 !important;
}
.home-bottom-nav {
  z-index: 1900 !important;
}

/* دکمه افزودن به سبد: آیکون + متن */
.pcard-home-add {
  flex-direction: row !important;
  gap: 8px !important;
}
.pcard-home-add .pcard-home-cart-icon {
  order: 0;
}
.pcard-home-add .pcard-home-add-label {
  order: 1;
}


/* ============================================================
   فیکس قطعی: هدر fit-content | خانه/پروفایل یک‌خطی | بنر بدون border
   ============================================================ */

/* هدر سفید فقط به اندازه محتوا — override روی width:100% قبلی */
header.store-topbar.htb {
  display: flex !important;
  justify-content: flex-start !important;
  width: 100% !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  border-bottom: none !important;
  padding: 8px 12px !important;
}

header.store-topbar.htb .htb-inner {
  display: inline-flex !important;
  align-items: center !important;
  width: fit-content !important;
  max-width: calc(100vw - 24px) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 6px 10px !important;
  background: #fff !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08) !important;
  box-sizing: border-box !important;
}

header.store-topbar.htb.htb-no-announce .htb-inner {
  width: fit-content !important;
  max-width: none !important;
}

header.store-topbar.htb.htb-has-announce .htb-inner {
  width: fit-content !important;
  max-width: min(100%, 420px) !important;
}

header.store-topbar.htb .htb-right {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 0 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
}

header.store-topbar.htb .htb-brand,
header.store-topbar.htb .htb-left,
header.store-topbar.htb .topbar-actions,
header.store-topbar.htb .htb-divider {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

header.store-topbar.htb .htb-announce-slot {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  max-width: min(55vw, 260px) !important;
}

/* خانه + پروفایل در یک ردیف وقتی ساعت تنظیم نشده */
.nsb-top-grid.nsb-top-grid-links-only {
  display: flex !important;
  flex-direction: row !important;
  grid-template-columns: none !important;
  gap: 8px !important;
}
.nsb-top-grid.nsb-top-grid-links-only .nsb-top-links {
  display: flex !important;
  flex-direction: row !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  gap: 8px !important;
}
.nsb-top-grid.nsb-top-grid-links-only .nsb-top-link {
  flex: 1 1 0 !important;
  justify-content: center !important;
}
.nsb-top-grid.nsb-top-grid-links-only .nsb-top-hours {
  display: none !important;
}

/* بنر: بدون border خاکستری + گوشه کمی گرد — override lux */
.banner-slot,
.banner-slot-v2,
.banner-slot > a,
.banner-slot .banner-item,
.banner-slot-v2 .banner-item,
.banner-slot > img,
.home-hero,
.hero-banner {
  border: none !important;
  border-color: transparent !important;
  outline: none !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.09) !important;
  overflow: hidden !important;
  background: transparent !important;
}
.banner-slot img,
.banner-slot a img,
.banner-slot-v2 img,
.banner-item img {
  border: none !important;
  outline: none !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
.banner-slot-inner {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
/* جلوگیری از تمام‌عرض شدن بنر با border حس خط */
.banner-slot.banner-header,
.banner-slot.banner-between_products,
.banner-slot-v2 {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  box-sizing: border-box !important;
}
@media (max-width: 760px) {
  .banner-slot.banner-header,
  .banner-slot.banner-between_products,
  .banner-slot-v2 {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}


/* ============================================================
   اطلاعیه هدر عریض یک‌خطی + حذف کامل خط طوسی بنر
   ============================================================ */

header.store-topbar.htb.htb-has-announce .htb-inner {
  width: auto !important;
  max-width: calc(100vw - 16px) !important;
  flex: 0 1 auto !important;
}

header.store-topbar.htb .htb-announce-slot {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: none !important;
  width: auto !important;
}

header.store-topbar.htb .htb-announce {
  max-width: none !important;
  width: 100% !important;
  min-width: 0 !important;
}

header.store-topbar.htb .htb-announce-text {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: min(70vw, 520px) !important;
  font-size: 12.5px !important;
}

@media (min-width: 640px) {
  header.store-topbar.htb .htb-announce-text {
    max-width: min(62vw, 640px) !important;
    font-size: 13px !important;
  }
}
@media (min-width: 960px) {
  header.store-topbar.htb .htb-announce-text {
    max-width: min(55vw, 720px) !important;
  }
}

/* بنر: صفر کردن هرگونه border / outline / ring */
.banner-slot,
.banner-slot-v2,
.banner-slot *,
.banner-slot-v2 *,
.banner-slot > a,
.banner-slot .banner-item,
.banner-slot-v2 .banner-item,
.banner-item,
.home-hero,
.hero-banner {
  border: 0 !important;
  border-width: 0 !important;
  border-style: none !important;
  border-color: transparent !important;
  outline: 0 !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  background-clip: padding-box !important;
}
.banner-slot img,
.banner-slot a img,
.banner-slot-v2 img,
.banner-item img {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  border-radius: 10px !important;
}
/* سایه ملایم فقط روی خود تصویر بدون خط دور */
.banner-slot .banner-item,
.banner-slot > a {
  border-radius: 10px !important;
  filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.08));
  box-shadow: none !important;
  border: 0 !important;
}


/* ============================================================
   دسکتاپ: بنر عریض بدون دفرمه | گرید ۴تایی | پروفایل عریض
   ============================================================ */

/* بنر در دسکتاپ عریض، تصویر بدون کشیدگی */
@media (min-width: 761px) {
  .banner-slot,
  .banner-slot-v2,
  .banner-slot.banner-header,
  .banner-slot.banner-between_products {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
  }
  .banner-slot-inner {
    max-width: 100% !important;
    width: 100% !important;
  }
  .banner-slot .banner-item,
  .banner-slot > a,
  .banner-slot-v2 .banner-item {
    max-width: 100% !important;
    width: 100% !important;
  }
  .banner-slot img,
  .banner-slot a img,
  .banner-slot-v2 img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
  }
}

/* محصولات: ۴ ستون در کامپیوتر */
@media (min-width: 960px) {
  .product-grid-home {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
  }
  body.home-layout-v3 .article-grid-home,
  .article-grid-home {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
  }
  /* کارت‌ها در ۴ ستون کمی فشرده‌تر */
  .product-grid-home .pcard-home-body {
    padding: 12px 12px 14px !important;
  }
  .product-grid-home .pcard-home-title {
    font-size: 13.5px !important;
  }
  .product-grid-home .pcard-home-meta {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .product-grid-home .pcard-home-col-left,
  .product-grid-home .pcard-home-col-right {
    width: 100% !important;
    align-items: flex-start !important;
  }
  .product-grid-home .pcard-home-prices {
    align-items: flex-start !important;
    text-align: right !important;
  }
}

/* تبلت: ۳ ستون */
@media (min-width: 720px) and (max-width: 959px) {
  .product-grid-home {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  body.home-layout-v3 .article-grid-home,
  .article-grid-home {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* پروفایل عریض در دسکتاپ */
@media (min-width: 960px) {
  body.home-layout-v3 .home-profile-before-footer {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  body.home-layout-v3 .home-profile-before-footer .hpc,
  .hpc {
    max-width: 900px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* بنر بدون border از lux-force */
body.store-lux-v2 .banner-slot,
body.store-lux-v2 .banner-slot > a,
body.store-lux-v2 .banner-slot-v2,
body.store-lux-v2 .banner-slot .banner-item {
  border: none !important;
  border-width: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

/* ============================================================
   کاروسل افقی صفحهٔ نخست — پرفروش / تخفیف‌دار / محصولات / مقالات
   تاچ اسکرول + دکمه‌های چپ و راست
   ============================================================ */
.home-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 12px;
}
.home-carousel-viewport {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.home-carousel-viewport::-webkit-scrollbar {
  display: none;
  height: 0;
}
.home-carousel-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 12px;
  padding: 4px 2px 10px;
  width: max-content;
  box-sizing: border-box;
}
.home-carousel-track > .pcard-home,
.home-carousel-track > .acard-home {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: min(78vw, 280px);
  max-width: 300px;
}
.home-carousel.is-articles .home-carousel-track > .acard-home {
  width: min(85vw, 320px);
  max-width: 340px;
}
@media (min-width: 640px) {
  .home-carousel-track {
    gap: 16px;
  }
  .home-carousel-track > .pcard-home {
    width: 260px;
  }
  .home-carousel.is-articles .home-carousel-track > .acard-home {
    width: 300px;
  }
}
@media (min-width: 960px) {
  .home-carousel-track > .pcard-home {
    width: 240px;
  }
  .home-carousel.is-articles .home-carousel-track > .acard-home {
    width: 280px;
  }
}
.home-carousel-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transition: background .15s, color .15s, opacity .15s, transform .15s;
  z-index: 2;
  padding: 0;
}
.home-carousel-btn:hover {
  background: var(--primary, #6b4e3d);
  color: #fff;
  border-color: transparent;
}
.home-carousel-btn:active {
  transform: scale(0.94);
}
.home-carousel-btn:disabled,
.home-carousel-btn.is-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}
.home-carousel-btn svg {
  display: block;
}

/* گرید قبلی محصولات/مقالات در حالت کاروسل غیرفعال می‌شود */
body.home-carousel-v1 .product-grid-home,
body.home-carousel-v1 .article-grid-home {
  display: none !important;
}

/* بخش پرفروش و تخفیف‌دار — inset مثل بقیه */
body.home-pcard-v2 .section-bestsellers-home,
body.home-pcard-v2 .section-discounted-home,
body.home-pcard-v2 .section-products-home,
body.home-pcard-v2 .section-articles-home {
  margin-left: var(--home-inset, 12px) !important;
  margin-right: var(--home-inset, 12px) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}

/* صفحه‌بندی داخل باکس */
body.home-carousel-v1 .section-products-home .home-pager,
body.home-carousel-v1 .section-articles-home .home-pager {
  margin-top: 8px;
  margin-bottom: 4px;
}

/* موبایل: دکمه‌ها کمی کوچک‌تر */
@media (max-width: 480px) {
  .home-carousel-btn {
    width: 32px;
    height: 32px;
  }
  .home-carousel {
    gap: 4px;
  }
}

/* ============================================================
   v32 — فلش در هدر، فوتر صفحه‌بندی، ۱٫۵ کارت، ارتفاع فشرده
   ============================================================ */

/* هدر: عنوان راست، فلش‌ها چپ (مقابل عنوان در RTL) */
body.home-carousel-v1 .section-head-home {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px;
  flex-wrap: nowrap;
  margin-bottom: 10px;
}
body.home-carousel-v1 .section-head-home .section-head-main {
  flex: 1 1 auto;
  min-width: 0;
}
body.home-carousel-v1 .home-carousel-nav {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}
body.home-carousel-v1 .home-carousel-nav .home-carousel-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  padding: 0;
  transition: background .15s, color .15s, opacity .15s;
}
body.home-carousel-v1 .home-carousel-nav .home-carousel-btn:hover {
  background: var(--primary, #6b4e3d);
  color: #fff;
  border-color: transparent;
}
body.home-carousel-v1 .home-carousel-nav .home-carousel-btn:disabled,
body.home-carousel-v1 .home-carousel-nav .home-carousel-btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* کاروسل بدون فلش کناری — فقط viewport */
body.home-carousel-v1 .home-carousel {
  gap: 0;
  margin: 0 0 8px;
}
body.home-carousel-v1 .home-carousel-viewport {
  width: 100%;
  container-type: inline-size;
  container-name: home-carousel;
}

/*
 * تعداد کارت قابل‌مشاهده بر اساس عرض (رسپانسیو):
 * موبایل باریک ~1.5 | موبایل ~2 | تبلت ~2.5–3 | دسکتاپ ~3.5–5
 */
body.home-carousel-v1 .home-carousel {
  --hc-visible: 1.5;
  --hc-gap: 10px;
}
body.home-carousel-v1 .home-carousel-track {
  gap: var(--hc-gap);
  padding: 2px 0 8px;
}
body.home-carousel-v1 .home-carousel.is-products .home-carousel-track > .pcard-home,
body.home-carousel-v1 .home-carousel.is-articles .home-carousel-track > .acard-home {
  flex: 0 0 calc((100cqi - var(--hc-gap) * (var(--hc-visible) - 1)) / var(--hc-visible));
  width: calc((100cqi - var(--hc-gap) * (var(--hc-visible) - 1)) / var(--hc-visible));
  max-width: none;
  min-width: 0;
}
@supports not (width: 1cqi) {
  body.home-carousel-v1 .home-carousel.is-products .home-carousel-track > .pcard-home,
  body.home-carousel-v1 .home-carousel.is-articles .home-carousel-track > .acard-home {
    flex: 0 0 calc((100% - var(--hc-gap) * (var(--hc-visible) - 1)) / var(--hc-visible));
    width: calc((100% - var(--hc-gap) * (var(--hc-visible) - 1)) / var(--hc-visible));
  }
}
@media (min-width: 400px) {
  body.home-carousel-v1 .home-carousel { --hc-visible: 1.75; }
}
@media (min-width: 480px) {
  body.home-carousel-v1 .home-carousel { --hc-visible: 2; --hc-gap: 12px; }
}
@media (min-width: 640px) {
  body.home-carousel-v1 .home-carousel { --hc-visible: 2.5; }
}
@media (min-width: 768px) {
  body.home-carousel-v1 .home-carousel { --hc-visible: 3; --hc-gap: 14px; }
}
@media (min-width: 960px) {
  body.home-carousel-v1 .home-carousel { --hc-visible: 3.5; }
}
@media (min-width: 1100px) {
  body.home-carousel-v1 .home-carousel { --hc-visible: 4; --hc-gap: 16px; }
}
@media (min-width: 1280px) {
  body.home-carousel-v1 .home-carousel { --hc-visible: 4.5; }
}
@media (min-width: 1440px) {
  body.home-carousel-v1 .home-carousel { --hc-visible: 5; }
}

/* کارت محصول — ارتفاع ثابت + تصویر کمی بلندتر */
body.home-carousel-v1 .home-carousel .pcard-home {
  --pcard-radius: 14px;
  display: flex !important;
  flex-direction: column !important;
  height: 100%;
  min-height: 250px; /* موبایل */
  align-self: stretch;
}
body.home-carousel-v1 .home-carousel.is-products .home-carousel-track {
  align-items: stretch;
}
body.home-carousel-v1 .home-carousel .pcard-home-img-wrap {
  aspect-ratio: 1 / 0.78 !important;
  max-height: none;
  flex: 0 0 auto;
  width: 100%;
}
body.home-carousel-v1 .home-carousel .pcard-home-img-wrap img {
  object-fit: cover !important;
  width: 100%;
  height: 100%;
}
body.home-carousel-v1 .home-carousel .pcard-home-body {
  padding: 8px 10px 10px !important;
  gap: 6px;
  flex: 1 1 auto;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0;
}
/* فضای ثابت برای عنوان تا کارت‌ها هم‌ارتفاع بمانند */
body.home-carousel-v1 .home-carousel .pcard-home-title {
  font-size: 14.5px !important;
  line-height: 1.4 !important;
  margin: 0 0 6px !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.4em * 2) !important;
  max-height: calc(1.4em * 2);
}
/* فضای ثابت برای قیمت/موجودی — حتی اگر قیمت نباشد ارتفاع کم نشود */
body.home-carousel-v1 .home-carousel .pcard-home-meta {
  min-height: 28px;
  flex: 0 0 auto;
}
/* دکمه سبد و تعداد سفارش مخفی هستند — فضای رزرو شده حذف شود */
body.home-carousel-v1 .home-carousel .pcard-home-add,
body.home-carousel-v1 .home-carousel .pcard-home-qty {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
body.home-carousel-v1 .home-carousel .pcard-home-add,
body.home-carousel-v1 .home-carousel .pcard-home-call-btn {
  margin-top: auto !important;
  flex: 0 0 auto;
}
/* تبلت */
@media (min-width: 480px) {
  body.home-carousel-v1 .home-carousel .pcard-home {
    min-height: 280px;
  }
  .pcard-home,
  .product-card {
    min-height: 280px;
  }
}
/* دسکتاپ */
@media (min-width: 768px) {
  body.home-carousel-v1 .home-carousel .pcard-home {
    min-height: 310px;
  }
  .pcard-home,
  .product-card {
    min-height: 310px;
  }
  body.home-carousel-v1 .home-carousel .pcard-home-img-wrap {
    aspect-ratio: 1 / 0.8 !important;
  }
}
/* موبایل باریک */
@media (max-width: 479px) {
  body.home-carousel-v1 .home-carousel .pcard-home {
    min-height: 250px;
  }
  .pcard-home,
  .product-card {
    min-height: 250px;
  }
  body.home-carousel-v1 .home-carousel .pcard-home-img-wrap {
    aspect-ratio: 1 / 0.75 !important;
  }
}

/* کارت مقاله — تصویر بلندتر + عنوان واضح */
body.home-carousel-v1 .home-carousel .acard-home {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 260px;
  align-self: stretch;
}
body.home-carousel-v1 .home-carousel.is-articles .home-carousel-track {
  align-items: stretch;
}
body.home-carousel-v1 .home-carousel .acard-home-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
}
body.home-carousel-v1 .home-carousel .acard-home-media {
  aspect-ratio: 4 / 5 !important;
  max-height: none !important;
  min-height: 200px;
  flex: 1 1 auto;
  border-radius: 16px !important;
}
body.home-carousel-v1 .home-carousel .acard-home-img {
  object-fit: cover !important;
  width: 100%;
  height: 100%;
}
body.home-carousel-v1 .home-carousel .acard-home-overlay {
  padding: 14px 12px 12px !important;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 20%,
    rgba(0, 0, 0, 0.45) 55%,
    rgba(0, 0, 0, 0.88) 100%
  ) !important;
}
body.home-carousel-v1 .home-carousel .acard-home-title {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.4 !important;
  color: #fff !important;
  margin: 0 0 6px !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
  opacity: 1 !important;
  visibility: visible !important;
  max-height: none !important;
}
body.home-carousel-v1 .home-carousel .acard-home-excerpt {
  display: none !important; /* جا برای عنوان؛ در کاروسل فشرده */
}
body.home-carousel-v1 .home-carousel .acard-home-cta {
  margin-top: 4px;
}
@media (min-width: 768px) {
  body.home-carousel-v1 .home-carousel .acard-home {
    min-height: 280px;
  }
  body.home-carousel-v1 .home-carousel .acard-home-media {
    min-height: 220px;
  }
  body.home-carousel-v1 .home-carousel .acard-home-title {
    font-size: 16px !important;
  }
}
@media (max-width: 479px) {
  body.home-carousel-v1 .home-carousel .acard-home {
    min-height: 240px;
  }
  body.home-carousel-v1 .home-carousel .acard-home-media {
    min-height: 180px;
  }
  body.home-carousel-v1 .home-carousel .acard-home-title {
    font-size: 14px !important;
  }
}
body.home-carousel-v1 .home-carousel .pcard-home-meta {
  gap: 4px !important;
  margin: 0 !important;
}
body.home-carousel-v1 .home-carousel .pcard-home-stock {
  font-size: 12px !important;
}
body.home-carousel-v1 .home-carousel .pcard-home-price-new {
  font-size: 15px !important;
  font-weight: 800 !important;
}
body.home-carousel-v1 .home-carousel .pcard-home-price-old {
  font-size: 12px !important;
}
body.home-carousel-v1 .home-carousel .pcard-home-qty {
  padding: 2px !important;
}
body.home-carousel-v1 .home-carousel .pcard-home-qty button {
  width: 26px !important;
  height: 26px !important;
  font-size: 14px !important;
}
body.home-carousel-v1 .home-carousel .pcard-home-qty input {
  width: 28px !important;
  font-size: 12px !important;
}
body.home-carousel-v1 .home-carousel .pcard-home-add,
body.home-carousel-v1 .home-carousel .pcard-home-call-btn {
  padding: 8px 10px !important;
  font-size: 12px !important;
  min-height: 36px !important;
  border-radius: 10px !important;
}
body.home-carousel-v1 .home-carousel .pcard-home-badge {
  padding: 3px 7px !important;
  font-size: 10px !important;
}

/* فوتر: صفحه‌بندی راست + مشاهده همه چپ (RTL) */
body.home-carousel-v1 .home-section-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
  margin-bottom: 4px;
  width: 100%;
  box-sizing: border-box;
}
/* در RTL اولین عنصر (pager) سمت راست می‌نشیند */
body.home-carousel-v1 .home-section-footer .home-pager {
  order: 0;
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
body.home-carousel-v1 .home-section-footer .section-view-all-footer {
  order: 1;
  margin: 0;
  margin-inline-start: auto;
  white-space: nowrap;
}
body.home-carousel-v1 .home-pager-spacer {
  flex: 1 1 auto;
}
body.home-carousel-v1 .home-pager-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 700;
  user-select: none;
  padding: 0 2px;
}
body.home-carousel-v1 .home-pager-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
}
body.home-carousel-v1 .home-pager-btn.is-active {
  background: var(--primary, #6b4e3d);
  color: #fff;
  border-color: transparent;
}

@media (max-width: 480px) {
  body.home-carousel-v1 .home-carousel-nav .home-carousel-btn {
    width: 30px;
    height: 30px;
  }
  body.home-carousel-v1 .home-carousel .pcard-home-title {
    font-size: 12.5px !important;
  }
}

/* ============================================================
   v4 — چیدمان جدید صفحه خانه
   ============================================================ */

/* 1) فیلد جستجو در هدر فیکس (به‌جای اطلاعیه) */
header.store-topbar.htb.htb-has-search .htb-inner {
  width: 100% !important;
  max-width: 720px !important;
  flex: 1 1 auto !important;
}
header.store-topbar.htb.htb-has-search .htb-right {
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
}
header.store-topbar.htb .htb-search-slot {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: none !important;
  width: auto !important;
  display: block !important;
}
.htb-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
}
.htb-search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  padding: 0;
  cursor: pointer;
}
.htb-search-btn:hover { color: var(--primary, #2563eb); }
.htb-search-input {
  width: 100%;
  height: 38px;
  box-sizing: border-box;
  padding: 0 40px 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #0f172a;
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
}
.htb-search-input:focus {
  background: #fff;
  border-color: rgba(var(--primary-rgb, 37, 99, 235), .55);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 37, 99, 235), .12);
}

/* 4) برندها — هدر: راست «دسترسی سریع»، چپ تعداد برندها */
.sbr-head.sbr-head-v2 {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  direction: rtl;
}
.sbr-head-v2 .sbr-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}
.sbr-head-v2 .sbr-count { margin-inline-start: auto; }

/* 5) تب‌منو پرفروش‌ها / تخفیف‌ها */
.section-home-tabs { margin: 8px 0 18px; }
.hpt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  direction: rtl;
}
.hpt-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: #f1f5f9;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.hpt-tabs::-webkit-scrollbar { display: none; }
.hpt-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #475569;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, color .2s, box-shadow .2s;
}
.hpt-tab.is-active {
  background: #fff;
  color: var(--primary, #2563eb);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .10);
}
.hpt-tab .hpt-count { margin: 0; }
.hpt-navs { flex: 0 0 auto; }
.hpt-nav[hidden], .hpt-panel[hidden] { display: none !important; }

/* 10) سه باکس — سبد خرید به‌صورت دکمه با همان استایل بقیه باکس‌ها */
body.home-layout-v3 button.hqa-item.hqa-cart {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
}

/* 12) لینک‌های مفید — در هر خط دو لینک */
.link-list.link-list-2col {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.link-list.link-list-2col .link-chip {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* v4.1 — دسترسی سریع (برندها): عکس بزرگ‌تر با گوشهٔ گردِ کمتر */
.section-brands-home .sbr-track { gap: 12px; }
.section-brands-home .sbr-track .sbr-item { width: 108px; }
.section-brands-home .sbr-track .sbr-avatar {
  width: 92px;
  height: 92px;
  border-radius: 8px;
}
.section-brands-home .sbr-track .sbr-label { max-width: 108px; }
@media (max-width: 640px) {
  .section-brands-home .sbr-track .sbr-item { width: 92px; }
  .section-brands-home .sbr-track .sbr-avatar {
    width: 80px;
    height: 80px;
    border-radius: 7px;
  }
  .section-brands-home .sbr-track .sbr-label { max-width: 92px; }
}

/* v4.2 — نمایش اطلاعیه در صفحهٔ خانه (بالای هایلایت‌ها)
   قانون‌های قبلی display:none دست‌نخورده‌اند؛ اینجا فقط برای home-layout-v4 لغو می‌شوند.
   با بستن اطلاعیه (کلاس is-hidden) همچنان مخفی می‌شود. */
body.home-layout-v3.home-layout-v4 .store-content > .store-announce.sanc:not(.is-hidden) {
  display: block !important;
}
body.home-layout-v3.home-layout-v4 .store-content > .store-announce.sanc.is-hidden {
  display: none !important;
}

/* v4.2 — تعداد هایلایت‌ها: آیکون + عدد */
body.home-layout-v3 .hhl-simple-count.hhl-simple-count-v2 {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
.hhl-simple-count-v2 .section-count-ic { flex-shrink: 0; opacity: .75; }

/* v4.3 — اطلاعیهٔ ثابت در صفحهٔ خانه: هرگز محو/مخفی نشود */
body.home-layout-v3.home-layout-v4 .store-content > .store-announce.sanc.sanc-persistent,
body.home-layout-v3.home-layout-v4 .store-content > .store-announce.sanc.sanc-persistent.is-hidden {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  animation: none !important;
  transform: none !important;
  height: auto !important;
  max-height: none !important;
  position: static !important;
}

/* v4.4 — بستن اطلاعیه با ضربدر سمت چپ (فقط برای همین نمایش صفحه) */
body.home-layout-v3.home-layout-v4 .store-content > .store-announce.sanc.sanc-persistent.sanc-closed {
  display: none !important;
}



/* ========== ارتفاع واکنش‌گرای کارت محصول ========== */
/* موبایل (پیش‌فرض) */
.pcard-home,
.product-card,
body.home-carousel-v1 .home-carousel .pcard-home,
.product-grid-home .pcard-home,
.product-grid .product-card {
  min-height: 250px;
}
@media (min-width: 480px) {
  .pcard-home,
  .product-card,
  body.home-carousel-v1 .home-carousel .pcard-home,
  .product-grid-home .pcard-home,
  .product-grid .product-card {
    min-height: 280px;
  }
}
@media (min-width: 768px) {
  .pcard-home,
  .product-card,
  body.home-carousel-v1 .home-carousel .pcard-home,
  .product-grid-home .pcard-home,
  .product-grid .product-card {
    min-height: 310px;
  }
}


/* ========== چیدمان جدید کارت: موجودی یک سطر + قیمت سطر بعد ========== */
.pcard-home-meta,
.pcard-home-meta.pcard-home-meta-stack {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 1px !important;
  margin-top: 2px !important;
}
.pcard-home-meta .pcard-home-col-right,
.pcard-home-meta .pcard-home-col-left,
.pcard-home-stock-row,
.pcard-home-price-row {
  width: 100% !important;
  display: block !important;
}
.pcard-home-title {
  font-size: 15.5px !important;
  font-weight: 800 !important;
  line-height: 1.45 !important;
}
body.home-carousel-v1 .home-carousel .pcard-home-title {
  font-size: 14.5px !important;
}
.pcard-home-price-new {
  font-size: 15px !important;
  font-weight: 800 !important;
}
.pcard-home-price-old {
  font-size: 12px !important;
}
.pcard-home-stock {
  font-size: 12px !important;
}
.pcard-home-prices {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  gap: 6px !important;
}


/* ========== قیمت کارت: مبلغ چپ، مشکی، تومان خیلی کوچک ========== */
.pcard-home-price-row,
.pcard-home-prices {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important; /* سمت چپ بصری در RTL */
  justify-content: flex-start !important;
  width: 100% !important;
  text-align: left !important;
}
.pcard-home-price-new,
.pcard-home-price-old {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: baseline !important;
  gap: 4px !important;
  direction: ltr !important;
}
.pcard-home-price-new .pcard-home-price-amount,
.pcard-home-price-amount {
  color: #000 !important;
  font-weight: 800 !important;
  font-size: 15px !important;
}
.pcard-home-price-old .pcard-home-price-amount {
  color: #6b7280 !important;
  font-weight: 500 !important;
  font-size: 12px !important;
}
.pcard-home-price-currency {
  font-size: 9px !important;
  font-weight: 500 !important;
  color: #6b7280 !important;
  line-height: 1 !important;
}
.pcard-home-price-new .pcard-home-price-currency {
  font-size: 9px !important;
  color: #555 !important;
}
body.home-carousel-v1 .home-carousel .pcard-home-price-new {
  color: #000 !important;
  font-size: 15px !important;
}
body.home-carousel-v1 .home-carousel .pcard-home-price-new .pcard-home-price-amount {
  color: #000 !important;
  font-size: 15px !important;
}
body.home-carousel-v1 .home-carousel .pcard-home-price-currency {
  font-size: 9px !important;
}


/* ========== فاصله کمتر موجودی/قیمت + تومان سمت چپ مبلغ ========== */
.pcard-home-meta,
.pcard-home-meta.pcard-home-meta-stack {
  gap: 0 !important;
  margin-top: 2px !important;
}
.pcard-home-stock-row {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
}
.pcard-home-price-row {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
}
.pcard-home-stock {
  margin: 0 !important;
  line-height: 1.3 !important;
}
.pcard-home-prices {
  gap: 1px !important;
  margin: 0 !important;
}
/* تومان سمت چپ مبلغ (اول در DOM با direction:ltr) */
.pcard-home-price-new,
.pcard-home-price-old {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: baseline !important;
  gap: 4px !important;
  direction: ltr !important;
}
.pcard-home-price-currency {
  order: 0;
  font-size: 9px !important;
  font-weight: 500 !important;
  color: #555 !important;
}
.pcard-home-price-amount {
  order: 1;
  color: #000 !important;
  font-weight: 800 !important;
}
body.home-carousel-v1 .home-carousel .pcard-home-meta {
  gap: 0 !important;
}

/* ============================================================
   هدر: لوگو + تیک طلایی روی عکس + عرض دسکتاپ = اسلایدر/بنر
   ============================================================ */

/* لینک لوگو بین منو و جستجو */
header.store-topbar.htb .htb-logo-link {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  text-decoration: none !important;
  color: inherit !important;
  margin: 0 6px !important;
  padding: 0 !important;
  min-width: 44px !important;
}
header.store-topbar.htb .htb-logo-link-box {
  position: relative !important;
  display: block !important;
  width: 40px !important;
  height: 40px !important;
  flex-shrink: 0 !important;
}
header.store-topbar.htb .htb-logo-link .htb-logo-only,
header.store-topbar.htb .htb-logo-link .htb-logo {
  position: relative !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f8fafc !important;
  border: 0 !important;
  box-shadow: none !important;
  flex-shrink: 0 !important;
}
header.store-topbar.htb .htb-logo-link .htb-logo img,
header.store-topbar.htb .htb-logo-link .htb-logo .store-logo,
header.store-topbar.htb .htb-logo-link .store-logo-fallback {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}
header.store-topbar.htb .htb-logo-link .store-logo-fallback {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 800 !important;
  font-size: 16px !important;
  color: #0f172a !important;
  background: #e2e8f0 !important;
}

/* تیک طلایی بولد — روی خود عکس لوگو (گوشه پایین چپ) */
header.store-topbar.htb .htb-logo-verified {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  z-index: 2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: #D4A017 !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18) !important;
  pointer-events: none !important;
}
header.store-topbar.htb .htb-logo-verified svg {
  width: 11px !important;
  height: 11px !important;
  display: block !important;
  fill: #D4A017 !important;
  stroke: none !important;
}

/* فاصله بین منو / لوگو / جستجو */
header.store-topbar.htb .htb-right {
  gap: 10px !important;
}
header.store-topbar.htb .htb-menu {
  margin-inline-end: 2px !important;
}
header.store-topbar.htb .htb-search-slot {
  margin-inline-start: 2px !important;
}

/* دسکتاپ: عرض منوی فیکس = عرض باکس هایلایت (inset مشترک) + وسط صفحه */
@media (min-width: 761px) {
  header.store-topbar.htb {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    /* همان فاصله افقی هایلایت (--home-inset: 16px در ≥640) */
    padding: 10px var(--home-inset, 16px) !important;
    box-sizing: border-box !important;
  }
  header.store-topbar.htb .htb-inner,
  header.store-topbar.htb.htb-has-search .htb-inner,
  header.store-topbar.htb.htb-has-announce .htb-inner,
  header.store-topbar.htb.htb-no-announce .htb-inner {
    display: flex !important;
    width: 100% !important;
    max-width: none !important; /* پر کردن عرض بین insetها = عرض هایلایت */
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
    justify-content: stretch !important;
  }
  header.store-topbar.htb .htb-right,
  header.store-topbar.htb.htb-has-search .htb-right {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 12px !important;
  }
  header.store-topbar.htb .htb-logo-link-box,
  header.store-topbar.htb .htb-logo-link .htb-logo-only,
  header.store-topbar.htb .htb-logo-link .htb-logo {
    width: 44px !important;
    height: 44px !important;
  }
  header.store-topbar.htb .htb-logo-link {
    margin: 0 8px !important;
  }
  header.store-topbar.htb .htb-logo-verified {
    width: 18px !important;
    height: 18px !important;
  }
  header.store-topbar.htb .htb-logo-verified svg {
    width: 12px !important;
    height: 12px !important;
  }
}

/* موبایل: عرض اطلاعیه = عرض باکس هایلایت (همان --home-inset) + وسط صفحه */
@media (max-width: 760px) {
  .store-announce.sanc,
  .store-content > .store-announce.sanc,
  body.home-layout-v3.home-layout-v4 .store-content > .store-announce.sanc {
    margin-left: var(--home-inset, 12px) !important;
    margin-right: var(--home-inset, 12px) !important;
    margin-top: 8px !important;
    margin-bottom: 12px !important;
    width: auto !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }
  .store-announce.sanc .sanc-inner {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }
}

/* ============================================================
   لینک visited = همان رنگ لینک + هایلایت صفحه فعال سایدبار
   ============================================================ */
.store-main a:link,
.store-main a:visited,
.store-content a:link,
.store-content a:visited {
  /* رنگ visited با لینک عادی یکی بماند؛ مقدار دقیق از تم (--body-link-text) می‌آید */
  color: var(--body-link-text, inherit);
}

/* صفحه فعال سایدبار: بک‌گراند طلایی + متن سفید */
.store-sidebar a.nsb-item.is-active,
.store-sidebar a.sidebar-link.is-active,
.store-sidebar a.nsb-sub.is-active,
.store-sidebar summary.nsb-item.is-active,
.store-sidebar a.nsb-top-link.is-active,
.store-sidebar summary.nsb-sub.is-active {
  background: var(--primary, #E8B923) !important;
  background-color: var(--primary, #E8B923) !important;
  border-color: var(--primary, #E8B923) !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
}

.store-sidebar a.nsb-item.is-active .nsb-label,
.store-sidebar a.is-active .nsb-label,
.store-sidebar .nsb-parent-link.is-active,
.store-sidebar a.is-active span,
.store-sidebar summary.is-active .nsb-label,
.store-sidebar a.nsb-top-link.is-active span {
  color: #FFFFFF !important;
  font-weight: 800 !important;
}

.store-sidebar a.nsb-item.is-active .nsb-ic,
.store-sidebar a.is-active .nsb-ic,
.store-sidebar a.nsb-top-link.is-active .nsb-mini-ic {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #FFFFFF !important;
}

.store-sidebar a.nsb-item.is-active .nsb-ic svg,
.store-sidebar a.is-active .nsb-ic svg,
.store-sidebar a.is-active .nsb-mini-ic svg,
.store-sidebar a.nsb-top-link.is-active .nsb-mini-ic svg,
.store-sidebar a.is-active .nsb-chev svg,
.store-sidebar summary.is-active .nsb-caret svg {
  stroke: #FFFFFF !important;
  color: #FFFFFF !important;
  fill: none !important;
}

.store-sidebar a.nsb-top-link.is-active {
  border-radius: 10px !important;
}

/* خانه/پروفایل از رنگ متن لینک سایدبار؛ پس‌زمینه پیش‌فرض */
.store-sidebar a.nsb-top-link:not(.is-active) {
  color: var(--sidebar-link-text, inherit) !important;
  background: #f8fafc !important;
}
.store-sidebar a.nsb-top-link:not(.is-active):hover {
  background: #f1f5f9 !important;
  color: var(--sidebar-link-text, inherit) !important;
}

/* ============================================================
   دسکتاپ: سایدبار عریض‌تر + باز/بسته با دکمه منو (بدون حذف کد قبلی)
   ============================================================ */
@media (min-width: 761px) {
  aside.store-sidebar.nsb {
    width: 340px !important;
    max-width: 340px !important;
    border-radius: 0 0 0 16px !important;
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.12) !important;
    /* پیش‌فرض بسته؛ با کلاس .open باز می‌شود */
    transform: translateX(105%) !important;
    pointer-events: none !important;
  }
  aside.store-sidebar.nsb.open {
    transform: translateX(0) !important;
    pointer-events: auto !important;
  }

  /* دکمه بستن و اورلی در دسکتاپ هم فعال */
  body.store-lux-v2 .sidebar-close,
  body.store-lux-v2 .nsb-close.sidebar-close {
    display: flex !important;
  }

  body.store-lux-v2 .sidebar-overlay {
    display: block !important;
  }
  body.store-lux-v2 .sidebar-overlay.open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  /* وقتی سایدبار باز است، محتوا کمی فاصله می‌گیرد (اختیاری) */
  body.store-lux-v2.sidebar-open .store-main {
    /* محتوا تمام‌عرض می‌ماند؛ سایدبار روی محتوا می‌آید */
  }
}

/* ============================================================
   رنگ عنوان کارت محصول + پس‌زمینه لینک‌های بدنه (از پنل رنگ‌بندی)
   بدون حذف کدهای قبلی — فقط تقویت اعمال رنگ تم
   ============================================================ */
body.store-lux-v2 .pcard-home-title,
body.store-lux-v2 .pcard-home-title a,
body.store-lux-v2 .product-card .product-title,
body.store-lux-v2 .product-card .product-title a,
body.store-lux-v2 .product-card h3.product-title,
body.store-lux-v2 .product-card h3.product-title a,
body.store-lux-v2 .product-grid-home .pcard-home-title,
body.store-lux-v2 .product-grid-home .pcard-home-title a,
body.home-pcard-v2 .pcard-home-title,
body.home-pcard-v2 .pcard-home-title a,
body.home-pcard-v2 .product-card .product-title,
body.home-pcard-v2 .product-card .product-title a {
  color: var(--product-card-title, #071A43) !important;
}

/* پس‌زمینه و متن لینک‌های داخل بدنه / محتوای فروشگاه */
body.store-lux-v2 .store-main a:not(.btn):not(.nsb-item):not(.home-bottom-nav-item):not(.product-card a):not(.article-card a):not(.pcard-home a):not(.acard-home a):not(.link-chip):not(.item-tag-chip):not(.htb-item):not(.hqa-item),
body.store-lux-v2 .store-content a:not(.btn):not(.nsb-item):not(.home-bottom-nav-item):not(.product-card a):not(.article-card a):not(.pcard-home a):not(.acard-home a):not(.link-chip):not(.item-tag-chip),
body.store-lux-v2 .article-body a,
body.store-lux-v2 .product-detail-desc a,
body.store-lux-v2 .sp-desc a {
  color: var(--body-link-text, #2563EB) !important;
  background-color: var(--body-link-bg, transparent) !important;
  border-radius: 4px;
  padding: 0 2px;
  text-decoration: none !important;
}

body.store-lux-v2 .store-main a:not(.btn):not(.nsb-item):not(.home-bottom-nav-item):not(.product-card a):not(.article-card a):not(.pcard-home a):not(.acard-home a):not(.link-chip):not(.item-tag-chip):hover,
body.store-lux-v2 .store-content a:not(.btn):not(.nsb-item):not(.home-bottom-nav-item):not(.product-card a):not(.article-card a):not(.pcard-home a):not(.acard-home a):not(.link-chip):not(.item-tag-chip):hover,
body.store-lux-v2 .article-body a:hover,
body.store-lux-v2 .product-detail-desc a:hover,
body.store-lux-v2 .sp-desc a:hover {
  color: var(--body-link-hover-text, #1D4ED8) !important;
  background-color: var(--body-link-hover-bg, transparent) !important;
}

/* ============================================================
   دسترسی سریع — رنگ از تم (border / background / link / hover)
   بدون آندرلاین — بدون حذف استایل قبلی
   ============================================================ */
.section-brands-home .sbr-item,
.section-brands-home a.sbr-item {
  background: var(--quick-bg, #ffffff) !important;
  border: 1px solid var(--quick-border, #e2e8f0) !important;
  color: var(--quick-link, #0f172a) !important;
  text-decoration: none !important;
}
.section-brands-home .sbr-item:hover,
.section-brands-home a.sbr-item:hover,
.section-brands-home .sbr-item:hover .sbr-label {
  color: var(--quick-link-hover, #2563eb) !important;
  text-decoration: none !important;
}
.section-brands-home .sbr-label {
  color: inherit !important;
  text-decoration: none !important;
}
body.store-lux-v2 .home-quick-actions .hqa-item,
body.home-layout-v3 .hqa-item {
  background: var(--quick-bg, #ffffff) !important;
  border: 1px solid var(--quick-border, #e2e8f0) !important;
  color: var(--quick-link, #0f172a) !important;
  text-decoration: none !important;
}
body.store-lux-v2 .home-quick-actions .hqa-item:hover,
body.home-layout-v3 .hqa-item:hover {
  color: var(--quick-link-hover, #2563eb) !important;
  text-decoration: none !important;
}


/* ============================================================
   لینک‌ها بدون آندرلاین در کل فرانت فروشگاه (بدون حذف کد قبلی)
   ============================================================ */
body.store-lux-v2 a,
body.store-lux-v2 a:link,
body.store-lux-v2 a:visited,
body.store-lux-v2 a:hover,
body.store-lux-v2 a:active,
body.store-lux-v2 .store-main a,
body.store-lux-v2 .store-content a,
body.store-lux-v2 .article-body a,
body.store-lux-v2 .product-detail-desc a,
body.store-lux-v2 .sp-desc a,
body.store-lux-v2 .footer a,
body.store-lux-v2 .site-footer a,
body.store-lux-v2 .store-sidebar a,
body.store-lux-v2 .nsb a,
body.store-lux-v2 .sbr-item,
body.store-lux-v2 .hqa-item,
body.store-lux-v2 .link-chip,
body.store-lux-v2 .item-tag-chip,
body.store-lux-v2 .breadcrumb a,
body.store-lux-v2 .pagination a {
  text-decoration: none !important;
}

/* ============================================================
   کارت محصول — همه رنگ‌ها از پنل (همه‌جا)
   ============================================================ */
body.store-lux-v2 .product-card,
body.store-lux-v2 .pcard-home,
body.store-lux-v2 .product-grid-home .pcard-home,
body.store-lux-v2 .home-carousel .pcard-home,
body.store-lux-v2 .hpc-card {
  background: var(--product-card-bg, #fff) !important;
  color: var(--product-card-text, inherit) !important;
}
body.store-lux-v2 .product-card .product-title,
body.store-lux-v2 .product-card .product-title a,
body.store-lux-v2 .product-card h3.product-title,
body.store-lux-v2 .product-card h3.product-title a,
body.store-lux-v2 .pcard-home-title,
body.store-lux-v2 .pcard-home-title a,
body.store-lux-v2 .product-grid-home .pcard-home-title,
body.store-lux-v2 .product-grid-home .pcard-home-title a,
body.store-lux-v2 .hpc-title,
body.store-lux-v2 .hpc-title a {
  color: var(--product-card-title, #071A43) !important;
}
body.store-lux-v2 .product-card .product-card-body,
body.store-lux-v2 .product-card .product-meta,
body.store-lux-v2 .pcard-home-body,
body.store-lux-v2 .pcard-home-meta,
body.store-lux-v2 .pcard-home-meta span,
body.store-lux-v2 .hpc-body {
  color: var(--product-card-text, inherit) !important;
}
body.store-lux-v2 .product-card .btn,
body.store-lux-v2 .product-card .btn-primary,
body.store-lux-v2 .product-card-cart-btn,
body.store-lux-v2 .pcard-home-add,
body.store-lux-v2 .pcard-home .btn,
body.store-lux-v2 .hpc-card .btn {
  background: var(--product-card-btn-bg, var(--primary)) !important;
  color: var(--product-card-btn-text, var(--btn-on-primary)) !important;
  border-color: transparent !important;
}
body.store-lux-v2 .product-card .btn:hover,
body.store-lux-v2 .product-card-cart-btn:hover,
body.store-lux-v2 .pcard-home-add:hover,
body.store-lux-v2 .pcard-home .btn:hover {
  background: var(--product-card-btn-hover-bg, var(--btn-hover-bg)) !important;
  color: var(--product-card-btn-hover-text, var(--btn-hover-text)) !important;
}

/* ============================================================
   کارت مقاله — همه رنگ‌ها از پنل (همه‌جا)
   ============================================================ */
body.store-lux-v2 .article-card,
body.store-lux-v2 .acard-home {
  background: var(--article-card-bg, #fff) !important;
  color: var(--article-card-text, inherit) !important;
}
body.store-lux-v2 .article-card h3,
body.store-lux-v2 .article-card h3 a,
body.store-lux-v2 .article-card .article-card-body h3,
body.store-lux-v2 .article-card a h3,
body.store-lux-v2 .acard-home-title,
body.store-lux-v2 .acard-home-title a {
  color: var(--article-title, #071A43) !important;
}
body.store-lux-v2 .article-card-excerpt,
body.store-lux-v2 .article-card .article-card-body,
body.store-lux-v2 .acard-home-excerpt {
  color: var(--article-card-text, inherit) !important;
}
body.store-lux-v2 .article-card .btn,
body.store-lux-v2 .article-card a.btn,
body.store-lux-v2 .article-card-cta,
body.store-lux-v2 .acard-home .btn {
  background: var(--article-card-btn-bg, var(--primary)) !important;
  color: var(--article-card-btn-text, var(--btn-on-primary)) !important;
  text-decoration: none !important;
}
body.store-lux-v2 .article-card .btn:hover,
body.store-lux-v2 .article-card a.btn:hover,
body.store-lux-v2 .article-card-cta:hover {
  background: var(--article-card-btn-hover-bg, var(--btn-hover-bg)) !important;
  color: var(--article-card-btn-hover-text, var(--btn-hover-text)) !important;
}

/* ============================================================
   صفحه کامل محصول و مقاله — رنگ متن از پنل
   ============================================================ */
body.store-lux-v2 .product-detail h1,
body.store-lux-v2 .article-detail h1,
body.store-lux-v2 .product-detail .sp-name,
body.store-lux-v2 .article-detail .sp-name {
  color: var(--detail-title, var(--heading-text)) !important;
}
body.store-lux-v2 .product-content-box .product-desc,
body.store-lux-v2 .product-content-box .product-desc p,
body.store-lux-v2 .product-content-box .product-desc *,
body.store-lux-v2 .product-detail-desc,
body.store-lux-v2 .product-detail-desc p,
body.store-lux-v2 .sp-desc,
body.store-lux-v2 .sp-desc p {
  color: var(--product-desc, inherit) !important;
}
body.store-lux-v2 .article-body,
body.store-lux-v2 .article-body p,
body.store-lux-v2 .article-body li,
body.store-lux-v2 .article-detail .article-body {
  color: var(--article-card-text, var(--body-text, inherit)) !important;
}
body.store-lux-v2 .faq-item summary,
body.store-lux-v2 .faq-list .faq-item summary {
  color: var(--faq-question) !important;
}
body.store-lux-v2 .faq-item .faq-answer,
body.store-lux-v2 .faq-item[open] .faq-body,
body.store-lux-v2 .faq-answer {
  color: var(--faq-answer) !important;
}
body.store-lux-v2 .feature-table,
body.store-lux-v2 .feature-table th,
body.store-lux-v2 .feature-table td,
body.store-lux-v2 .product-features,
body.store-lux-v2 .product-features li {
  color: var(--product-features) !important;
}
body.store-lux-v2 .comments .comment,
body.store-lux-v2 .comments .comment p,
body.store-lux-v2 .comments .comment strong {
  color: var(--comments-text, var(--product-comments)) !important;
}
body.store-lux-v2 .comment-reply,
body.store-lux-v2 .comment-reply p {
  color: var(--comment-reply-text) !important;
  background: var(--comment-reply-bg) !important;
}
body.store-lux-v2 .article-rating,
body.store-lux-v2 .article-rating-label {
  color: var(--article-rating, var(--article-survey)) !important;
}

/* ============================================================
   رنگ متن پیش‌فرض سیاه — فیلترها، قیمت، موجودی، تعداد، دکمه و مودال حساب
   (بدون حذف کدهای قبلی)
   ============================================================ */

/* فیلترها */
body.store-lux-v2 .pf-wrap,
body.store-lux-v2 .pf-wrap *,
body.store-lux-v2 .pf-open-btn,
body.store-lux-v2 .pf-form,
body.store-lux-v2 .pf-panel,
body.store-lux-v2 .pf-panel *,
body.store-lux-v2 .pf-modal,
body.store-lux-v2 .pf-modal *,
body.store-lux-v2 .pf-modal-title,
body.store-lux-v2 .pf-modal-close,
body.store-lux-v2 .pf-group-title,
body.store-lux-v2 .pf-group-title-text,
body.store-lux-v2 .pf-opt,
body.store-lux-v2 .pf-opt label,
body.store-lux-v2 .pf-opt span,
body.store-lux-v2 .pf-apply-desktop,
body.store-lux-v2 .pf-apply-mobile {
  color: #000000 !important;
}

/* قیمت */
body.store-lux-v2 .price-box,
body.store-lux-v2 .price-box *,
body.store-lux-v2 .price-new,
body.store-lux-v2 .price-old,
body.store-lux-v2 .pcard-home-prices,
body.store-lux-v2 .pcard-home-price-new,
body.store-lux-v2 .pcard-home-price-old,
body.store-lux-v2 .pcard-home-price-amount,
body.store-lux-v2 .pcard-home-price-currency,
body.store-lux-v2 .pcard-home-price-call,
body.store-lux-v2 .pl-price-original,
body.store-lux-v2 .pl-price-final,
body.store-lux-v2 .pl-price-old,
body.store-lux-v2 .product-detail .price-box,
body.store-lux-v2 .product-detail .price-new,
body.store-lux-v2 .product-detail .price-old,
body.store-lux-v2 .product-card .price-new,
body.store-lux-v2 .product-card .price-old {
  color: #000000 !important;
}

/* موجودی / ناموجود */
body.store-lux-v2 .pcard-home-stock,
body.store-lux-v2 .pcard-home-stock.is-oos,
body.store-lux-v2 .product-card-stock,
body.store-lux-v2 .product-card-stock.is-oos,
body.store-lux-v2 .product-detail-stock,
body.store-lux-v2 .product-detail-stock.is-oos,
body.store-lux-v2 .pcard-home-stock-row {
  color: #000000 !important;
}

/* تعداد */
body.store-lux-v2 .pcard-home-qty,
body.store-lux-v2 .pcard-home-qty button,
body.store-lux-v2 .pcard-home-qty input,
body.store-lux-v2 .product-card-qty,
body.store-lux-v2 .product-card-qty button,
body.store-lux-v2 .product-card-qty input,
body.store-lux-v2 .result-count,
body.store-lux-v2 .section-count-pill,
body.store-lux-v2 .sbr-count {
  color: #000000 !important;
}

/* دکمه اطلاعات حساب / خرید مستقیم */
body.store-lux-v2 button.btn.btn-outline[onclick*="showBankInfo"],
body.store-lux-v2 .btn.btn-outline[onclick*="showBankInfo"],
body.store-lux-v2 a.btn.btn-outline[onclick*="showBankInfo"] {
  color: #000000 !important;
}

/* مودال اطلاعات حساب */
body.store-lux-v2 #bankInfoModal,
body.store-lux-v2 #bankInfoModal .modal-box,
body.store-lux-v2 #bankInfoModal .modal-box *,
body.store-lux-v2 #bankInfoContent,
body.store-lux-v2 #bankInfoContent *,
body.store-lux-v2 #bankInfoContent h3,
body.store-lux-v2 #bankInfoContent strong,
body.store-lux-v2 #bankInfoContent p,
body.store-lux-v2 #bankInfoContent div,
body.store-lux-v2 .bank-account-item,
body.store-lux-v2 .bank-account-item *,
body.store-lux-v2 #bankInfoModal .modal-close {
  color: #000000 !important;
}
