/* ============================================ */
/* قوانین Global - دسکتاپ + موبایل              */
/* ============================================ */

/* حذف برچسب "بدون مالیات" */
.tax-shipping-delivery-label {
  display: none !important;
}

/* اسم محصول - تایپوگرافی مدرن با Letter-spacing منفی (سبک اپل) */
.rtl h1.product-detail-name,
h1.product-detail-name {
  font-size: 26px !important;
  line-height: 1.4 !important;
  font-weight: 800 !important;
  color: #111827 !important; /* رنگ مشکی ملایم‌تر و لوکس‌تر */
  letter-spacing: -0.02em !important;
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
}

/* توضیحات کوتاه - کنتراست بهتر و خوانایی بالا */
.description-short h2,
.description-short {
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.7 !important;
  color: #4b5563 !important; /* خاکستری استاندارد مینیمال */
  margin: 4px 0 16px 0 !important;
}

/* استایل شاخه‌ها (Pills) - حذف کادر بیرونی برای ظاهر کلین‌تر */
.rtl .productcats,
.productcats {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 16px 0 !important;
  padding: 0 !important; /* حذف پدینگ اضافی */
  border: none !important; /* حذف بوردر کادر اصلی */
  background-color: transparent !important;
}

.rtl .productcats .label,
.productcats .label {
  font-size: 13px !important;
  color: #6b7280 !important;
  margin: 0 !important;
  white-space: nowrap !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important; /* حس پرمیوم برای لیبل‌ها */
}

