/* ── SHELBY BRAND VARIABLES ── */
:root {
  --sp: #E64980;
  --sp-dark: #C2185B;
  --sb: #5CB8E4;
  --sb-dark: #1e88c9;
  --sp-lighter: #fff0f5;
  --border: #f0d6e3;
  --shadow-sm: 0 2px 8px rgba(230,73,128,.08);
  --shadow-md: 0 8px 24px rgba(230,73,128,.14);
  --r-card: 18px;
  --text-1: #1a1a2e;
  --text-2: #4a4a6a;
  --text-3: #9090a8;
}

/* ── BASE ── */
*, *::before, *::after { box-sizing: border-box; }
* { font-family: 'Vazirmatn RD UI FD NL', 'Vazir', 'Arial', sans-serif !important; }

body { display: block !important; }

.site-container {
  display: block !important;
  width: 100% !important;
  font-size: 15px;
  padding-bottom: 96px; /* فضای کافی پشت نوار خرید چسبان */
}

.site-container > * {
  display: block !important;
  width: 100% !important;
  clear: both !important;
  float: none !important;
}

/* ── BREADCRUMB ── */
.category-breadcrumb {
  padding: 18px 0 22px;
  margin: 0 !important;
}

.category-breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
  flex-wrap: wrap;
}

.category-breadcrumb li {
  display: flex;
  align-items: center;
  font-size: .82rem;
}

.category-breadcrumb a {
  color: var(--text-3);
  text-decoration: none;
  transition: color .2s;
  padding: 2px 4px;
  border-radius: 4px;
}

.category-breadcrumb a:hover { color: var(--sp); }
.category-breadcrumb .separator { color: var(--border); margin: 0 1px; font-size: .75rem; }
.category-breadcrumb .current { color: var(--sp); font-weight: 700; padding: 2px 6px; background: var(--sp-lighter); border-radius: 4px; }

/* ══════════════════════════════════════════
   MAIN PRODUCT DISPLAY
══════════════════════════════════════════ */
.product-main-display-wrapper {
  display: grid !important;
  grid-template-columns: 1fr;
  grid-template-areas: "header" "gallery";
  gap: 16px;
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  margin-bottom: 32px;
  max-width: 100%;
}

@media (min-width: 768px) {
  .product-main-display-wrapper {
    grid-template-columns: 50% 50%;
    grid-template-areas:
      "gallery header";
    align-items: start;
    gap: 20px;
  }
  /* دسکتاپ: هدر کنار گالری است، پس بدون فاصلهٔ بالا تا هم‌تراز بماند */
  .product-header-section { margin-top: 0; }
}

/* ── PRODUCT HEADER ── */
.product-header-section {
  grid-area: header;
  margin-top: 16px; /* یکم فاصله از بالا */
  border-radius: 22px;
  padding: 22px 24px;
  /* بدونِ قابِ رنگی — فقط لبهٔ شیشه‌ایِ خنثی */
  border: 1px solid rgba(255, 255, 255, 0.6);
  /* فیلِ شیشه‌ایِ خنثی (بدونِ رنگ) — مشابه sticky-bar__inner */
  background: linear-gradient(180deg, rgba(255,255,255,.40) 0%, rgba(255,255,255,.22) 100%);
  backdrop-filter: blur(44px) brightness(106%);
  -webkit-backdrop-filter: blur(44px) brightness(106%);
  box-shadow:
    0 8px 32px rgba(26, 19, 26, 0.13),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.95),
    inset 0 -1px 3px rgba(255, 255, 255, 0.40);
  position: relative;
  height: fit-content;
  overflow: hidden;
}

@keyframes headerBorderFlow {
  0%, 100% { background-position: 0 0, 0% 50%; }
  50%      { background-position: 0 0, 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .product-header-section { animation: none; }
}

.product-header-section .container { max-width: 100%; padding: 0; }

.product-header-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
}

.product-header-title-row .product-title {
  flex: 1 1 auto;
  min-width: min(100%, 12rem);
  margin: 0;
}

.product-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-1);
  line-height: 1.45;
  margin: 0;
}

@media (min-width: 768px) { .product-title { font-size: 1.55rem; } }

.product-header-title-row .product-stock-indicator {
  flex-shrink: 0;
  align-self: center;
  margin-top: 0.15em;
}

.product-stock-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}

.product-stock-indicator.in-stock {
  background: #ecfdf5;
  color: #059669;
  border: 1.5px solid #a7f3d0;
}

.product-stock-indicator.in-stock::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #059669;
  display: inline-block;
}

.product-stock-indicator.out-of-stock {
  background: #fef2f2;
  color: #dc2626;
  border: 1.5px solid #fecaca;
}

/* ══════════════════════════════════════════
   GALLERY
══════════════════════════════════════════ */
.product-gallery-section {
  grid-area: gallery;
  position: sticky;
  top: 88px;
  align-self: start;
  min-width: 0; /* جلوگیری از پهن‌شدن ستون گالری بر اساس تعداد زیاد تصاویر (min-content blowout) */
}

.product-gallery-container {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gallery-main-panel {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  order: 1; /* تصویر اصلی بالا */
}

/* نوار تامبنیل زیر تصویر اصلی */
.gallery-thumbstrip { order: 2; }

.product-gallery-main {
  position: relative;
  width: min(100%, 480px);
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  background: linear-gradient(160deg, #fdf7fb 0%, #f7fbfe 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  padding: 20px;
  box-sizing: border-box;
}

.product-gallery-main > img,
#main-product-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform .35s ease;
}

.product-gallery-main:hover #main-product-image { transform: scale(1.04); }

@media (max-width: 767px) {
  .product-gallery-main {
    width: min(100%, 380px);
  }
}

.gallery-img-loading { opacity: .5; transition: opacity .2s; }

.gallery-no-image { font-size: 4rem; opacity: .3; }

/* Nav arrows */
.gallery-nav-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .2s;
  z-index: 3;
}

