@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@800;900&display=swap');

/* =========================
   PDP Theme
========================= */
:root{

  --pdp-page-bg: #ffffff;
  --pdp-hero-bg: #f5f5f5;
  --pdp-tabs-card-bg: #f7f7f7;
  --pdp-card-bg: #ffffff;
  --pdp-border: #e5e7eb;
  --pdp-text: #111111;
  --pdp-muted: #6b7280;
  --pdp-accent: #a47e2c;
}

/* =========================
   Page Base
========================= */
.product-detail-page{
  width: 100%;
  background: var(--pdp-page-bg);
  overflow-x: clip;
}

/* =========================
   Top section
========================= */
.product-hero-section{
  width: 100%;
  background: var(--pdp-hero-bg);
  padding: 0 16px; /* فقط افقی */
}

.product-page{
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 6fr) 4fr;
  gap: 24px;
  align-items: stretch;
}

/* =========================
   Column wrappers
========================= */
.product-gallery-col{
  min-width: 0;
  display: flex;
  align-items: stretch;
  padding: 22px 0 30px;
}

.product-details-col{
  min-width: 0;
  display: flex;
  align-items: flex-start;
  padding: 22px 0 30px; /* فاصله فقط برای کارت */
}

/* =========================
   Gallery
========================= */
.product-gallery{
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  position: relative;
  margin: 0;
}

.main-image{
  width: 100%;
  height: 100%;
  min-height: 450px;
  border-radius: 5px;
  background: var(--pdp-hero-bg);
  overflow: hidden;
  position: relative;
  display: block;
  padding: 0;
  margin: 0;
  line-height: 0;
}

.main-image > img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: cover;
  object-position: center 70%;
  vertical-align: top;
}

.main-image > img.is-model-img,
.main-image.is-model-image > img{
  object-position: center top;
}

/* نشان بچگانه روی گالری صفحه محصول */
.kids-badge-gallery-overlay {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 72px;
  height: 72px;
  z-index: 12;
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.15));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.main-image:hover .kids-badge-gallery-overlay {
  transform: scale(1.1) rotate(-6deg);
}

.kids-badge-gallery-overlay img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.zoom-lens {
  position: absolute;
  width: 160px;
  height: 160px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.25), inset 0 0 10px rgba(0, 0, 0, 0.15);
  background-repeat: no-repeat;
  background-origin: border-box;
  box-sizing: border-box;
  pointer-events: none;
  z-index: 10;
  display: none;
}

@media (hover: none) {
  .zoom-lens {
    display: none !important;
  }
}

.main-image:hover {
  cursor: crosshair;
}

/* Thumbs */
.product-gallery .thumbs{
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 3;

  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: nowrap;

  width: max-content;
  max-width: calc(100% - 24px);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scroll-padding-inline: 10px;

  margin: 0;
  padding: 8px 10px;

  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.10);
  backdrop-filter: blur(6px);
}

.product-gallery .thumbs::-webkit-scrollbar{
  display: none;
}

.product-gallery .thumb-btn{
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  line-height: 0;
  flex: 0 0 auto;
  border-radius: 12px;
}

.product-gallery .thumb-btn img{
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  object-position: center center;
  border: 1px solid var(--pdp-border);
  background: #fff;
  display: block;
}

.product-gallery .thumb-btn.active img{
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0,0,0,.10);
}