.rtl .productcats ul,
.productcats ul {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.rtl .productcats ul li,
.productcats ul li {
  display: inline-block !important;
  margin: 0 !important;
}

/* چیپ‌های دسته‌بندی - نرم، مینیمال با افکت شناور */
.rtl .productcats ul li a,
.productcats ul li a {
  display: inline-block !important;
  padding: 6px 18px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 999px !important; /* Pill shape کامل */
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #374151 !important;
  background-color: #ffffff !important;
  text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.rtl .productcats ul li a:hover,
.productcats ul li a:hover {
  background-color: #6b21e8 !important;
  border-color: #6b21e8 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 10px rgba(107, 33, 232, 0.2) !important;
}

/* ============================================ */
/* قوانین مخصوص موبایل                          */
/* ============================================ */
@media (max-width: 767px) {

  /* اسم محصول - سایز مناسب موبایل */
  .rtl h1.product-detail-name,
  h1.product-detail-name {
    font-size: 22px !important;
    line-height: 1.4 !important;
  }

  /* کل بخش تعداد + دکمه سبد خرید */
  .rtl .product-quantity.clearfix,
  .product-quantity.clearfix {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important; /* فاصله بیشتر برای تاچ بهتر */
    width: 100% !important;
    margin: 24px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .rtl .product-quantity .add,
  .rtl .product-quantity .qty,
  .product-quantity .add,
  .product-quantity .qty {
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .product-quantity .input-group.bootstrap-touchspin {
    box-sizing: border-box !important;
    width: 100% !important;
    margin: 0 !important;
    display: flex !important;
  }

  #quantity_wanted {
    flex: 1 !important;
    box-sizing: border-box !important;
    text-align: center !important;
    height: 50px !important; /* ارتفاع بیشتر برای موبایل */
    font-size: 16px !important;
    border-radius: 12px !important;
    border: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
    font-weight: 600 !important;
  }

  .product-quantity .add-to-cart {
    box-sizing: border-box !important;
    width: 100% !important;
    margin: 0 !important;
    height: 54px !important; /* دکمه بزرگتر و ارگونومیک‌تر */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    font-size: 16px !important;
    border-radius: 14px !important;
  }

  /* بلاک کاستوم "هر محصول منحصربه‌فرد" در موبایل */
  div[style*="#faf9f6"] {
    padding: 20px !important;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important; /* پس‌زمینه نرم‌تر */
    border-radius: 20px !important; /* گوشه‌های گردتر */
    border: 1px solid #e2e8f0 !important;
  }

  div[style*="#faf9f6"] > h3 {
    margin-bottom: 16px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    letter-spacing: -0.01em !important;
  }

  div[style*="rgba(0,0,0,0.04)"] {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 14px !important;
    margin-bottom: 12px !important;
    background: #ffffff !important; /* کارت‌های داخلی سفید */
    border-radius: 14px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02) !important; /* سایه لایه‌ای ملایم */
  }

  div[style*="rgba(0,0,0,0.04)"] > div[style*="border-radius:50%"] {
    width: 40px !important; /* کمی بزرگتر برای تاکید بصری */
    height: 40px !important;
    order: 1 !important;
    background-color: #f3e8ff !important; /* پس‌زمینه آیکون متناسب با رنگ برند */
  }

  div[style*="line-height:1.9"] {
    display: contents !important;
  }

  div[style*="rgba(0,0,0,0.04)"] strong {
    order: 2 !important;
    flex: 1 1 auto !important;
    margin-bottom: 0 !important;
    font-size: 15px !important;
    color: #0f172a !important;
  }

  div[style*="rgba(0,0,0,0.04)"] span {
    order: 3 !important;
    flex: 1 1 100% !important;
    font-size: 13px !important;
    color: #64748b !important;
    line-height: 1.6 !important;
  }
}

/* ============================================ */
/* دسکتاپ - بازطراحی کلی صفحه محصول             */
/* ============================================ */

@media (min-width: 768px) {

  .col-form_id-form_15874367062488778 {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important; /* فضای تنفس (White space) بیشتر */
    padding-right: 48px !important; /* فاصله بیشتر از عکس */
    box-sizing: border-box !important;
  }

  .col-form_id-form_15874367062488778 > .line {
    display: contents !important;
  }

  h1.product-detail-name {
    order: 1 !important;
  }

  .product-prices {
    order: 2 !important;
  }

  .productcats {
    order: 3 !important;
  }

  .product-actions {
    order: 4 !important;
  }

  .description-short {
    order: 5 !important;
  }

  .product-additional-info {
    order: 6 !important;
  }

  /* گالری تصاویر - مینیمال و اپل استایل */
  .images-container {
    max-width: 500px !important; /* کمی بزرگتر برای نمایش بهتر دیتیل */
    margin: 0 auto !important;
  }

  .product-cover {
    border: 1px solid #f3f4f6 !important;
    border-radius: 24px !important; /* گوشه‌های بسیار نرم */
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02) !important; /* سایه عمیق اما محو */
    background: #ffffff !important;
    transition: transform 0.4s ease !important;
  }

  .product-cover:hover {
    transform: scale(1.01) !important; /* افکت ظریف زوم روی کل عکس */
  }

  .product-cover img#zoom_product {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  #thumb-gallery.product-thumb-images {
    margin-top: 20px !important; /* فضای بیشتر بین عکس و تامنیل */
  }

  .thumb-container {
    padding: 6px !important;
  }

  /* تامنیل‌ها - افکت محوشدگی و رینگ برای حالت انتخاب شده */
  .thumb-container a {
    display: block !important;
    border: none !important; /* حذف بوردر سخت */
    border-radius: 12px !important;
    overflow: hidden !important;
    opacity: 0.6 !important; /* نیمه‌شفاف در حالت عادی */
    box-shadow: 0 0 0 1px #e5e7eb !important; /* یک خط بسیار نازک جایگزین بوردر */
    transition: all 0.3s ease !important;
    background: #fff !important;
  }

  .thumb-container a:hover {
    opacity: 1 !important;
    box-shadow: 0 0 0 1px #d1d5db, 0 4px 10px rgba(0,0,0,0.05) !important;
    transform: translateY(-2px) !important;
  }

  .thumb-container.active a,
  .thumb-container .thumb.selected {
    opacity: 1 !important;
    box-shadow: 0 0 0 2px #6b21e8 !important; /* رینگ (Ring) به جای بوردر - سبک مدرن */
    transform: scale(1.02) !important;
  }

  .thumb-container img.thumb {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 10px !important; /* گردی هماهنگ با قاب بیرونی */
  }

  /* کارت قیمت - شبیه به کامپوننت‌های Stripe */
  .product-prices {
    background: linear-gradient(145deg, #fcfaff 0%, #ffffff 100%) !important;
    border: 1px solid #f0e6ff !important;
    border-radius: 16px !important;
    padding: 20px 24px !important;
    margin: 8px 0 !important;
    box-shadow: 0 4px 15px rgba(107, 33, 232, 0.03) !important;
    display: inline-block !important; /* جمع شدن کارت دور محتوا */
    min-width: 250px !important;
  }

  .current-price-value {
    color: #6b21e8 !important;
    font-size: 28px !important; /* بزرگتر و جذاب‌تر */
    font-weight: 800 !important;
    letter-spacing: -0.03em !important; /* اعداد با فاصله منفی زیباتر می‌شوند */
  }

  /* دکمه سبد خرید - گرادیانت ملایم و افکت کلیک/هاور حرفه‌ای */
  .product-quantity .add-to-cart {
    border-radius: 14px !important;
    background: linear-gradient(135deg, #7c3aed 0%, #6b21e8 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 14px rgba(107, 33, 232, 0.25), inset 0 1px 0 rgba(255,255,255,0.15) !important; /* سایه داخلی برای حجم‌دهی */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 0 32px !important;
    height: 54px !important;
  }

  .product-quantity .add-to-cart:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(107, 33, 232, 0.35), inset 0 1px 0 rgba(255,255,255,0.2) !important;
  }

  .product-quantity .add-to-cart:active {
    transform: translateY(0) !important; /* افکت کلیک واقعی */
    box-shadow: 0 2px 8px rgba(107, 33, 232, 0.25) !important;
  }
}

/* ============================================ */
/* دراپ‌داون سبد خرید (هدر) - بازطراحی مدرن       */
/* ============================================ */

/* کادر اصلی دراپ‌داون - حذف بوردر سخت، گردی و سایه ملایم */
.leo-dropdown-cart-content {
  border: none !important;
  border-radius: 20px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 2px 10px rgba(0, 0, 0, 0.04) !important;
  overflow: hidden !important;
}

/* هر ردیف محصول داخل دراپ‌داون */
.leo-dropdown-cart-item {
  border-bottom: 1px solid #f1f1f4 !important;
  padding: 14px 16px !important;
  transition: background-color 0.2s ease !important;
}

.leo-dropdown-cart-item.last {
  border-bottom: none !important;
}

.leo-dropdown-cart-item.high-light,
.leo-dropdown-cart-item.show-combination,
.leo-dropdown-cart-item.show-customization,
.leo-dropdown-cart-item.show-additional {
  background-color: #f3e8ff !important;
}

/* عکس کوچک محصول - گوشه‌های گرد */
.leo-cart-item-img img {
  border-radius: 12px !important;
  overflow: hidden !important;
}

/* قیمت با رنگ برند */
.leo-cart-item-info .current-price .price {
  color: #6b21e8 !important;
}

/* دکمه‌های تعداد (+/-) داخل دراپ‌داون - گردتر و مدرن‌تر */
.leo-cart-item-info .product-quantity .leo-bt-product-quantity {
  border-radius: 8px !important;
  border-color: #e5e7eb !important;
}

.leo-cart-item-info .product-quantity .leo-input-product-quantity {
  border-radius: 8px !important;
  border-color: #e5e7eb !important;
}

/* بخش ریز کل / ارسال / مجموع */
.leo-dropdown-cart-subtotals {
  background: #fafafa !important;
  border-top: 1px solid #f1f1f4 !important;
  border-bottom: 1px solid #f1f1f4 !important;
  padding: 14px 16px !important;
}

.leo-dropdown-cart-subtotals .value {
  color: #6b21e8 !important;
  font-weight: 700 !important;
}

/* دکمه‌های تسویه حساب / مشاهده سبد خرید - Pill شکل */
.leo-cart-dropdown-action {
  padding: 16px !important;
  display: flex !important;
  gap: 10px !important;
}

.leo-cart-dropdown-action .cart-dropdow-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 1 1 0 !important;
  border-radius: 999px !important;
  padding: 12px 16px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

.leo-cart-dropdown-action .cart-dropdow-button:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(107, 33, 232, 0.25) !important;
}