.gallery-nav-arrow:hover {
  background: white;
  border-color: var(--sp);
  box-shadow: 0 4px 14px rgba(230,73,128,.22);
}

.gallery-nav-arrow svg { width: 18px; height: 18px; color: var(--text-2); }
.gallery-nav-prev { right: 10px; }
.gallery-nav-next { left: 10px; }

/* HUD */
.gallery-hud {
  position: absolute;
  bottom: 10px; left: 10px; right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 3;
  pointer-events: none;
}

.gallery-img-counter {
  background: rgba(0,0,0,.48);
  color: white;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.gallery-zoom-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.88);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s;
  backdrop-filter: blur(4px);
  pointer-events: auto;
}

.gallery-zoom-btn:hover { background: white; }
.gallery-zoom-btn svg { width: 16px; height: 16px; color: var(--text-2); }

/* Thumb strip */
.gallery-thumbstrip {
  overflow-x: auto;
  overflow-y: hidden;
  min-width: 0;
  max-width: 100%;
  -webkit-overflow-scrolling: touch; /* اسکرول نرم افقی روی iOS */
  overscroll-behavior-x: contain;    /* اسکرول تصاویر به صفحه سرایت نکند */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.gallery-thumbstrip::-webkit-scrollbar { display: none; }

.product-gallery-thumbnails {
  display: flex;
  gap: 8px;
}

.product-gallery-thumb {
  width: 66px; height: 66px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #eee2ea;
  cursor: pointer;
  transition: border-color .2s, transform .15s, box-shadow .2s;
  background: #fafafa;
}

.product-gallery-thumb.active {
  border-color: var(--sp);
  box-shadow: 0 4px 12px rgba(230,73,128,.2);
}

.product-gallery-thumb:hover { border-color: var(--sp); transform: translateY(-2px); }

.product-gallery-thumb img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 4px;
}

/* ══════════════════════════════════════════
   PURCHASE SECTION
══════════════════════════════════════════ */
.product-purchase-section { grid-area: purchase; }

.product-purchase-container {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Mobile: tighter padding */
@media (max-width: 767px) {
  .product-purchase-container {
    padding: 18px 16px;
  }
  .product-header-section { padding: 18px 18px; }
  .product-gallery-container { padding: 14px; }
}

/* Pricing block */
.purchase-pricing {
  position: relative;
  background: linear-gradient(135deg, #fff5f9 0%, #f3fbfe 100%);
  border-radius: 16px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.purchase-pricing::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 4px; height: 100%;
  background: linear-gradient(180deg, #E76BA3 0%, #5BC2E7 100%);
}

.price-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.current-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.current-price .product-price-amount {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--sp);
  line-height: 1;
}

.current-price .product-price-currency {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-2);
}

.price-comparison { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.original-price .product-price-amount {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-3);
  text-decoration: line-through;
}

.original-price .product-price-currency {
  font-size: .75rem;
  color: var(--text-3);
  text-decoration: line-through;
}

.discount-badge {
  background: linear-gradient(135deg, #ef4444, #f87171);
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 800;
}

.savings-info {
  margin-top: 8px;
  font-size: .82rem;
  color: #059669;
  font-weight: 600;
}

/* Product badges */
.product-badges { display: flex; flex-wrap: wrap; gap: 8px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 800;
}

.badge.featured { background: linear-gradient(135deg, var(--sp), var(--sp-dark)); color: white; }
.badge.new      { background: linear-gradient(135deg, #10b981, #34d399); color: white; }
.badge.sale     { background: linear-gradient(135deg, #ef4444, #f87171); color: white; }
.badge.default  { background: var(--sp-lighter); color: var(--sp); border: 1.5px solid var(--border); }

/* Variants */
.variants-section { display: flex; flex-direction: column; gap: 14px; }
.variant-group   { display: flex; flex-direction: column; gap: 8px; }

.variant-label {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-2);
}

.variant-options { display: flex; flex-wrap: wrap; gap: 8px; }

.variant-option {
  padding: 6px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all .18s;
}

.variant-option:hover,
.variant-option.selected {
  border-color: var(--sp);
  color: var(--sp);
  background: var(--sp-lighter);
}

/* Purchase actions */
.purchase-actions { display: flex; flex-direction: column; gap: 10px; }

.quantity-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-2);
  display: block;
  margin-bottom: 4px;
}

.quantity-wrapper { flex-direction: column; }

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  width: fit-content;
  background: white;
}

.quantity-btn {
  width: 42px; height: 42px;
  border: none;
  background: var(--sp-lighter);
  color: var(--text-1);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .18s, color .18s;
  display: flex; align-items: center; justify-content: center;
}

.quantity-btn:hover { background: var(--sp); color: white; }
.quantity-btn:disabled { opacity: .4; cursor: not-allowed; }
.quantity-btn.minus--delete svg { width: 16px; height: 16px; }

.quantity-input {
  width: 56px; height: 42px;
  border: none;
  border-right: 1.5px solid var(--border);
  border-left: 1.5px solid var(--border);
  text-align: center !important;
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-1);
  background: white;
  outline: none;
}

.action-buttons { display: flex; flex-direction: column; gap: 10px; }

/* Add to cart — Shelby Blue */
.btn.btn-primary.btn-add-to-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 24px;
  background: linear-gradient(135deg, #5BC2E7 0%, #3a9fc4 100%);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .25s ease;
  box-shadow: 0 4px 18px rgba(91,194,231,.38);
}

.btn.btn-primary.btn-add-to-cart:hover:not(:disabled) {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #3a9fc4 0%, #2280a8 100%);
  box-shadow: 0 8px 26px rgba(91,194,231,.52);
}

.btn.btn-primary.btn-add-to-cart:disabled { opacity: .7; cursor: not-allowed; }
.btn.btn-primary.btn-add-to-cart .cart-icon { font-size: 1.1rem; }

/* Wishlist */
.btn.btn-secondary.btn-wishlist {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 24px;
  background: white;
  color: var(--sp);
  border: 1.5px solid var(--sp);
  border-radius: 14px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}

.btn.btn-secondary.btn-wishlist:hover { background: var(--sp-lighter); }
.btn.btn-secondary.btn-wishlist .heart-icon { font-size: 1rem; }

/* Out of stock */
.out-of-stock {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
  padding: 18px;
  background: #fef2f2;
  border-radius: 14px;
  border: 1.5px solid #fecaca;
}

.out-of-stock .stock-status { font-size: .9rem; font-weight: 800; color: #dc2626; }
.notify-link { font-size: .82rem; color: var(--sp); text-decoration: underline; cursor: pointer; }

/* ══════════════════════════════════════════
   ZOOM MODAL — SnappShop Style
══════════════════════════════════════════ */
.image-zoom-modal {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: 9999;
  flex-direction: column;
  background: #fff;
}

.image-zoom-modal.active,
.image-zoom-modal[aria-hidden="false"] { display: flex !important; }

/* Header bar */
.image-zoom-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  flex-shrink: 0;
  direction: rtl;
}

.image-zoom-modal__title {
  font-size: 1rem;
  font-weight: 800;
  color: #1a1a2e;
}

.image-zoom-modal .close-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #f5f5f5;
  border: none;
  color: #333;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s;
  flex-shrink: 0;
}

