/* === استایل صفحه محصول (مدرن، مطابق صفحه لیست) === */

.product-page {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 14px rgba(0,0,0,0.05);
    padding: 20px;
    margin-top: 20px;
    color: #111827;
  }
  
  /* grid */
  .product-grid-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
  }
  
  /* گالری */
  .product-gallery {
    flex: 1 1 50%;
    min-width: 300px;
  }
  .main-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: zoom-in;
  }
  .main-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    transition: transform 0.3s;
  }
  
  /* thumbs scroll */
  .thumbs-wrapper {
    margin-top: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding-bottom: 6px;
  }
  .thumbs-scroll {
    display: inline-flex;
    gap: 8px;
  }
  .thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s ease;
    object-fit: cover;
  }
  .thumb:hover { border-color: #0d6efd; }
  .thumb.active { border-color: #0d6efd; }
  
  /* اسکرول استایل */
  .thumbs-wrapper::-webkit-scrollbar { height: 6px; }
  .thumbs-wrapper::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
  .thumbs-wrapper::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
  
  /* Lightbox */
  .lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    text-align: center;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
  }
  .lightbox-overlay img {
    max-width: 95%;
    max-height: 95%;
    border-radius: 12px;
    box-shadow: 0 6px 30px rgba(0,0,0,0.6);
    cursor: zoom-out;
  }
  
  /* اطلاعات محصول */
  .product-info {
    flex: 1 1 45%;
    min-width: 260px;
  }
  .product-info .title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    margin-top: 0px;
    
  }
  .meta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    color: #6b7280;
  }
  .short-desc {
    color: #6b7280;
    margin-bottom: 14px;
    line-height: 1.6;
  }
  
  /* قیمت */
  .price-box {
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
    align-items: baseline;
  }
  .old-price { color: #9ca3af; text-decoration: line-through; font-size: 14px; }
  .new-price { color: #0d6efd; font-weight: 800; font-size: 20px; }
  
  /* دکمه‌ها */
  .actions {
    display: block;
    gap: 10px;
    margin-top: 12px;
  }
  .actions .text-info{
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
    align-items: baseline;
    color: #31708f;
    font-size: 20px;
    font-weight: bold;
  }
  .actions .discount{
    color: red;
    text-decoration: line-through;
  }
  .btn-plain {
    border-radius: 8px;
    padding: 8px 14px;
  }
  .reviews{
    color: #fbbf24;
      font-size: 14px !important;
      margin-bottom: 10px;
  }
  .rate-widget{
    display: inline-block !important;
  }
  .rating-container .empty-stars {
    color: #ccc !important;
}
.rating-container .filled-stars {

  -webkit-text-stroke: 1px #ffe400 !important;
  text-shadow: 1px 1px #ffe400 !important;
}
.rating-container .star {
  font-size: 16px !important;
  line-height: 1;
}
.rates-number ,.visit-counter{
  font-size: 13px;
}
  /* تب‌ها و بخش توضیحات */
  .product-tabs { margin-top: 26px; }
  .product-tabs .nav-tabs { border-bottom: 1px solid #e5e7eb; }
  .product-tabs .nav-tabs > li > a { color: #374151; font-weight: 500; }
  .product-tabs .nav-tabs > li.active > a { color: #0d6efd !important; border-color: #0d6efd transparent transparent transparent; }
  .product-tabs .tab-content { padding: 14px 0; color: #4b5563; line-height: 1.8; }
  
  /* ریسپانسیو */
  @media (max-width: 992px) {
    .product-grid-row { flex-direction: column; }
    .thumbs-scroll { justify-content: flex-start; }
    .product-gallery, .product-info { min-width: 100%; }
  }
  
  /* === استایل دسته‌بندی‌های مرتبط === */
.related-categories {
  margin-top: 20px;
}
.related-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #374151;
}
.related-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.related-badge {
  display: inline-block;
  background: #f1f5f9;
  color: #0d6efd;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.related-badge:hover {
  background: #0d6efd;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}


.specs-table {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 20px;
  overflow: hidden;
  font-family: "IRANSans", sans-serif;
  direction: rtl;
}

.specs-title {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 15px;
  border-bottom: 2px solid #0d6efd;
  display: inline-block;
  padding-bottom: 4px;
}

.specs-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  padding: 10px 0;
  transition: background 0.2s ease;
}

.specs-row:last-child {
  border-bottom: none;
}

.specs-row:hover {
  background-color: #f9fafb;
}

.spec-key {
  flex: 0 0 35%;
  color: #6b7280;
  font-weight: 500;
  font-size: 14px;
}

.spec-value {
  flex: 1;
  color: #111827;
  font-size: 14px;
  font-weight: 400;
}

@media (max-width: 768px) {
  .specs-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .spec-key {
    color: #374151;
    font-weight: 600;
  }
  .spec-value {
    width: 100%;
    padding-right: 10px;
  }
}



.variant-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  direction: rtl;
  font-family: "IRANSans", sans-serif;
}

.variant-item {
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: all 0.25s ease;
  overflow: hidden;
}

.variant-item:hover {
  border-color: #0d6efd;
  box-shadow: 0 2px 8px rgba(13,110,253,0.1);
}

.variant-item input[type="radio"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: -1;
}

.variant-item input[type="radio"]:checked + .variant-content {
  border-right: 3px solid #0d6efd;
  background: #f8faff;
}

.variant-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
}

.variant-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.variant-title {
  font-size: 15px;
  font-weight: 500;
  color: #1e293b;
}

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

.old-price {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 13px;
}

.new-price {
  color: #111827;
  font-weight: 600;
  font-size: 14px;
}

.discount-badge {
  background: #ef4444;
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  padding: 2px 6px;
  font-weight: 600;
}

.variant-detail {
  font-size: 13px;
  color: #0d6efd;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 3px;
}

.variant-detail:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .variant-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

.add-to-cart-btn {
  background: #0d6efd;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.add-to-cart-btn:hover {
  background: #0b5ed7;
  box-shadow: 0 2px 6px rgba(13, 110, 253, 0.2);
}

.variant-item input[type="radio"]:checked + .variant-content .add-to-cart-btn {
  background: #1453d1;
}



/* 🛒 سبک کلی جدول سبد خرید */
#cartWrapper .table {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  margin-top: 15px;
  font-size: 13px;
}

/* 🧾 ردیف‌های جدول */
#cartWrapper .table > thead > tr {
  background-color: #f9fafb;
  color: #374151;
  font-weight: 600;
  text-align: center;
}
#cartWrapper .table > thead > tr > th {
  border-bottom: 1px solid #e5e7eb;
  padding: 10px;
}