/* =========================
   Details Card
========================= */
.product-details{
  width: 100%;
  background: var(--pdp-card-bg);
  border: 1px solid var(--pdp-border);
  border-radius: 16px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

/* کانتینر تیتر و breadcrumb */
.product-header {
  margin: 0;
  padding: 0;
}

/* خود h1 */
.product-title{
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 !important;       /* هیچ فاصله‌ای بالا و پایین */
  padding: 0 !important;
  line-height: 1.05;          /* تا جایی که میشه فشرده */
  color: var(--pdp-text);
}

/* breadcrumb با فاصله دقیق 2px از h1 */
.product-publish-line {
  margin-top: 10px !important; /* این فاصله بین تیتر و breadcrumb */
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
  padding: 0 !important;
  font-size: 0.8rem;
  color: #777;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

/* آیتم‌ها */
.product-publish-link,
.product-publish-link.is-static {
  display: inline-block;
  margin: 0 2px;              /* فقط کمی فاصله بین خود کلمات */
  color: #777;
  text-decoration: none;
  line-height: 1.1;
}

.product-publish-link.is-static {
  font-weight: 500;
  color: #555;
  cursor: default;
}

/* hover هماهنگ */
.product-publish-link:hover {
  color: #444;
  text-decoration: none;
}

/* فاصله کم بین هدر و آیتم بعدی کارت (ساب‌تایتل/هرچیز) */
.product-header + * {
  margin-top: 6px;            /* اگر خواستی صفرش کن */
}

.product-subtitle{
  margin: 4px 0 2px;
  font-size: 14px;
  line-height: 1.7;
  color: #4b5563;
}

/* =========================
   Swatches
========================= */
.product-variants{
  margin-top: 2px;
}

.swatches-row{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.swatch-dot{
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #cfd4dc;
  background-color: #eee;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
  padding: 0;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.swatch-dot:hover{
  transform: translateY(-1px);
  border-color: #9aa3af;
}

.swatch-dot.active{
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0,0,0,.10);
}

/* =========================
   Price strip
========================= */
.price-strip{
  background: #eceff3;
  border: 1px solid var(--pdp-border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.current-price{
  font-size: 24px;
  font-weight: 900;
  color: var(--pdp-text);
}

.compare-price{
  font-size: 13px;
  color: var(--pdp-muted);
  text-decoration: line-through;
}

.price-includes{
  font-size: 12px;
  color: #4b5563;
  margin-right: auto;
}

/* =========================
   CTA
========================= */
.select-lens-btn{
  width: 100%;
  background: var(--pdp-accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: filter .2s ease, transform .08s ease;
}

.select-lens-btn:hover{
  filter: brightness(.95);
}

.select-lens-btn:active{
  transform: translateY(1px);
}

.buy-frame-only-btn {
  width: 100%;
  background: transparent;
  color: var(--pdp-accent);
  border: 2px solid var(--pdp-accent);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .08s ease;
}

.buy-frame-only-btn:hover {
  background: var(--pdp-accent);
  color: #fff;
}

.buy-frame-only-btn:active {
  transform: translateY(1px);
}

.product-details__actions-row {
  display: flex;
  gap: 12px;
  width: 100%;
}
.product-details__actions-row .buy-frame-only-btn {
  flex: 1;
  width: auto;
}
.product-fav-toggle {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 2px solid var(--pdp-accent, #db2777);
  background: transparent;
  color: var(--pdp-accent, #db2777);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 0 0 48px;
  box-sizing: border-box;
  padding: 0;
}
.product-fav-toggle:hover {
  background: var(--pdp-accent, #db2777);
  color: #fff;
  transform: scale(1.05);
}
.product-fav-toggle.is-active {
  background: var(--pdp-accent, #db2777);
  color: #fff;
}

/* =========================
   Bottom section
========================= */
.product-info-section{
  width: 100%;
  background: #fff;
  padding: 20px 16px 10px;
}


.product-tabs{
  max-width: 1280px;
  margin: 0 auto;
}

.tabs-nav{
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 42px;
  padding: 0;
  margin: 0;
}

.tabs-nav li{
  padding: 14px 4px 12px;
  cursor: pointer;
  font-weight: 900;
  font-size: 17px;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}

.tabs-nav li.active{
  color: #111;
  border-color: var(--pdp-accent);
}

/* کارت تب‌ها – عرض جمع‌وجورتر */
.product-tabs-card{
  margin-top: 18px;
  background: var(--pdp-tabs-card-bg);
  border: 1px solid var(--pdp-border);
  border-radius: 16px;
  padding: 20px 22px;
  max-width: 100%;        /* تمام‌عرض در محدوده ۱۲۸۰ پیکسل */
  margin-left: auto;
  margin-right: auto;
}

/* محتوای تب‌ها + محدودیت ارتفاع */
.tab-content{
  display: none;
}

.tab-content.active{
  display: block;
}

#features{
  max-height: none;
  overflow-y: visible;
  padding-right: 0;
}

#description{
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0;
}

/* اسکرول‌بار ظریف‌تر (اختیاری) */
#features::-webkit-scrollbar,
#description::-webkit-scrollbar{
  width: 6px;
}

#features::-webkit-scrollbar-thumb,
#description::-webkit-scrollbar-thumb{
  background: #d1d5db;
  border-radius: 999px;
}

/* متن توضیحات */
.product-description-text{
  color: #374151;
  line-height: 2;
}

.tab-placeholder{
  margin: 0;
  color: #6b7280;
  line-height: 1.9;
}

/* =========================
   Features layout (دو ستون متن + تصویر اندازه‌ها)
========================= */
.product-features-layout{
  display: grid;
  /* ستون متن باریک‌تر، ستون عکس عریض‌تر */
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: flex-start;
}

/* ستون متن ویژگی‌ها */
.product-features-meta{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* آیتم‌های آیکونی (Low Nose Bridge و ...) */
.product-features-icons ul{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.product-features-icons li{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.product-features-icons li::before{
  display: none;
}

/* لیست ویژگی‌های اصلی – ساده‌تر بدون کادر و حاشیه کلی */
.product-features-list{
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.product-features-list .feature-row{
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid #eaeaea;
}

.product-features-list .feature-row:last-child{
  border-bottom: none;
  padding-bottom: 0;
}

.feature-label{
  font-weight: 500;
  color: #666666;
  font-size: 14px;
}

.feature-value{
  color: #111111;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.6;
}

/* لینک داخل ویژگی‌ها (رنگ، جنس، فرم، ریم و ...) */
.product-features-list .feature-value a,
.product-features-list .feature-value .feature-link,
.feature-link {
  color: var(--pdp-accent);
  text-decoration: none;
  border-bottom: none;
  padding-bottom: 0;
  font-weight: 600;
  transition: color 0.15s ease;
}

.product-features-list .feature-value a:hover,
.product-features-list .feature-value .feature-link:hover,
.feature-link:hover {
  color: #000000;
  text-decoration: underline !important;
}

/* لغو خط زیرین پیش‌فرض مرورگر */
.product-features-list .feature-value a {
  text-decoration: none !important;
}

/* ==========================================
 * دکمه راهنما و تولتیپ دسته‌بندی وزن در جدول ویژگی‌ها
 * ========================================== */
.weight-help-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-inline-start: 6px;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.weight-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1.5px solid #94a3b8;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  font-family: inherit;
  line-height: 1;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.weight-help-trigger:hover .weight-help-icon,
.weight-help-trigger:focus .weight-help-icon,
.weight-help-trigger:focus-within .weight-help-icon {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  transform: scale(1.15);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.22);
}

.weight-tooltip-bubble {
  position: absolute;
  bottom: calc(100% + 11px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 290px;
  max-width: min(320px, calc(100vw - 36px));
  background: #1e293b;
  color: #f8fafc;
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.35), 0 4px 8px rgba(0, 0, 0, 0.15);
  font-size: 12px;
  line-height: 1.7;
  text-align: right;
  direction: rtl;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
}

.weight-tooltip-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #1e293b transparent transparent transparent;
}

.weight-help-trigger:hover .weight-tooltip-bubble,
.weight-help-trigger:focus .weight-tooltip-bubble,
.weight-help-trigger:focus-within .weight-tooltip-bubble {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.weight-tooltip-title {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.weight-tooltip-range {
  font-size: 11px;
  font-weight: 500;
  color: #cbd5e1;
  margin-inline-start: 4px;
}

.weight-tooltip-desc {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  color: #e2e8f0;
  line-height: 1.75;
  text-align: justify;
}

@media (max-width: 640px) {
  .weight-tooltip-bubble {
    left: auto;
    right: -30px;
    transform: translateY(6px);
  }
  .weight-tooltip-bubble::after {
    left: auto;
    right: 36px;
    transform: none;
  }
  .weight-help-trigger:hover .weight-tooltip-bubble,
  .weight-help-trigger:focus .weight-tooltip-bubble,
  .weight-help-trigger:focus-within .weight-tooltip-bubble {
    transform: translateY(0);
  }
}

/* ردیف راهنمای سایز */
.size-help-row{
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  font-size: 13px;
}

.size-help-text{
  color: #4b5563;
}

.size-guide-link{
  color: var(--pdp-accent);
  text-decoration: none;
  font-weight: 800;
  border-bottom: 1px solid rgba(164,126,44,0.35);
  padding-bottom: 1px;
  transition: color .12s ease, border-color .12s ease;
}

.size-guide-link:hover{
  color: #8b691f;
  border-color: rgba(139,105,31,0.7);
}

/* ستون تصویر اندازه‌ها – باکس سفید کنار متن ویژگی‌ها */
.product-features-measure{
  border-radius: 12px;
  background: #fdfdfd;
  border: 1px solid #e5e7eb;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  height: 100%;
}

/* کادر عکس اندازه‌ها */
.measure-image-wrapper{
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 460px;
  height: auto;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  position: relative;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* خود عکس – کاملاً کل باکس را پر می‌کند (فول باکس) */
.measure-image-wrapper img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* دکمه‌های سوییچ نمای روبرو / دسته */
.measure-toggle-row{
  display: inline-flex;
  align-self: flex-start;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  overflow: hidden;
  background: #f9fafb;
}

.measure-toggle-btn{
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: #4b5563;
  transition: background .12s ease, color .12s ease;
}

.measure-toggle-btn + .measure-toggle-btn{
  border-right: 1px solid #e5e7eb;
}

.measure-toggle-btn.active{
  background: #111827;
  color: #fff;
}

/* ===== تب توضیحات: لایوت متن + عکس دوم ===== */

/* کانتینر اصلی دو ستونه */
.product-description-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: flex-start;
  margin-top: 20px;
}

/* ستون متن توضیحات */
.product-description-text {
  font-size: 14px;
  line-height: 1.8;
  color: #333;
}

.product-description-text p {
  margin-bottom: 10px;
}

/* ستون عکس */
.product-description-image {
  position: relative;
  width: 100%;
  height: 420px;
  border-radius: 10px;
  overflow: hidden;
  background-color: #f7f7f7;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.product-description-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== ریسپانسیو برای موبایل / تبلت (استایل دیجی‌کالا: عکس چسبان + بالا آمدن کارت روی عکس) ===== */
@media (max-width: 992px){
  /* پنهان کردن breadcrumb بالای صفحه محصول در موبایل تا عکس زیر هدر قرار گیرد */
  .page-product .breadcrumb{
    display: none !important;
  }

  .product-hero-section{
    padding: 0 !important;
    background: #ffffff;
    overflow: visible;
  }

  .product-page{
    display: block;
    width: 100%;
    max-width: 100%;
    gap: 0;
    margin: 0;
    padding: 0;
  }

  /* گالری تصویر چسبان (Sticky) مانند دیجی‌کالا */
  .product-gallery-col{
    display: block;
    position: -webkit-sticky;
    position: sticky;
    top: var(--header-h, 55px);
    z-index: 1;
    width: 100%;
    padding: 0;
    margin: 0;
    background: #ffffff;
  }

  .product-gallery{
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    position: relative;
    background: #ffffff;
  }

  .main-image{
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    min-height: auto;
    border-radius: 0;
    background: #ffffff;
    position: relative;
    margin: 0;
    overflow: hidden;
  }

  .main-image > img{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #ffffff;
  }

  .main-image > img.is-model-img,
  .main-image.is-model-image > img{
    object-fit: cover;
    object-position: center top;
  }

  .product-gallery .thumbs{
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    gap: 8px;
    padding: 6px 10px;
    max-width: calc(100% - 24px);
    scroll-padding-inline: 8px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  }

  .product-gallery .thumb-btn img{
    width: 44px;
    height: 44px;
    border-radius: 8px;
  }

  /* کارت اطلاعات محصول که روی عکس اسکرول می‌شود */
  .product-details-col{
    display: block;
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 0;
    margin-top: -16px;
    background: transparent;
  }

  .product-details{
    position: relative;
    z-index: 10;
    background: #ffffff;
    border-radius: 24px 24px 0 0;
    border: 1px solid #e5e7eb;
    border-bottom: none;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
    padding: 20px 16px 24px;
    margin: 0;
  }

  .product-details::before{
    content: '';
    display: block;
    width: 38px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 4px;
    margin: 0 auto 14px auto;
  }

  /* بخش‌های پس از کارت برای ادامه یکپارچه اسکرول روی عکس */
  .product-info-section,
  .similar-products-section,
  .product-reviews-section{
    position: relative;
    z-index: 10;
    background: #ffffff;
  }

  .price-strip{
    white-space: normal;
    flex-wrap: wrap;
  }

  .tabs-nav{
    gap: 18px;
    flex-wrap: wrap;
  }

  .tabs-nav li{
    font-size: 15px;
  }

  .product-tabs-card{
    padding: 18px;
    max-width: 100%;
  }

  .product-features-layout{
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .product-features-list .feature-row{
    grid-template-columns: 1fr;
    gap: 4px;
  }

  #features{
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

  #description{
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  .product-description-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .product-description-image {
    max-width: 100%;
    margin: 0 auto;
    height: 350px;
  }
}

@media (max-width: 640px){
  .product-tabs-card{
    padding: 14px 12px;
  }

  .product-features-list{
    padding: 12px 12px 8px;
  }

  .product-features-measure{
    padding: 10px;
  }

  .measure-image-wrapper{
    aspect-ratio: 16 / 10;
    max-height: 360px;
    height: auto;
  }
}

@media (max-width: 576px) {
  .product-title {
    font-size: 1.4rem;
    margin: 0 !important;
    line-height: 1.05;
  }

  .product-publish-line {
    font-size: 0.75rem;
    margin-top: 2px !important;
    margin-right: 0;
    margin-bottom: 0;
    margin-left: 0;
    padding: 0 !important;
  }

  .product-description-text {
    font-size: 13px;
    line-height: 1.7;
  }
}

/* لینک‌های breadcrumb در حالت عادی (با hover جدید) */
.product-publish-link,
.product-publish-link.is-static {
  display: inline-block;
  margin: 0 2px;
  color: #777;
  text-decoration: none;
  line-height: 1.1;
}

.product-publish-link:hover {
  color: var(--pdp-accent);
  text-decoration: underline;
  text-decoration-color: var(--pdp-accent);
  text-underline-offset: 2px;
}

/* =========================
   Badge Subtitle
========================= */
.product-subtitle-badge {
  display: inline-flex !important;  /* فقط اندازه متن */
  width: auto !important;
  max-width: max-content;
  align-items: center;

  padding: 4px 10px;
  margin-top: 10px;
  margin-bottom: 6px;

  border-radius: 6px;               /* مربع‌تر */
  background-color: #f9e3b5;
  color: #7a4b02;

  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;

  white-space: nowrap;              /* متن کوتاه → یک خط */
}

@media (max-width: 576px) {
  .product-subtitle-badge {
    font-size: 12px;
    padding: 3px 8px;
    margin-top: 8px;
  }
}
/* =========================
   Size row under price (PDP card)
========================= */
.size-row-under-price {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  color: #374151;
}

.size-label-under-price {
  font-weight: 700;
}

.size-value-under-price {
  font-weight: 500;
}

.size-guide-link-under-price {
  margin-right: auto;            /* می‌بردش سمت چپ کارت (در RTL) */
  font-size: 12px;
  font-weight: 700;
  color: var(--pdp-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(164,126,44,0.35);
  padding-bottom: 1px;
  transition: color .12s ease, border-color .12s ease;
}

.size-guide-link-under-price:hover {
  color: #8b691f;
  border-color: rgba(139,105,31,0.7);
}

@media (max-width: 576px) {
  .size-row-under-price {
    font-size: 12px;
    gap: 4px;
  }

  .size-guide-link-under-price {
    font-size: 11px;
  }
}
.nose-pad-feature,
.hinge-feature {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    position: relative;
}

.nose-pad-label,
.hinge-label {
    font-weight: 700 !important;
    color: #111111;
    transition: color 0.15s ease;
}

.nose-pad-feature:hover .nose-pad-label,
.hinge-feature:hover .hinge-label {
    color: var(--pdp-accent);
}

.nose-pad-info {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #cccccc;
    color: #555555;
    font-size: 11px;
    font-weight: bold;
    cursor: help;
    transition: all 0.2s ease;
}

.nose-pad-info:hover {
    background: var(--pdp-accent);
    border-color: var(--pdp-accent);
    color: #ffffff;
    transform: scale(1.1);
}

.nose-pad-icon,
.hinge-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: inline-block;
    transition: transform 0.2s ease;
}

.nose-pad-feature:hover .nose-pad-icon,
.hinge-feature:hover .hinge-icon {
    transform: translateY(-1px);
}

.nose-pad-image-btn {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    border: 1px solid #ccc;
    background: #f7f7f7;
    color: #555;
    font-size: 12px;
    line-height: 16px;
    cursor: pointer;
    padding: 0;
}

.nose-pad-image-btn:hover {
    background: #eee;
}

/* ==========================================================================
   ارتقای صفحه محصول به سبک Eyebuydirect
   ========================================================================== */

/* دکمه تست آنلاین معلق روی گالری تصویر */
.main-image {
  position: relative;
}
.product-gallery__tryon {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  border: 1px solid #ddd;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  z-index: 5;
}
.product-gallery__tryon:hover {
  background: #111;
  color: #fff;
  border-color: #111;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

/* ستاره‌های امتیازدهی زیر عنوان عینک */
.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  margin-bottom: 12px;
  font-size: 13px;
}
.product-rating__stars {
  color: #ddd;
  font-size: 13px;
  letter-spacing: -1px;
}
.product-rating__stars .star.filled {
  color: #ffb800; /* طلایی لوکس */
}
.product-rating__value {
  font-weight: bold;
  color: #222;
}
.product-rating__count {
  color: #6b7280;
}

/* دکمه تست آنلاین بزرگ در سایدبار خرید */
.product-details__tryon {
  display: block;
  width: 100%;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
  margin-bottom: 16px;
  background: #f3f4f6;
  color: #111;
  border: 1px solid #d1d5db;
}
.product-details__tryon:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}


/* دکمه‌های اصلی خرید و انتخاب عدسی */
.select-lens-btn {
  background: var(--pdp-accent);
  color: #fff;
  border: 1px solid var(--pdp-accent);
  transition: all 0.2s ease;
  margin-bottom: 12px;
}
.select-lens-btn:hover {
  background: #8e6b22;
  border-color: #8e6b22;
  transform: translateY(-1px);
}
.buy-frame-only-btn {
  background: #fff;
  color: var(--pdp-accent);
  border: 1px solid var(--pdp-accent);
  margin-bottom: 12px;
  transition: all 0.2s ease;
}
.buy-frame-only-btn:hover {
  background: #FAF6ED;
  transform: translateY(-1px);
}

/* کارت‌های بنر آموزشی پایین صفحه */
.product-educational-section {
  max-width: 1200px;
  margin: 50px auto 20px;
  padding: 0 16px;
  box-sizing: border-box;
}
.product-educational-banners {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.edu-banner-card {
  display: grid;
  grid-template-columns: 1fr 120px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  align-items: center;
  gap: 20px;
  box-sizing: border-box;
}
.edu-banner-card__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
}
.edu-banner-card__tag {
  background: #e5e7eb;
  color: #4b5563;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 12px;
  margin-bottom: 8px;
}
.edu-banner-card h4 {
  font-size: 16px;
  font-weight: bold;
  color: #111;
  margin: 0 0 6px;
  line-height: 1.4;
}
.edu-banner-card p {
  font-size: 12px;
  color: #6b7280;
  margin: 0 0 16px;
  line-height: 1.6;
}
.edu-banner-card__link {
  font-size: 12px;
  font-weight: bold;
  color: #111;
  text-decoration: underline;
  transition: color 0.15s ease;
}
.edu-banner-card__link:hover {
  color: #4b5563;
}
.edu-banner-card__image {
  display: flex;
  align-items: center;
  justify-content: center;
}
.edu-banner-card__image img {
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
}

@media (max-width: 768px) {
  .product-educational-banners {
    grid-template-columns: 1fr;
  }
  .edu-banner-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 20px;
  }
  .edu-banner-card__text {
    align-items: center;
    text-align: center;
  }
  .edu-banner-card__image {
    order: -1;
  }
}

/* مدال پاپ‌آپ تمام‌صفحه (Try-On Modal) */
.tryon-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none; /* پیش‌فرض مخفی */
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.tryon-modal.is-active {
  display: flex;
}
.tryon-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}
.tryon-modal__content {
  position: relative;
  background: #111; /* هماهنگ با تم تاریک هوش مصنوعی ردیاب */
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  width: 100%;
  max-width: 1100px;
  height: 85vh;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  z-index: 2;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
.tryon-modal.is-active .tryon-modal__content {
  transform: scale(1);
}
.tryon-modal__close {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}
.tryon-modal__close:hover {
  background: #ef4444;
  border-color: #ef4444;
}
.tryon-modal__body {
  flex: 1;
  width: 100%;
  height: 100%;
}
.tryon-modal__iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* =====================================================
   Product Page - Smart Review System Styles
   ===================================================== */
.product-reviews-section {
  background: #ffffff;
  border-top: none;
  padding: 4.5rem 0;
  direction: rtl;
}


.product-reviews-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.reviews-section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1f2937;
  margin: 0 0 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.reviews-section-title i {
  color: var(--primary);
}

.reviews-count-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.9rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 700;
}

/* Dashboard summary and distribution */
.reviews-dashboard {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 2rem;
  margin-bottom: 3.5rem;
  background: var(--pdp-tabs-card-bg);
  border: 1px solid var(--pdp-border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

@media (max-width: 768px) {
  .reviews-dashboard {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
}

/* Summary score card */
.reviews-summary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-left: 2rem;
  border-left: 1px solid var(--pdp-border);
}

@media (max-width: 768px) {
  .reviews-summary-card {
    padding-left: 0;
    border-left: none;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--pdp-border);
  }
}

.summary-score-wrapper {
  margin-bottom: 1.25rem;
}

.big-score {
  font-size: 3.8rem;
  font-weight: 900;
  color: #111827;
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
}

.stars-display {
  display: flex;
  gap: 0.2rem;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  justify-content: center;
}

.gold-star {
  color: #ffc107;
  text-shadow: 0 0 6px rgba(255, 193, 7, 0.2);
}

.grey-star {
  color: #e5e7eb;
}

.based-on {
  font-size: 0.8rem;
  color: #9ca3af;
}

.recommendation-badge {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.83rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.recommendation-badge i {
  font-size: 1rem;
}

.review-posting-rules {
  background: #ffffff;
  border: 1px solid var(--pdp-border);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.78rem;
  color: #6b7280;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  text-align: right;
  line-height: 1.4;
}

.review-posting-rules i {
  color: #9ca3af;
  margin-top: 2px;
}

/* Star rating progress bars */
.reviews-stars-progress {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.8rem;
}

.star-progress-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.star-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #4b5563;
  width: 60px;
  text-align: left;
}

.progress-bar-container {
  flex-grow: 1;
  height: 8px;
  background: #f3f4f6;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #fbbf24);
  border-radius: 10px;
  transition: width 0.5s ease-out;
}

.count-label {
  font-size: 0.8rem;
  color: #6b7280;
  width: 90px;
  text-align: right;
  font-weight: 500;
}

/* Reviews List */
.reviews-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.empty-reviews-placeholder {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--pdp-tabs-card-bg);
  border: 1px dashed var(--pdp-border);
  border-radius: 20px;
}

.empty-reviews-placeholder i {
  font-size: 3.5rem;
  color: #9ca3af;
  margin-bottom: 1.25rem;
}

.empty-reviews-placeholder p {
  font-size: 1.1rem;
  font-weight: 700;
  color: #374151;
  margin: 0 0 0.5rem;
}

.empty-reviews-placeholder small {
  color: #9ca3af;
  font-size: 0.88rem;
}

/* Single review card */
.single-review-card {
  background: var(--pdp-tabs-card-bg);
  border: 1px solid var(--pdp-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.015);
  transition: box-shadow 0.2s;
}

.single-review-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.035);
}

.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f9fafb;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.review-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-meta-data {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.user-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
}

.verified-buyer-tag {
  color: #10b981;
  font-size: 0.73rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.review-date-stars {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

@media (max-width: 480px) {
  .review-date-stars {
    align-items: flex-start;
  }
}

.review-date {
  font-size: 0.78rem;
  color: #9ca3af;
}

.review-stars-row {
  display: flex;
  gap: 0.15rem;
  font-size: 1rem;
}

/* Criteria mini ratings */
.review-criteria-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
  color: #4b5563;
  background: #ffffff;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--pdp-border);
}

.criteria-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.gold-star-mini {
  color: #ffc107;
  font-size: 0.85rem;
}

.grey-star-mini {
  color: #e5e7eb;
  font-size: 0.85rem;
}

/* Review Content */
.review-content {
  margin-bottom: 1.5rem;
}

.review-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1f2937;
  margin: 0 0 0.5rem;
}

.review-text {
  font-size: 0.92rem;
  color: #4b5563;
  line-height: 1.7;
  margin: 0;
}

/* Pros and Cons */
.review-pros-cons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.pros-column, .cons-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.col-title {
  font-size: 0.83rem;
  font-weight: 700;
  color: #374151;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.text-green { color: #10b981; }
.text-red { color: #ef4444; }

.tags-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-pro, .tag-con {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  display: inline-block;
}

.tag-pro {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.tag-con {
  background: #fdf2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Image zoom attachment */
.review-attached-media {
  margin-bottom: 1.5rem;
}

.media-thumb-container {
  display: inline-block;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--primary-light);
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.review-media-thumbnail {
  width: 120px;
  height: 120px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.media-zoom-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.68rem;
  padding: 4px;
  text-align: center;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

.media-thumb-container:hover .review-media-thumbnail {
  transform: scale(1.08);
}

.media-thumb-container:hover .media-zoom-overlay {
  opacity: 1;
}

/* Admin Reply Box */
.review-admin-reply-box {
  background: #fdfbf7;
  border: 1px solid #f5ebd0;
  border-right: 4px solid var(--primary);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
}

.reply-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.admin-reply-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary-hover);
  font-size: 0.88rem;
  font-weight: 700;
}

.reply-badge {
  background: #f5f5f7;
  color: #71717a;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.reply-text {
  font-size: 0.88rem;
  color: #4b5563;
  line-height: 1.6;
  margin: 0;
}

/* --- Review Lightbox --- */
.review-lightbox {
  display: none;
  position: fixed;
  z-index: 10000;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.review-lightbox.show {
  display: block;
  opacity: 1;
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 80%;
  max-height: 75vh;
  border-radius: 12px;
  border: 3px solid #fff;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.review-lightbox.show .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 40px;
  right: 40px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

@media only screen and (max-width: 700px){
  .lightbox-content {
    max-width: 95%;
  }
}

/* ==========================================================================
   نوار ویژگی‌های عینک صدف در صفحه محصول (بیمه بینایی، پشتیبانی، گارانتی) — طرح مشابه EyeBuyDirect
   ========================================================================== */
.pdp-features-bar {
  margin-top: 20px;
  background: var(--pdp-tabs-card-bg, #f8fafc);
  border: 1px solid var(--pdp-border, #e2e8f0);
  border-radius: 12px;
  padding: 14px 18px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  direction: rtl;
  box-sizing: border-box;
}

.pdp-feature-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  color: inherit;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
  box-sizing: border-box;
  user-select: none;
}

.pdp-title-desktop {
  display: inline;
}

.pdp-title-mobile {
  display: none;
}

.pdp-feature-item:hover {
  background-color: rgba(197, 146, 57, 0.05);
}

.pdp-feature-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 28px;
  background-color: var(--pdp-border, #e2e8f0);
  pointer-events: none;
}

.pdp-feature-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.pdp-feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--pdp-accent, #c59239);
}

.pdp-feature-icon svg {
  display: block;
  width: 26px;
  height: 26px;
  transition: transform 0.25s ease;
}

.pdp-feature-item:hover .pdp-feature-icon svg {
  transform: scale(1.1);
}

.pdp-feature-content {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
  text-align: right;
  min-width: 0;
}

.pdp-feature-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--pdp-text, #1e293b);
  white-space: nowrap;
  letter-spacing: -0.2px;
}

.pdp-feature-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--pdp-muted, #64748b);
  white-space: nowrap;
}

/* تولتیپ هوشمند راهنما (صرفاً در دسکتاپ با هاور ماوس) */
.pdp-tooltip-box {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translate(-50%, 8px);
  width: 260px;
  background: #1e293b;
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.65;
  padding: 12px 14px;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  z-index: 100;
  direction: rtl;
  text-align: right;
  pointer-events: none;
}

.pdp-tooltip-box strong {
  display: block;
  color: #f59e0b;
  margin-bottom: 4px;
  font-size: 12.5px;
}

.pdp-tooltip-link {
  display: inline-block;
  margin-top: 6px;
  color: #38bdf8;
  font-weight: 700;
  font-size: 11.5px;
  text-decoration: none;
}

.pdp-tooltip-link:hover {
  text-decoration: underline;
}

.pdp-tooltip-box::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: #1e293b transparent transparent transparent;
}

@media (hover: hover) {
  .pdp-feature-item:hover .pdp-tooltip-box {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
  }
}

/* واکنش‌گرایی در نمایش تبلت و موبایل (حفظ ۳ ستون افقی شیک و جاگیری عالی متن‌ها) */
@media (max-width: 768px) {
  .pdp-title-desktop {
    display: none;
  }

  .pdp-title-mobile {
    display: inline;
  }

  .pdp-features-bar {
    padding: 10px 4px;
    margin-top: 16px;
    gap: 2px;
    border-radius: 10px;
  }

  .pdp-feature-item {
    padding: 4px 4px;
  }

  .pdp-feature-inner {
    gap: 5px;
  }

  .pdp-feature-icon svg {
    width: 21px;
    height: 21px;
  }

  .pdp-feature-title {
    font-size: 11.5px;
  }

  .pdp-feature-sub {
    font-size: 9.5px;
  }

  .pdp-feature-item:not(:last-child)::after {
    height: 22px;
  }

  .pdp-tooltip-box {
    display: none !important;
  }
}

/* نمایشگرهای موبایل بسیار کوچک (زیر ۳۶۰ پیکسل) */
@media (max-width: 380px) {
  .pdp-features-bar {
    padding: 8px 2px;
    gap: 1px;
  }

  .pdp-feature-item {
    padding: 3px 2px;
  }

  .pdp-feature-inner {
    gap: 3px;
  }

  .pdp-feature-icon svg {
    width: 18px;
    height: 18px;
  }

  .pdp-feature-title {
    font-size: 10px;
  }

  .pdp-feature-sub {
    font-size: 8.5px;
  }
}

/* ==========================================================================
   بخش فریم‌های مشابه (Similar Products Section)
   ========================================================================== */
.similar-products-section {
  margin-top: 0px;
  padding: 0 0 16px 0;
  border-top: none;
  direction: rtl;
  overflow: hidden;
}


.similar-products-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.similar-products-header {
  margin-bottom: 16px;
  text-align: center;
}

.similar-products-title {
  font-family: 'Vazirmatn', 'Yekan Bakh', sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: var(--pdp-text);
  margin: 0 0 6px 0;
  position: relative;
  display: inline-block;
  letter-spacing: -0.5px;
  text-shadow: 0.3px 0.3px 0px #111;
  -webkit-text-stroke: 0.3px #111;
}


.similar-products-title::after {
  display: none;
}


.similar-products-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.similar-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.similar-product-card-wrap {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  padding: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.similar-product-card-wrap:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.similar-product-card-wrap .product-card__image {
  border-radius: 8px;
  overflow: hidden;
}

.similar-products-empty {
  text-align: center;
  font-size: 15px;
  color: #64748b;
  padding: 40px 0;
}

/* واکنش‌گرایی برای موبایل و تبلت (Horizontal Swipe) */
@media (max-width: 992px) {
  .similar-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .similar-products-section {
    margin-top: 32px;
    padding: 24px 0;
  }
  
  .similar-products-title {
    font-size: 18px;
  }

  .similar-products-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding: 4px 16px 20px 16px;
    margin: 0 -16px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
  }

  .similar-products-grid::-webkit-scrollbar {
    display: none; /* WebKit */
  }

  .similar-product-card-wrap {
    flex: 0 0 260px;
    scroll-snap-align: start;
  }
}

/* ==========================================================================
   Payment Promo Box & Rows (اسنپ‌پی و کش‌بک)
   ========================================================================== */
.product-payment-promo-box {
  margin-top: 15px;
  margin-bottom: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.pdp-promo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  text-align: right;
  gap: 12px;
  flex-wrap: wrap;
}

.pdp-promo-row.snap-row {
  border-bottom: 1px solid #f1f5f9;
  background: rgba(0, 128, 128, 0.03);
}

.pdp-promo-row.cashback-row {
  background: rgba(217, 119, 6, 0.03);
}

@media (max-width: 480px) {
  .pdp-promo-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .pdp-promo-row strong {
    align-self: flex-end;
    margin-top: 2px;
  }
}

/* =========================
   Out of Stock Product PDP Styles
========================= */
.out-of-stock-hero-banner {
  background: #fff8f8;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 16px 0;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.05);
}

.out-of-stock-badge-large {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #dc2626;
  font-weight: 700;
  font-size: 15px;
}

.out-of-stock-badge-large i {
  font-size: 18px;
}

.out-of-stock-desc {
  margin: 8px 0 0 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
}

/* سواچ ناموجود در صفحه محصول */
.product-colors .swatch-dot.is-out-of-stock {
  opacity: 0.45;
  position: relative;
}

.product-colors .swatch-dot.is-out-of-stock::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -20%;
  width: 140%;
  height: 2px;
  background-color: #dc2626;
  transform: translateY(-50%) rotate(-45deg);
  z-index: 10;
  pointer-events: none;
}

.color-out-of-stock-notice {
  font-size: 12.5px;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 8px;
  display: none;
}

.color-out-of-stock-notice.is-visible {
  display: block;
}

/* =========================================================
   باکس یکپارچه قیمت و تخفیف ساعتی در PDP (طراحی جمع و جور)
   ========================================================= */
.price-strip.has-hourly-deal {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #31103f 100%);
  border: 1px solid rgba(244, 63, 94, 0.4);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 6px 20px -5px rgba(15, 23, 42, 0.3);
  color: #ffffff;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.price-strip.has-hourly-deal::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.12) 0%, rgba(0, 0, 0, 0) 65%);
  pointer-events: none;
}

.hourly-deal-integrated-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.hourly-deal-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
}

.hourly-deal-tag i {
  color: #f43f5e;
  font-size: 12px;
}

.hourly-deal-integrated-timer {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 2px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  direction: ltr;
}

.hourly-deal-integrated-timer i {
  color: #fb7185;
}

.price-values-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.price-main-block {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-strip.has-hourly-deal .current-price {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.price-strip.has-hourly-deal .compare-price {
  font-size: 12.5px;
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 600;
}

.hourly-deal-save-badge {
  background: #10b981;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: auto;
}

/* =========================================================
   نوار چسبیده سفارش در موبایل (Mobile Sticky Bottom Bar)
   همیشه چسبیده به پایین صفحه در نسخه موبایل همراه با قیمت
   ========================================================= */
.pdp-sticky-bottom-bar {
  display: none !important;
}

@media (max-width: 768px) {
  .product-detail-page {
    padding-bottom: 80px;
  }

  .pdp-sticky-bottom-bar {
    display: block !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9995;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.09);
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    padding: 10px 14px;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
    box-sizing: border-box;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .pdp-sticky-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 540px;
    margin: 0 auto;
    width: 100%;
  }

  .pdp-sticky-bar__price-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    flex-shrink: 0;
  }

  .pdp-sticky-bar__current-price {
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.25;
    white-space: nowrap;
    letter-spacing: -0.3px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
  }

  .pdp-sticky-bar__compare-price {
    font-size: 11.5px;
    color: #94a3b8;
    text-decoration: line-through;
    line-height: 1.2;
    margin-top: 2px;
    white-space: nowrap;
  }

  .pdp-sticky-bar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
  }

  .pdp-sticky-fav-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    flex: 0 0 44px;
    box-sizing: border-box;
  }

  .pdp-sticky-fav-btn:hover {
    background: #f1f5f9;
    color: #e11d48;
    border-color: #cbd5e1;
    transform: scale(1.04);
  }

  .pdp-sticky-fav-btn.is-active {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #e11d48;
  }

  .pdp-sticky-fav-btn.is-active i {
    color: #e11d48;
  }

  .pdp-sticky-lens-btn {
    height: 44px;
    flex: 1;
    max-width: 230px;
    background: linear-gradient(135deg, #b88e36 0%, #a47e2c 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(164, 126, 44, 0.35);
    transition: transform 0.15s ease, filter 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
  }

  .pdp-sticky-lens-btn:active {
    transform: scale(0.97);
  }

  .pdp-sticky-lens-btn i {
    font-size: 12px;
    transition: transform 0.2s ease;
  }

  .pdp-sticky-lens-btn:hover i {
    transform: translateX(-3px);
  }

  .pdp-sticky-lens-btn.is-out-of-stock,
  .pdp-sticky-lens-btn:disabled {
    background: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.85;
  }

  /* جابجایی آیکون چت هوشمند در موبایل */
  .sadaf-ai-toggle-btn {
    bottom: 84px !important;
  }
}

@media (max-width: 420px) {
  .pdp-sticky-bottom-bar {
    padding: 8px 10px;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
  }

  .pdp-sticky-bar__current-price {
    font-size: 14.5px;
  }

  .pdp-sticky-bar__compare-price {
    font-size: 11px;
  }

  .pdp-sticky-fav-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 17px;
    border-radius: 10px;
  }

  .pdp-sticky-lens-btn {
    height: 40px;
    font-size: 13px;
    padding: 0 12px;
    gap: 6px;
    border-radius: 10px;
  }
}