.image-zoom-modal .close-btn:hover { background: #e8e8e8; }

/* Main image area */
.image-zoom-modal__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: #fff;
  min-height: 0;
}

.image-zoom-modal .modal-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 16px;
}

.image-zoom-modal .modal-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

.image-zoom-modal .nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  border: 1.5px solid #e5e5e5;
  color: #333;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  z-index: 2;
}

.image-zoom-modal .nav-btn:hover { background: #fff; border-color: #5BC2E7; color: #5BC2E7; }
.image-zoom-modal .nav-btn.prev { right: 12px; }
.image-zoom-modal .nav-btn.next { left: 12px; }
.image-zoom-modal .nav-btn[style*="none"] { display: none !important; }

/* Footer: counter + thumbstrip */
.image-zoom-modal__footer {
  flex-shrink: 0;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  padding: 10px 16px 12px;
  direction: rtl;
}

.image-zoom-modal__counter {
  font-size: .78rem;
  color: #888;
  font-weight: 600;
  display: block;
  text-align: right;
  margin-bottom: 10px;
}

.image-zoom-modal__thumbstrip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
  direction: rtl;
}

.image-zoom-modal__thumbstrip::-webkit-scrollbar { display: none; }

.image-zoom-modal__thumb {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color .18s;
  background: #f8f8f8;
}

.image-zoom-modal__thumb.active {
  border-color: #5BC2E7;
}

.image-zoom-modal__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

/* ══════════════════════════════════════════
   STICKY BOTTOM BAR
══════════════════════════════════════════ */
/* نوار بیرونی — تمام‌عرض؛ فاصله از طرفین با padding (مصون از اسکرول‌بار) */
.sticky-purchase-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999; /* بالاتر از منوی ناوبری پایین (9998) */
  background: none;
  border: none;
  box-shadow: none;
  padding: 0 12px;
  direction: rtl;
}

/* قاب آبی برند دور تا دور نوار */
.sticky-bar__inner::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1.5px solid #5BC2E7;
  border-radius: 16px;
  pointer-events: none;
}

/* ── هماهنگی نوار خرید با سایر عناصر شناور صفحه ──
   ارتفاع تقریبی نوار خرید (برای فاصله‌دهی دکمه‌های شناور) */
:root { --shelby-buybar-h: 66px; }

/* دسکتاپ: منوی پایین مخفی است → نوار به کف می‌چسبد،
   دکمه‌های شناور (پشتیبانی + برگشت‌به‌بالا) بالای نوارِ ناوبریِ رنگ می‌روند */
.ssw-fab { bottom: calc(24px + var(--shelby-buybar-h)) !important; }
#back-to-top { bottom: calc(28px + var(--shelby-buybar-h)) !important; }

/* موبایل/تبلت: نوار خرید بالای منوی ناوبری پایین با کمی فاصله (≈80px منو + 12px فاصله) */
@media (max-width: 1023px) {
  .sticky-purchase-bar {
    bottom: 92px;
  }
  .ssw-fab {
    bottom: calc(92px + var(--shelby-buybar-h) + 14px) !important;
  }
  #back-to-top {
    bottom: calc(92px + var(--shelby-buybar-h) + 18px) !important;
  }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  @media (max-width: 1023px) {
    .sticky-purchase-bar {
      bottom: calc(92px + env(safe-area-inset-bottom));
    }
    .ssw-fab {
      bottom: calc(92px + var(--shelby-buybar-h) + 14px + env(safe-area-inset-bottom)) !important;
    }
    #back-to-top {
      bottom: calc(92px + var(--shelby-buybar-h) + 18px + env(safe-area-inset-bottom)) !important;
    }
  }
}

.sticky-bar__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 50px;
  padding: 9px 14px;
  /* شیشهٔ مات اپل (liquid glass) — حداکثر شفافیت، blur قوی، بازتاب نور لطیف */
  background:
    linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,.06) 100%);
  backdrop-filter: blur(48px) saturate(220%) brightness(112%);
  -webkit-backdrop-filter: blur(48px) saturate(220%) brightness(112%);
  border-radius: 16px;
  box-shadow:
    0 8px 32px rgba(26,19,26,.13),
    inset 0 1px 1.5px rgba(255,255,255,.95),
    inset 0 -1px 3px rgba(255,255,255,.40);
}

