:root {
  --tansa-navy: #0f172a;
  --tansa-copper: #b87333;
  --tansa-bg: #fdfdfd;
}

body {
  background-color: var(--tansa-bg);
  color: var(--tansa-navy);
  overflow-x: hidden;
  scroll-behavior: smooth;
}
/* بخش ویژگی‌های بالای صفحه (فریز شده) */
/* استایل پایه برای سواتچ‌های غیرفعال (ناموجود در انبار) */
/* وضعیت انتخاب شده (Active) برای دایره رنگ */
.swatch-circle.active {
    border-color: #3b82f6; /* رنگ حاشیه دکمه انتخاب شده */
    transform: scale(1.15);
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #3b82f6;
}

/* وضعیت انتخاب شده (Active) برای باکس سایز */
.size-box.active {
    border-color: #1e293b;
    background-color: #1e293b;
    color: #ffffff;
}

/* وضعیت ناموجود (Disabled) با علامت ضربدر */
.swatch-circle.out-of-stock,
.size-box.out-of-stock {
    opacity: 0.4;
    cursor: not-allowed;
    position: relative;
    pointer-events: none; /* جلوگیری از کلیک روی ناموجودها */
}

/* کشیدن خط ضربدر قرمز روی گزینه های ناموجود */
.swatch-circle.out-of-stock::before,
.size-box.out-of-stock::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ef4444; /* رنگ قرمز Tailwind */
    transform: translateY(-50%) rotate(-45deg);
    z-index: 10;
}

.swatch-circle.out-of-stock::after,
.size-box.out-of-stock::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ef4444;
    transform: translateY(-50%) rotate(45deg);
    z-index: 10;
}
.reset_variations{
  display: none;
}
table.variations th.label{
  padding: 16px;
}
.woocommerce-variation-availability{
  display: none;
}
.single_variation_wrap .quantity {
  margin: 12px;
}
/* استایل تولتیپ سفارشی */
.custom-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background-color: #1f2937;
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 50;
    pointer-events: none;
}

.custom-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 4px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

/* نمایش تولتیپ هنگام هاور */
.swatch-circle:hover .custom-tooltip,
.size-box:hover .custom-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-12px);
}

/* انیمیشن نرم برای تغییر عکس محصول */
.woocommerce-product-gallery__image img {
    transition: opacity 0.4s ease-in-out;
}
.image-fading-out {
    opacity: 0.3;
}
/********************************************/
.feature-item {
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
  text-align: center;
}

.swatch-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: 0.2s;
}
.swatch-circle.active {
  border-color: var(--tansa-copper);
  box-shadow:
    0 0 0 2px white,
    0 0 0 4px var(--tansa-copper);
}
.size-box {
  min-width: 42px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.size-box.active {
  background: var(--tansa-navy);
  color: white;
  border-color: var(--tansa-navy);
}

.btn-main-purchase {
  background: var(--tansa-copper);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 800;
  transition: all 0.3s;
}

/* Modal Style */
#shareModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

#shareModal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }

  25% {
    transform: scale(1.2);
  }

  50% {
    transform: scale(1);
  }

  75% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}
.modal-content {
  background: white;
  border-radius: 24px;
  width: 100%;
  max-width: 500px;
  position: relative;
  padding: 30px;
  animation: modalSlideUp 0.3s ease-out;
}
@keyframes modalSlideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.close-modal {
  position: absolute;
  top: 15px;
  left: 15px;
  cursor: pointer;
  font-size: 1.6rem;
  color: #94a3b8;
}
/* جدول سایز بندی */
.size-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.size-table th {
  background: #f1f5f9;
  padding: 12px;
  font-size: 0.75rem;
  color: #64748b;
}
.size-table td {
  padding: 12px;
  text-align: center;
  border-top: 1px solid #e2e8f0;
  font-weight: 700;
  font-size: 0.9rem;
}
/* --- استایل جدید: گرید مشخصات فنی --- */
.spec-grid-item {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-right: 3px solid var(--tansa-copper);
  transition: all 0.2s;
}
.spec-grid-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

