/* ================================================
   صفحه فروش سالار - استایل صفحه محصول
   نویسنده: webarak | webarak.ir
   ================================================ */

/* Variables */
.salar-product-page {
  --primary-color: #D4AF37;
  --secondary-color: #C9A961;
  --text-dark: #2C2416;
  --text-light: #5C4A3C;
  --text-gray: #8B7355;
  --bg-light: #FFF9E6;
  --bg-white: #FFFFFF;
  --border-color: rgba(212, 175, 55, 0.2);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* Container */
.salar-product-page {
  font-family: 'Vazir', 'Yekan', 'IRANSans', 'Tahoma', sans-serif;
  direction: rtl;
  padding: 40px 20px;
  background: linear-gradient(180deg, #FFF9E6 0%, #FFFFFF 50%, #F8F6F0 100%);
}

.salar-product-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ===== بخش اصلی محصول ===== */
.salar-product-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  background: var(--bg-white);
  border: 2px solid var(--border-color);
  border-radius: 30px;
  padding: 40px;
  box-shadow: var(--shadow-md);
}

/* ===== گالری تصاویر ===== */
.salar-product-gallery {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.salar-main-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-light);
  box-shadow: var(--shadow-sm);
}

.salar-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.salar-main-image:hover img {
  transform: scale(1.08);
}

.salar-sale-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #E74C3C, #C0392B);
  color: var(--bg-white);
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
  z-index: 10;
  animation: salar-pulse 2s infinite;
}

@keyframes salar-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Thumbnails */
.salar-thumbnails {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 5px 0;
}

.salar-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.salar-thumbnails::-webkit-scrollbar-track {
  background: rgba(212, 175, 55, 0.1);
  border-radius: 10px;
}

.salar-thumbnails::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

.salar-thumbnail {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s;
}

.salar-thumbnail:hover {
  border-color: var(--primary-color);
  transform: translateY(-3px);
}

.salar-thumbnail.active {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.salar-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== اطلاعات محصول ===== */
.salar-product-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* دسته‌بندی */
.salar-product-category {
  margin-bottom: -10px;
}

.salar-category-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(212, 175, 55, 0.1);
  border: 1.5px solid var(--border-color);
  border-radius: 50px;
  color: var(--text-gray);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.3s;
}

.salar-category-link:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--bg-white);
  border-color: transparent;
}

.salar-cat-icon {
  font-size: 15px;
}

/* عنوان */
.salar-product-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.5px;
}

/* امتیاز */
.salar-rating-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.salar-rating-stars {
  display: flex;
  gap: 3px;
}

.salar-star {
  font-size: 18px;
  color: #DDD;
}

.salar-star.filled {
  color: #FFD700;
  text-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.salar-star.half {
  background: linear-gradient(90deg, #FFD700 50%, #DDD 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.salar-rating-count {
  font-size: 13px;
  color: var(--text-gray);
  font-weight: 600;
}

/* توضیحات کوتاه */
.salar-short-description {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-light);
  padding: 18px;
  background: rgba(212, 175, 55, 0.05);
  border-radius: 15px;
  border-right: 4px solid var(--primary-color);
}

/* قیمت */
.salar-price-wrapper {
  padding: 20px 0;
  border-top: 2px solid var(--border-color);
  border-bottom: 2px solid var(--border-color);
}

.salar-price-box {
  display: flex;
  align-items: center;
  gap: 15px;
}

.salar-current-price {
  font-size: 36px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.salar-price-box.on-sale .salar-sale-price {
  font-size: 36px;
  font-weight: 900;
  background: linear-gradient(135deg, #E74C3C, #C0392B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.salar-price-box.on-sale .salar-regular-price {
  font-size: 22px;
  color: var(--text-gray);
  text-decoration: line-through;
  font-weight: 600;
}

/* موجودی */
.salar-stock-status {
  display: flex;
  align-items: center;
}

.salar-stock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
}

.salar-stock.in-stock {
  background: rgba(76, 175, 80, 0.1);
  color: #4CAF50;
  border: 1.5px solid rgba(76, 175, 80, 0.3);
}

.salar-stock.out-of-stock {
  background: rgba(231, 76, 60, 0.1);
  color: #E74C3C;
  border: 1.5px solid rgba(231, 76, 60, 0.3);
}

.salar-stock-icon {
  font-size: 16px;
  font-weight: 900;
}

/* فرم افزودن به سبد */
.salar-add-to-cart-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 10px;
}

/* تعداد */
.salar-quantity-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
}

.salar-quantity-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
}

.salar-quantity-box {
  display: flex;
  align-items: center;
  background: var(--bg-white);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.salar-qty-btn {
  width: 40px;
  height: 45px;
  background: rgba(212, 175, 55, 0.1);
  border: none;
  color: var(--primary-color);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.salar-qty-btn:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--bg-white);
}

.salar-qty-input {
  width: 70px;
  height: 45px;
  border: none;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  -moz-appearance: textfield;
}