/* دکمه علاقه‌مندی */
.sticky-bar__wish {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  border: 1.5px solid var(--sp);
  background: #fff;
  color: var(--sp);
  cursor: pointer;
  transition: all .2s;
  padding: 0;
}

.sticky-bar__wish svg { width: 20px; height: 20px; }
.sticky-bar__wish:hover { background: var(--sp-lighter); }

/* حالت افزوده‌شده — WishlistManager کلاس .active و data-in-wishlist می‌گذارد
   و رنگ قرمز inline روی آیکن ست می‌کند؛ با !important به صورتی برند override می‌شود */
.sticky-bar__wish.active,
.sticky-bar__wish[data-in-wishlist="true"] {
  background: var(--sp);
  border-color: var(--sp);
  color: #fff;
}
.sticky-bar__wish.active svg,
.sticky-bar__wish.active svg path,
.sticky-bar__wish[data-in-wishlist="true"] svg,
.sticky-bar__wish[data-in-wishlist="true"] svg path {
  fill: #fff !important;
  stroke: #fff !important;
}

/* بلوک قیمت — سمت چپ */
.sticky-bar__pricing {
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: flex-start;
  min-width: 0;
  line-height: 1.15;
}

.sticky-bar__price-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sticky-bar__original {
  font-size: .72rem;
  color: #aaa;
  text-decoration: line-through;
  font-weight: 500;
}