#cartWrapper .table > tbody > tr {
  transition: all 0.2s ease;
}
#cartWrapper .table > tbody > tr:hover {
  background-color: #f1f5f9;
}

/* 🗑️ دکمه حذف */
#cartWrapper .btn-danger.btn-xs {
  border-radius: 6px;
  padding: 4px 8px;
  background-color: #ef4444;
  border: none;
  transition: 0.2s;
}
#cartWrapper .btn-danger.btn-xs:hover {
  background-color: #dc2626;
}

/* 🔢 ورودی تعداد */
#cartWrapper .cart-quantity {
  width: 70px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  text-align: center;
  transition: 0.2s;
}
#cartWrapper .cart-quantity:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}

/* 💰 سلول‌های قیمت */
#cartWrapper td,
#cartWrapper th {
  vertical-align: middle !important;
  text-align: center;
  padding: 10px;
}

/* 📊 فوتر */
#cartWrapper tfoot td {
  background-color: #f9fafb;
  font-weight: 600;
  border-top: 1px solid #e5e7eb;
  color: #111827;
  padding: 12px;
}

/* 💚 دکمه مشاهده سبد خرید */
#cartWrapper .btn-success {
  background-color: #1453d1;
  border: none;
  padding: 8px 18px;
  font-weight: 600;
  border-radius: 8px;
  transition: 0.25s;
}
#cartWrapper .btn-success:hover {
  background-color: #1453d1;
  box-shadow: 0 3px 6px rgba(21, 75, 162, 0.25);
}

/* 💸 رنگ‌بندی قیمت‌ها */
#cartWrapper #totalPrice {
  color: #0d6efd;
  font-weight: bold;
}
#cartWrapper #totalPriceWithoutTax,
#cartWrapper #totalTax,
#cartWrapper #couponPrice {
  color: #374151;
}

/* 🧾 جدول واکنش‌گرا در موبایل */
@media (max-width: 768px) {
  #cartWrapper .table {
    font-size: 12px;
  }
  #cartWrapper .cart-quantity {
    width: 55px;
  }
}