/* استایل اضافی برای کلاس‌های ووکامرس */
.salar-quantity-box input.qty,
.salar-quantity-box input.input-text {
  width: 70px;
  height: 45px;
  border: none;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  -moz-appearance: textfield;
}

.salar-qty-input::-webkit-outer-spin-button,
.salar-qty-input::-webkit-inner-spin-button,
.salar-quantity-box input.qty::-webkit-outer-spin-button,
.salar-quantity-box input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.salar-qty-input:focus,
.salar-quantity-box input.qty:focus {
  outline: none;
}

/* دکمه افزودن به سبد */
.salar-add-to-cart-btn {
  width: 100%;
  padding: 18px 30px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--bg-white);
  border: none;
  border-radius: 15px;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3);
}

.salar-add-to-cart-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(212, 175, 55, 0.4);
}

.salar-add-to-cart-btn:active {
  transform: translateY(-1px);
}

.salar-cart-icon {
  font-size: 20px;
}

/* ویژگی‌ها */
.salar-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: rgba(212, 175, 55, 0.05);
  border-radius: 15px;
  border: 1.5px solid var(--border-color);
}

.salar-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
}

.salar-feature-icon {
  font-size: 18px;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 10px;
  flex-shrink: 0;
}

/* تگ‌ها */
.salar-tags {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.salar-tags-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-gray);
  flex-shrink: 0;
}

.salar-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.salar-tag {
  padding: 6px 14px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-gray);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s;
}

.salar-tag:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--bg-white);
  border-color: transparent;
}

/* ===== تب‌ها ===== */
.salar-tabs-section {
  background: var(--bg-white);
  border: 2px solid var(--border-color);
  border-radius: 25px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.salar-tabs-header {
  display: flex;
  background: rgba(212, 175, 55, 0.05);
  border-bottom: 2px solid var(--border-color);
}

.salar-tab-btn {
  flex: 1;
  padding: 18px 25px;
  background: transparent;
  border: none;
  color: var(--text-gray);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.salar-tab-btn:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--text-dark);
}

.salar-tab-btn.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--bg-white);
}

.salar-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.salar-tabs-content {
  padding: 35px;
}

.salar-tab-panel {
  display: none;
}

.salar-tab-panel.active {
  display: block;
  animation: salar-fade-in 0.3s;
}

@keyframes salar-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* محتوای توضیحات */
.salar-description {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-light);
}

.salar-description p {
  margin-bottom: 15px;
}

.salar-description h2,
.salar-description h3 {
  color: var(--text-dark);
  margin: 25px 0 15px;
  font-weight: 800;
}

/* جدول مشخصات */
.salar-specs-table {
  width: 100%;
  border-collapse: collapse;
}

.salar-specs-table tr {
  border-bottom: 1px solid var(--border-color);
}

.salar-specs-table tr:last-child {
  border-bottom: none;
}

.salar-specs-table th,
.salar-specs-table td {
  padding: 15px 20px;
  text-align: right;
}

.salar-specs-table th {
  background: rgba(212, 175, 55, 0.05);
  font-weight: 700;
  color: var(--text-dark);
  width: 40%;
}

.salar-specs-table td {
  color: var(--text-light);
  font-weight: 500;
}

/* ===== محصولات مرتبط ===== */
.salar-related-section {
  padding: 40px;
  background: var(--bg-white);
  border: 2px solid var(--border-color);
  border-radius: 25px;
  box-shadow: var(--shadow-sm);
}

.salar-related-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--text-dark);
  margin: 0 0 30px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.salar-title-icon {
  font-size: 22px;
  color: var(--primary-color);
}

.salar-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.salar-related-card {
  background: var(--bg-white);
  border: 2px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}

.salar-related-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.salar-related-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.salar-related-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-light);
}

.salar-related-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.salar-related-card:hover .salar-related-image img {
  transform: scale(1.08);
}

.salar-sale-badge-small {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #E74C3C, #C0392B);
  color: var(--bg-white);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  z-index: 2;
}

.salar-related-info {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.salar-related-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.salar-related-price {
  font-size: 16px;
  font-weight: 900;
  color: var(--primary-color);
}

.salar-related-price del {
  font-size: 13px;
  color: var(--text-gray);
  margin-left: 6px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .salar-product-main {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .salar-related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .salar-product-page {
    padding: 25px 15px;
  }

  .salar-product-main {
    padding: 25px;
  }

  .salar-product-title {
    font-size: 26px;
  }

  .salar-current-price,
  .salar-sale-price {
    font-size: 28px !important;
  }

  .salar-tabs-header {
    flex-wrap: wrap;
  }

  .salar-tab-btn {
    flex: 1 1 50%;
  }

  .salar-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .salar-related-section {
    padding: 25px;
  }
}

@media (max-width: 480px) {
  .salar-product-main {
    padding: 20px;
  }

  .salar-tabs-content {
    padding: 20px;
  }

  .salar-related-grid {
    grid-template-columns: 1fr;
  }
}