.sticky-bar__price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.sticky-bar__discount {
  background: linear-gradient(135deg, #ef4444, #f87171);
  color: #fff;
  padding: 1px 7px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 800;
}

.sticky-bar__price {
  font-size: 1.15rem;
  font-weight: 900;
  color: #1a1a2e;
}

.sticky-bar__currency {
  font-size: .72rem;
  color: #666;
  font-weight: 600;
}

/* سمت راست: گروه اکشن — دکمه خرید + علاقه‌مندی (مهم‌ها سمت راست) */
.sticky-bar__actions {
  order: 1;             /* راست */
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

/* داخل گروه اکشن: دکمه خرید راست، علاقه‌مندی چپ */
.sticky-bar__actions .sticky-bar__btn,
.sticky-bar__actions .sticky-bar__qty { order: 1; }
.sticky-bar__actions .sticky-bar__wish { order: 2; }

/* قیمت سمت چپ */
.sticky-bar__pricing { order: 2; }

/* Sticky add-to-cart button — صورتی شلبی (هماهنگ با بقیه دکمه‌های سایت) */
.sticky-bar__btn {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 30px;
  background: linear-gradient(135deg, var(--sp) 0%, var(--sp-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 11px;
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all .22s;
  box-shadow: 0 4px 16px rgba(230,73,128,.36);
}

.sticky-bar__btn:hover {
  background: linear-gradient(135deg, var(--sp-dark) 0%, #a01548 100%);
  box-shadow: 0 6px 22px rgba(230,73,128,.46);
  transform: translateY(-1px);
}

.sticky-bar__btn:disabled { opacity: .7; cursor: not-allowed; transform: none; }

/* Sticky quantity controls — دکمه + سمت راست */
.sticky-bar__qty {
  display: none;
  align-items: center;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  direction: ltr; /* ترتیب: حذف(چپ) | عدد | +(راست) */
}

.sticky-bar__qty.visible { display: flex; }

.sticky-bar__qty-btn {
  width: 36px; height: 36px;
  border: none;
  background: #f5f5f5;
  color: #333;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s;
}

.sticky-bar__qty-btn:hover { background: var(--sp); color: #fff; }
.sticky-bar__qty-btn svg { width: 15px; height: 15px; }
.sticky-bar__qty-btn.is-delete { color: #ef4444; }
.sticky-bar__qty-btn.is-delete:hover { background: #ef4444; color: #fff; }

.sticky-bar__qty-val {
  min-width: 40px;
  text-align: center;
  font-size: .88rem;
  font-weight: 700;
  color: #1a1a2e;
  border-right: 1.5px solid #e0e0e0;
  border-left: 1.5px solid #e0e0e0;
  padding: 0 6px;
  height: 36px;
  line-height: 36px;
}

/* Out-of-stock variant */
.sticky-bar__btn.oos {
  background: #f1f5f9;
  color: #94a3b8;
  box-shadow: none;
  pointer-events: none;
}

@media (max-width: 767px) {
  .sticky-purchase-bar { padding: 0 10px; }
  .sticky-bar__inner { gap: 10px; min-height: 48px; padding: 8px 12px; }
  .sticky-bar__left { gap: 9px; }
  .sticky-bar__btn { padding: 11px 24px; font-size: .86rem; }
  .sticky-bar__price { font-size: 1.02rem; }
  .sticky-bar__wish { width: 38px; height: 38px; }
  .sticky-bar__wish svg { width: 19px; height: 19px; }
  .sticky-bar__qty-btn { width: 34px; height: 34px; }
  .sticky-bar__qty-val { min-width: 36px; height: 34px; line-height: 34px; }
}

@media (max-width: 360px) {
  .sticky-bar__original { display: none; } /* صرفه‌جویی فضا روی موبایل خیلی کوچک */
  .sticky-bar__btn { padding: 10px 12px; }
}

/* ══════════════════════════════════════════
   TABS SECTION
══════════════════════════════════════════ */
.product-tabs-section {
  display: block !important;
  background: white;
  border-radius: var(--r-card);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 28px;
}

.product-tabs-nav {
  display: flex;
  border-bottom: 1.5px solid var(--border);
  background: #fdf5f8;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.product-tabs-nav::-webkit-scrollbar { display: none; }

.product-tab-btn {
  padding: 15px 20px;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color .2s;
}

.product-tab-btn.active { color: var(--sp); }

.product-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2.5px;
  background: var(--sp);
  border-radius: 2px 2px 0 0;
}

.product-tab-btn:hover:not(.active) { color: var(--sp-dark); }

.product-tab-content {
  display: none;
  padding: 28px;
  animation: tabFadeIn .22s ease;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.product-tab-content.active { display: block; }

/* Description */
.tab-description {
  line-height: 2.05;
  color: var(--text-2);
  font-size: .92rem;
}

.tab-description h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-1);
  margin: 0 0 12px;
  padding: 8px 12px;
  background: var(--sp-lighter);
  border-radius: 8px;
  border-right: 3px solid var(--sp);
}

/* Specifications */
.product-specifications { display: flex; flex-direction: column; gap: 22px; }

.spec-group h4 {
  font-size: .92rem;
  font-weight: 800;
  color: var(--text-1);
  margin: 0 0 10px;
  padding: 8px 14px;
  background: var(--sp-lighter);
  border-radius: 8px;
  border-right: 3px solid var(--sp);
}

.spec-list { display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; border: 1.5px solid var(--border); }

.spec-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.spec-item:last-child { border-bottom: none; }
.spec-item:nth-child(even) { background: #fdf5f8; }
.spec-label { font-size: .84rem; color: var(--text-3); font-weight: 600; }
.spec-value { font-size: .84rem; color: var(--text-1); font-weight: 700; text-align: left; }

/* ══════════════════════════════════════════
   REVIEWS
══════════════════════════════════════════ */
.product-reviews-section { display: flex; flex-direction: column; gap: 24px; }

.reviews-rating-overview {
  display: flex;
  gap: 20px;
  align-items: stretch;
  flex-wrap: wrap;
}

.reviews-average-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--sp-lighter);
  border-radius: 14px;
  padding: 20px 28px;
  border: 1.5px solid var(--border);
  min-width: 120px;
}

.reviews-average-number {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--sp);
  line-height: 1;
}

.reviews-stars-display { font-size: 1rem; letter-spacing: 2px; }
.reviews-total-count { font-size: .78rem; color: var(--text-3); font-weight: 600; }

.reviews-rating-breakdown {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  min-width: 200px;
  justify-content: center;
}

.rating-bar-item { display: flex; align-items: center; gap: 8px; }
.rating-bar-label { font-size: .8rem; color: var(--text-2); min-width: 38px; text-align: right; }

.rating-bar-fill {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.rating-bar-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--sp), var(--sp-dark));
  border-radius: 4px;
  transition: width .5s ease;
}

.rating-bar-count { font-size: .78rem; color: var(--text-3); min-width: 18px; }

/* Review messages */
.review-form-message {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.review-form-success { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.review-form-error   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.review-form-info    { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

/* Review form */
.review-form-wrapper {
  background: var(--sp-lighter);
  border-radius: 14px;
  padding: 20px;
  border: 1.5px solid var(--border);
}

.review-form-title { font-size: 1rem; font-weight: 800; color: var(--text-1); margin: 0 0 16px; }
.review-form { display: flex; flex-direction: column; gap: 14px; }
.review-form-group { display: flex; flex-direction: column; gap: 6px; }

.review-form-group label { font-size: .85rem; font-weight: 700; color: var(--text-2); }
.required { color: var(--sp); }

.review-rating-stars-input { display: flex; gap: 4px; direction: ltr; }

.review-star-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #f59e0b;
  padding: 2px;
  transition: transform .15s;
}

.review-star-btn:hover { transform: scale(1.25); }
.review-star-btn.active { color: #f59e0b; }

.review-form-input, .review-form-textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: .9rem;
  color: var(--text-1);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  background: white;
}

.review-form-input:focus, .review-form-textarea:focus {
  border-color: var(--sp);
  box-shadow: 0 0 0 3px rgba(230,73,128,.1);
}

.review-form-textarea { resize: vertical; min-height: 100px; }
.review-form-hint { font-size: .78rem; color: var(--text-3); }
.review-form-error-text { font-size: .8rem; color: #dc2626; font-weight: 600; }

.review-form-submit {
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--sp), var(--sp-dark));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .2s;
  align-self: flex-start;
  box-shadow: 0 4px 14px rgba(230,73,128,.28);
}

.review-form-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(230,73,128,.38); }

.review-form-login-prompt {
  background: var(--sp-lighter);
  border-radius: 12px;
  padding: 18px 20px;
  border: 1.5px solid var(--border);
  text-align: center;
  font-size: .9rem;
  color: var(--text-2);
}

.review-form-login-prompt a { color: var(--sp); font-weight: 700; }

/* Individual reviews */
.individual-reviews { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }

.review-item {
  background: white;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}

.review-item:hover { box-shadow: var(--shadow-md); }

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.review-author { font-size: .9rem; font-weight: 800; color: var(--text-1); }
.review-date   { font-size: .76rem; color: var(--text-3); }
.review-rating { font-size: .88rem; margin-bottom: 5px; letter-spacing: 1px; }
.review-title  { font-size: .9rem; font-weight: 800; color: var(--text-1); margin-bottom: 6px; }
.review-content{ font-size: .88rem; color: var(--text-2); line-height: 1.85; }

.review-admin-reply {
  margin-top: 12px;
  padding: 12px 14px;
  background: #f0f9ff;
  border-radius: 10px;
  border-right: 3px solid var(--sb);
}

.review-admin-reply strong { font-size: .82rem; color: var(--sb-dark); }
.review-admin-reply p { margin: 6px 0 0; font-size: .85rem; color: var(--text-2); }
.review-admin-reply-date { font-size: .75rem; color: var(--text-3); }

.text-center { text-align: center; }

/* ══════════════════════════════════════════
   SHIPPING & FAQ (same tab)
══════════════════════════════════════════ */
.product-shipping-info { display: flex; flex-direction: column; gap: 24px; }
.shipping-info-title { font-size: 1rem; font-weight: 800; color: var(--text-1); margin: 0 0 16px; }

.shipping-info-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.shipping-method {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 16px;
  background: var(--sp-lighter);
  border-radius: 12px;
  border: 1.5px solid var(--border);
  transition: box-shadow .2s;
}

.shipping-method:hover { box-shadow: var(--shadow-sm); }
.shipping-method-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1; }

.shipping-method-details h4 {
  font-size: .88rem;
  font-weight: 800;
  color: var(--text-1);
  margin: 0 0 4px;
}

.shipping-method-details p { font-size: .82rem; color: var(--text-2); margin: 0; line-height: 1.65; }
.shipping-method-details a { color: var(--sp); font-weight: 700; }

/* FAQ */
.product-faq-section { margin-top: 6px; }
.faq-title { font-size: 1rem; font-weight: 800; color: var(--text-1); margin: 0 0 14px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }

.faq-item {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .2s;
}

.faq-item.active { border-color: rgba(230,73,128,.3); }

.faq-question {
  width: 100%;
  padding: 14px 18px;
  background: white;
  border: none;
  text-align: right;
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background .2s;
}

.faq-question::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--sp);
  flex-shrink: 0;
  line-height: 1;
}