/* استایل جامع برای تمام مودال‌های تانسا */
.tansa-modal {
    display: none; 
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 9999; 
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tansa-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.tansa-modal .modal-content {
    background: white;
    border-radius: 24px;
    width: 100%;
    position: relative;
    padding: 30px;
    max-height: 90vh; 
    overflow-y: auto; 
    animation: modalSlideUp 0.3s ease-out;
}

/* ========================================================
           استایل‌های بخش FAQ (دقیقاً مشابه فایل FAQ.html)
           ======================================================== */
.faq-item {
  border: 1.5px solid #e5e7eb;
  border-radius: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  background-color: transparent;
}
.faq-item.active {
  background-color: white;
  box-shadow: 0 15px 30px -10px rgba(45, 62, 94, 0.08);
  border-color: #d4a373;
}
.faq-question {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #2d3e5e;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-item.active .faq-answer {
  max-height: 1000px; /* فضای کافی برای متن‌های طولانی */
}
.faq-answer-inner {
  padding: 0 1.5rem 1.5rem 1.5rem;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.8;
  text-align: justify;
}
.faq-icon-box {
  width: 32px;
  height: 32px;
  background-color: #f3f4f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #2d3e5e;
}
.faq-item.active .faq-icon-box {
  background-color: #d4a373;
  color: white;
  transform: rotate(0deg);
}
.bi-chevron-down {
  transition: transform 0.3s;
  font-size: 0.8rem;
  color: var(--tansa-copper);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 900;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: "";
  width: 4px;
  height: 24px;
  background: var(--tansa-copper);
  border-radius: 10px;
}

.size-table-main {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.size-table-main th {
  background: #f1f5f9;
  padding: 12px;
  font-size: 0.75rem;
  color: #64748b;
}
.size-table-main td {
  padding: 12px;
  text-align: center;
  border-top: 1px solid #e2e8f0;
  font-weight: 700;
  font-size: 0.9rem;
}

/* ========================================================
           استایل‌های بخش اسلایدر محصولات مرتبط
           ======================================================== */
/* هدر ثابت */
.slider-header {
  position: relative;
  padding-bottom: 2rem;
  border-bottom: 2px solid #2d3e5e;
  margin-bottom: 3rem;
}

.header-title-main {
  font-size: 4rem;
  line-height: 1;
  color: rgba(45, 62, 94, 0.05);
  position: absolute;
  top: -10px;
  right: 0;
  white-space: nowrap;
  font-weight: 900;
  z-index: 0;
}
/* ایزوله کردن استایل‌های ووکامرس در اسلایدر اختصاصی شما */
#relatedProductsSwiper .swiper-slide {
    width: auto; /* اجازه به جاوااسکریپت برای محاسبه عرض بر اساس slidesPerView */
}

#relatedProductsSwiper ul.products::before,
#relatedProductsSwiper ul.products::after {
    display: none !important; /* حذف فلکس‌باکس پیش‌فرض ووکامرس */
}

#relatedProductsSwiper .product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
}
/* کارت محصول و ترنزیشن هاور */
.product-card {
  display: flex;
  flex-direction: column;
  width: 320px;
  background: white;
  border-radius: 1.5rem;
  padding: 12px;
  border: 1px solid #f1f5f9;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
  transform: translateY(-8px);
}

.img-container {
  position: relative;
  width: 100%;
  height: 280px;
  margin-bottom: 8px;
  overflow: hidden;
}

/* دکمه قلب (علاقمندی) */
.wishlist-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 35px;
  height: 35px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2d3e5e;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  opacity: 0.7;
}
.wishlist-btn:hover {
  opacity: 1;
  background: #fff;
  color: #e11d48;
  transform: scale(1.1);
}
.wishlist-btn.active {
  color: #e11d48;
}

.title-section {
  height: 42px;
  margin-bottom: 2px;
}
.price-section {
  height: 30px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.variable-section {
  height: 45px;
}

/* آیکون‌های مسی سئو شده */
.seo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #eee;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #4b5563;
  font-weight: 700;
}

.feature-icon {
  color: #d4a373;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ناوبری جانبی */
.nav-container {
  position: absolute;
  top: 50%;
  left: -20px;
  right: -20px;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 20;
}

.custom-nav-btn {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(45, 62, 94, 0.1);
  color: #2d3e5e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.custom-nav-btn:hover {
  background: #2d3e5e;
  color: white;
  transform: scale(1.1);
}

.mini-badge {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 4px;
}

.more-colors-text {
  font-size: 10px;
  color: #94a3b8;
  font-weight: bold;
  margin-right: 4px;
}

/* ========================================================
           استایل‌های بخش آمار و کامنت 
           ======================================================== */

/* استایل اختصاصی برای اسلایدر رنج نظرسنجی */
.tansa-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: #d4a373;
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: 0 4px 10px rgba(212, 163, 115, 0.3);
  cursor: pointer;
  transition: transform 0.2s;
}

.tansa-range::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.tansa-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: #d4a373;
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: 0 4px 10px rgba(212, 163, 115, 0.3);
  cursor: pointer;
  transition: transform 0.2s;
}

.tansa-range::-moz-range-thumb:hover {
  transform: scale(1.1);
}

/* انیمیشن برای مودال و توست */
@keyframes modalSlideUp {
  from {
    transform: translateY(30px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-animate {
  animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* انیمیشن اعداد */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-stats {
  animation: countUp 0.8s ease-out forwards;
}
