/* ============================================================
   کارت محصول صفحهٔ نخست — طراحی جدید (مستقل از استایل‌های قبلی)
   فایل: /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%;
}

.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;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.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;
  gap: 2px;
  text-align: left;
}

.pcard-home-price-old {
  font-size: 12.5px;
  color: var(--pcard-old);
  text-decoration: line-through;
  font-weight: 500;
}

.pcard-home-price-new {
  font-size: 16px;
  font-weight: 800;
  color: var(--pcard-price);
  letter-spacing: -0.01em;
}

.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/home/bg-cover-1.webp');
  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: underline;
}

/* دکمه خبرنامه */
.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: 2.5px solid #f0f0f0;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  background: #f8fafc;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.hhl-item:hover .hhl-avatar {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  border-color: rgba(var(--primary-rgb, 232, 185, 35), 0.45);
}

.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: #f3f4f6 !important;
  color: #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-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: #0f2744;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.nsb-top-link:hover {
  background: #f1f5f9;
}

.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: #ecfdf5; /* سبز کمرنگ */
  border: 1.5px solid #059669; /* سبز پررنگ */
  color: #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: #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: #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;
}

.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: #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;
}

.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 var(--home-inset, 12px) 12px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.sanc-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  direction: rtl;
  background: #fff1f2;
  border-radius: 18px;
  padding: 14px 0 14px 14px;
  box-shadow: 0 8px 28px rgba(220, 38, 38, 0.12);
  overflow: hidden;
  min-height: 72px;
}

/* قوس قرمز سمت راست */
.sanc-badge {
  position: relative;
  flex-shrink: 0;
  width: 72px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e11d48;
  border-radius: 0 18px 18px 0;
  margin: -14px 0 -14px 0;
  /* قوس نرم از سمت محتوا */
  clip-path: ellipse(100% 85% at 100% 50%);
  min-width: 72px;
}

/* شکل دقیق‌تر قوس با border-radius */
.sanc-badge {
  clip-path: none;
  border-radius: 40% 18px 18px 40% / 50% 18px 18px 50%;
  margin-right: -2px;
}

.sanc-badge-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.sanc-badge-bang {
  color: #e11d48;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  font-family: inherit;
}

.sanc-body {
  flex: 1;
  min-width: 0;
  text-align: right;
  padding: 0 4px;
}

.sanc-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 900;
  color: #be123c;
  line-height: 1.35;
}

.sanc-text.store-announce-text {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #6b7280;
  line-height: 1.55;
}

/* دکمه بستن سمت چپ */
.sanc-close.store-announce-close {
  flex-shrink: 0;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  border: none !important;
  background: #fecdd3 !important;
  color: #9f1239 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  padding: 0 !important;
  box-shadow: none !important;
  order: 3; /* در RTL بعد از body به سمت چپ می‌رود اگر flex direction مشکل داشت */
}

/* ترتیب در RTL: badge (راست) | body | close (چپ) */
.sanc-inner {
  /* DOM: close, body, badge — با order مرتب می‌کنیم */
}
.sanc-close { order: 3; }
.sanc-body { order: 2; }
.sanc-badge { order: 1; }

@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;
}