.faq-item.active .faq-question { background: var(--sp-lighter); color: var(--sp); }
.faq-item.active .faq-question::after { content: '−'; }

.faq-answer {
  display: none;
  padding: 0 18px 16px;
  background: var(--sp-lighter);
}

.faq-item.active .faq-answer { display: block; }

.faq-answer p {
  font-size: .88rem;
  color: var(--text-2);
  line-height: 1.85;
  margin: 0;
  padding-top: 12px;
}

/* ══════════════════════════════════════════
   SOCIAL SHARE
══════════════════════════════════════════ */
.product-social-share {
  background: white;
  border-radius: var(--r-card);
  border: 1.5px solid var(--border);
  padding: 20px 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.social-share-title { font-size: .92rem; font-weight: 800; color: var(--text-1); margin: 0 0 14px; }

.social-share-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

.social-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 22px;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  color: white;
  transition: transform .2s, box-shadow .2s;
}

.social-share-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.social-share-btn.sms      { background: linear-gradient(135deg, var(--sp), var(--sp-dark)); }
.social-share-btn.whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); }
.social-share-btn.telegram { background: linear-gradient(135deg, #2aabee, #1a8ad4); }

/* ══════════════════════════════════════════
   RELATED / RECENTLY VIEWED STRIPS
   — matches home page best-selling / newest UI
══════════════════════════════════════════ */
.related-products-strip,
.recently-viewed-strip {
  padding: 12px 0;
}

/* Strip header: title + view-all side by side */
.strip-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px 0;
}

.strip-header-row .section-title {
  font-size: clamp(1.25rem, 3.4vw, 1.75rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.2;
  direction: rtl;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.strip-header-row .section-title--accent { color: #0f172a; }

.section-title__sparkle {
  font-size: 1.1rem;
  line-height: 1;
  display: inline-block;
}

.section-strip__view-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--sp);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .2s;
}

.section-strip__view-all:hover { color: var(--sp-dark); }

/* ── Panel wrappers ── */
.related-products-strip .home-product-strip-panel,
.recently-viewed-strip .home-product-strip-panel {
  position: relative;
  border-radius: 22px;
  padding: 20px 18px 16px;
  overflow: hidden;
}

.related-products-strip .home-product-strip-panel {
  background: linear-gradient(155deg, #fff8f2 0%, #fff2f8 55%, #fff0f5 100%);
  border: 1.5px solid rgba(249, 126, 159, 0.22);
  box-shadow: 0 4px 24px rgba(249, 126, 159, 0.13), 0 1px 4px rgba(0,0,0,0.04);
}

.related-products-strip .home-product-strip-panel::before {
  content: '';
  position: absolute;
  top: -40px; left: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(249,126,159,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.recently-viewed-strip .home-product-strip-panel {
  background: linear-gradient(155deg, #fff8fb 0%, #fce7f3 55%, #fff2f8 100%);
  border: 1.5px solid rgba(249, 126, 159, 0.22);
  box-shadow: 0 4px 24px rgba(249, 126, 159, 0.13), 0 1px 4px rgba(0,0,0,0.04);
}

.recently-viewed-strip .home-product-strip-panel::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(249,126,159,0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Product Ribbon ── */
.product-ribbon {
  display: flex;
  align-items: stretch;
  gap: 12px;
  position: relative;
  margin: 0 -4px;
  direction: ltr;
}

.product-ribbon__viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.product-ribbon__track {
  display: flex;
  flex-direction: row-reverse;
  gap: 24px;
  width: 100%;
  min-width: 0;
  padding: 6px 4px 18px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  direction: ltr;
  scrollbar-width: thin;
  scrollbar-color: rgba(249,126,159,0.45) transparent;
  cursor: grab;
}

.product-ribbon__track.is-dragging { cursor: grabbing; scroll-behavior: auto; user-select: none; }
.product-ribbon__track.is-dragging * { pointer-events: none; }
.product-ribbon__track::-webkit-scrollbar { height: 6px; }
.product-ribbon__track::-webkit-scrollbar-thumb { background: rgba(249,126,159,0.4); border-radius: 999px; }

.product-ribbon__cell {
  flex: 0 0 min(300px, 82vw);
  min-width: min(300px, 82vw);
  max-width: min(300px, 82vw);
  direction: rtl;
}

.product-ribbon--compact .product-ribbon__track { gap: 10px; padding-bottom: 12px; }

.product-ribbon--compact .product-ribbon__cell {
  flex: 0 0 clamp(166px, 22vw, 200px);
  min-width: clamp(166px, 22vw, 200px);
  max-width: clamp(166px, 22vw, 200px);
}

.product-ribbon__cell .product-card { width: 100%; height: 100%; }

.product-ribbon__arrow {
  flex-shrink: 0;
  width: 44px; height: 44px;
  align-self: center;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  background: #fff;
  color: #4a5568;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color .2s ease, box-shadow .2s ease, border-color .2s ease;
  z-index: 2;
}

.product-ribbon__arrow:hover:not(:disabled) { color: #f97e9f; border-color: #f9c4d4; box-shadow: 0 4px 14px rgba(249,126,159,0.2); }
.product-ribbon__arrow:disabled { opacity: .35; cursor: default; box-shadow: none; }

.related-products-strip .product-ribbon__arrow,
.recently-viewed-strip .product-ribbon__arrow { display: none; }

.related-products-strip .product-ribbon,
.recently-viewed-strip .product-ribbon { margin: 0; gap: 0; }

.related-products-strip .product-ribbon__track,
.recently-viewed-strip .product-ribbon__track { padding-left: 0; padding-right: 0; gap: 10px; }

/* ── Home Strip Card ── */
.home-strip-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid rgba(226,232,240,0.8);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
  box-shadow: 0 2px 8px rgba(15,23,42,0.05);
}

.home-strip-card:hover {
  border-color: rgba(249,126,159,0.4);
  box-shadow: 0 8px 28px rgba(249,126,159,0.2), 0 2px 8px rgba(0,0,0,0.04);
  transform: translateY(-3px);
}

.home-strip-card__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 155px;
  background: linear-gradient(145deg, #fdf8fc, #f8f9ff);
  overflow: hidden;
  text-decoration: none;
  flex-shrink: 0;
}

.home-strip-card__media img {
  max-width: 90%; max-height: 138px;
  width: auto; height: auto;
  object-fit: contain; display: block;
  transition: transform .3s ease;
}

.home-strip-card:hover .home-strip-card__media img { transform: scale(1.05); }

.home-strip-card__media-placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  color: #e2e8f0;
}

.home-strip-card__sale-badge {
  position: absolute;
  top: 8px; right: 8px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: .68rem; font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(220,38,38,0.4);
  direction: ltr;
}

.home-strip-card__oos-overlay {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700;
  color: #94a3b8;
  z-index: 3;
}

.home-strip-card__body {
  padding: 10px 11px 11px;
  flex: 1;
  display: flex; flex-direction: column;
  gap: 7px;
  text-align: right;
  direction: rtl;
}

.home-strip-card__title {
  margin: 0;
  font-size: .83rem; font-weight: 700;
  line-height: 1.38; color: #1e293b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-shrink: 0;
}

.home-strip-card__title a { color: inherit; text-decoration: none; transition: color .15s; }
.home-strip-card__title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.home-strip-card__title a:hover { color: #e84c87; }

.home-strip-card__pricing {
  display: flex; flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin-top: auto;
}

.home-strip-card__old { text-decoration: line-through; color: #94a3b8; font-size: .72rem; font-weight: 500; direction: ltr; }
.home-strip-card__price-row { display: flex; align-items: baseline; gap: 3px; direction: ltr; }
.home-strip-card__price { font-weight: 800; font-size: .96rem; color: #0f172a; letter-spacing: -.025em; }
.home-strip-card__currency { font-size: .7rem; font-weight: 600; color: #64748b; }

.home-strip-card__add-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 10px;
  background: linear-gradient(135deg, #f97e9f 0%, #e84c87 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .8rem; font-weight: 700;
  cursor: pointer;
  transition: all .22s ease;
  box-shadow: 0 3px 10px rgba(232,76,135,0.32);
  direction: rtl;
  position: relative; z-index: 2;
  flex-shrink: 0;
}

.home-strip-card__add-btn:hover { background: linear-gradient(135deg, #e84c87 0%, #c8185e 100%); box-shadow: 0 5px 16px rgba(232,76,135,0.48); transform: translateY(-1px); }
.home-strip-card__add-btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(232,76,135,0.3); }
.home-strip-card__add-btn:disabled { opacity: .75; cursor: wait; }
.home-strip-card__add-btn svg { flex-shrink: 0; opacity: .9; }

.home-strip-card__oos-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  padding: 8px 10px;
  background: #f1f5f9; color: #94a3b8;
  border-radius: 10px;
  font-size: .76rem; font-weight: 600;
  direction: rtl; text-align: center;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
}

/* ── RESPONSIVE ── */
@media (max-width: 767px) {
  .site-container { padding: 0 14px 100px; }
  .product-tabs-nav { padding: 0 8px; }
  .product-tab-btn { padding: 12px 14px; font-size: .84rem; }
  .product-tab-content { padding: 18px 16px; }
  .current-price .product-price-amount { font-size: 1.55rem; }
  .shipping-info-content { grid-template-columns: 1fr; }
  .reviews-rating-overview { flex-direction: column; }
  .reviews-average-score { flex-direction: row; padding: 14px 18px; }
  .social-share-buttons { gap: 8px; }
  .product-social-share { padding: 16px; }

  .related-products-strip .home-product-strip-panel,
  .recently-viewed-strip .home-product-strip-panel { border-radius: 18px; padding: 16px 12px 12px; }

  .product-ribbon--compact .product-ribbon__cell {
    flex-basis: clamp(156px, 48vw, 190px);
    min-width: clamp(156px, 48vw, 190px);
    max-width: clamp(156px, 48vw, 190px);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .product-gallery-section { position: static; }
}

/* ══════════════════════════════════════════
   PRODUCT PREV / NEXT — نوار افقیِ درون‌جریان (inline)، بالای بخشِ تب‌ها
   (همان دسته، بر اساس عدد SKU)
══════════════════════════════════════════ */
/* display:flex با !important چون قانون سراسریِ .site-container > * آن را به block !important می‌برد */
.site-container > .product-side-nav {
  direction: rtl;
  display: flex !important;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  width: 100% !important;
  max-width: 1100px;
  margin: 6px auto 22px;       /* فاصله از گالریِ بالا و تب‌های پایین */
  padding: 0;
  clear: none !important;
  float: none !important;
}

.pnav__btn {
  flex: 1 1 0;                  /* دو دکمه هم‌عرض، نوارِ دوتکهٔ یکدست */
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.86) 100%);
  -webkit-backdrop-filter: blur(22px) saturate(200%);
  backdrop-filter: blur(22px) saturate(200%);
  border: 1.5px solid var(--sb);
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(26,19,26,.16), inset 0 1px 1px rgba(255,255,255,.9);
  transition: background .22s ease, box-shadow .22s ease, transform .18s ease;
}
/* محتوا به سمت لبهٔ بیرونی (فلش‌ها کنارهٔ صفحه) */
.pnav__btn--prev { justify-content: flex-start; }   /* rtl: start = راست */
.pnav__btn--next { justify-content: flex-end; }      /* rtl: end = چپ */

/* «رنگ بعدی» = تمِ صورتیِ برند (قاب/فلش/برچسب) به‌جای آبی، برای تفکیک بصری */
.pnav__btn--next {
  border-color: var(--sp);
  box-shadow: 0 6px 20px rgba(230,73,128,.18), inset 0 1px 1px rgba(255,255,255,.9);
}
.pnav__btn--next .pnav__arrow,
.pnav__btn--next .pnav__label { color: var(--sp-dark); }

/* تک‌دکمه (فقط «رنگ قبلی» یا فقط «رنگ بعدی»): قابِ ترکیبیِ صورتی↔آبی به‌جای تک‌رنگ.
   بعد از قانونِ --next می‌آید تا روی هر دو حالت غالب شود (هم‌وزنِ specificity). */
.pnav__btn:only-of-type {
  border-color: transparent;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.86) 100%) padding-box,
    linear-gradient(125deg, var(--sp) 0%, #b39ad6 52%, var(--sb) 100%) border-box;
  box-shadow: 0 6px 20px rgba(26,19,26,.16), inset 0 1px 1px rgba(255,255,255,.9);
}

.pnav__arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sb-dark);
  transition: color .22s ease;
}
.pnav__arrow svg { width: 22px; height: 22px; }

.pnav__thumb {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 9px;
  overflow: hidden;
  background: var(--sp-lighter);
  border: 1px solid var(--border);
}
.pnav__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pnav__meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pnav__btn--prev .pnav__meta { text-align: right; }
.pnav__btn--next .pnav__meta { text-align: left; }
.pnav__label { font-size: .66rem; font-weight: 800; color: var(--sb-dark); transition: color .22s ease; }
.pnav__name {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-1);
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .22s ease;
}

/* دسکتاپ: روی هاور/فوکوس، قاب آبیِ برند پر می‌شود */
@media (hover: hover) and (min-width: 1024px) {
  .pnav__btn:hover,
  .pnav__btn:focus-visible {
    background: linear-gradient(135deg, var(--sb) 0%, var(--sb-dark) 100%);
    box-shadow: 0 10px 26px rgba(30,136,201,.40), inset 0 1px 1px rgba(255,255,255,.55);
    transform: translateY(-1px);
  }
  .pnav__btn:hover .pnav__arrow,
  .pnav__btn:focus-visible .pnav__arrow,
  .pnav__btn:hover .pnav__label,
  .pnav__btn:focus-visible .pnav__label,
  .pnav__btn:hover .pnav__name,
  .pnav__btn:focus-visible .pnav__name { color: #fff; }

  /* «رنگ بعدی»: هاورِ صورتی (بعد از قانون آبی تا غالب شود) */
  .pnav__btn--next:hover,
  .pnav__btn--next:focus-visible {
    background: linear-gradient(135deg, var(--sp) 0%, var(--sp-dark) 100%);
    box-shadow: 0 10px 26px rgba(230,73,128,.40), inset 0 1px 1px rgba(255,255,255,.55);
  }
}

/* موبایل/تبلت: نام بلند حذف می‌شود؛ عکس + برچسب + فلش (جمع‌وجور و واضح) */
@media (max-width: 1023px) {
  .site-container > .product-side-nav { gap: 10px; }
  .pnav__name { display: none; }
  .pnav__btn { padding: 7px 11px; gap: 7px; background: #fff; box-shadow: 0 4px 14px rgba(26,19,26,.14); }
  .pnav__thumb { width: 38px; height: 38px; }
  .pnav__arrow svg { width: 20px; height: 20px; }
  .pnav__btn:active {
    background: linear-gradient(135deg, var(--sb) 0%, var(--sb-dark) 100%);
    transform: scale(.97);
  }
  .pnav__btn:active .pnav__arrow,
  .pnav__btn:active .pnav__label { color: #fff; }
  .pnav__btn:active .pnav__thumb { border-color: #fff; }
  /* «رنگ بعدی»: فشارِ صورتی */
  .pnav__btn--next:active { background: linear-gradient(135deg, var(--sp) 0%, var(--sp-dark) 100%); }
}

/* ══════════════════════════════════════════
   نسخهٔ موبایلِ ناوبری رنگ — داخل کارت عنوان، زیر عنوان محصول
══════════════════════════════════════════ */
/* پیش‌فرض (دسکتاپ/تبلت ≥768px): نسخهٔ داخل عنوان مخفی، نسخهٔ مستقلِ پایین نمایش داده می‌شود */
.product-header-section .product-side-nav--inheader {
  direction: rtl;
  display: none;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin: 14px 0 0;
  padding: 0;
}

@media (max-width: 767px) {
  /* موبایل: ناوبری داخل عنوان فعال، نسخهٔ مستقلِ پایین مخفی */
  .product-header-section .product-side-nav--inheader { display: flex; }
  .site-container > .product-side-nav--standalone { display: none !important; }
}
