:root {
  --color-primary: #f4b400;
  --color-secondary: #fb8c00;
  --color-bg: #f8f3ea;
  --color-surface: #ffffff;
  --color-card: #ffffff;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --shadow-soft: 0 12px 24px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 20px 40px rgba(15, 23, 42, 0.12);
  --transition: 0.3s ease;
}

[data-theme="dark"] {
  --color-bg: #1f2937;
  --color-surface: #374151;
  --color-card: #2f3b4f;
  --color-text: #f9fafb;
  --color-muted: #cbd5f5;
  --color-border: #4b5563;
  --shadow-soft: 0 12px 24px rgba(0, 0, 0, 0.3);
  --shadow-strong: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ==== Product Layout / Media / Gallery ==== */
.product-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  margin-bottom: 64px;
}

.product-media {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* وجود داشت ولی استایل نداشت؛ نگه می‌داریم برای سازگاری */
.product-gallery {}

/* Main Image Card */
.main-image-card {
  position: relative;
  /*background: var(--color-card);*/
  border-radius: 28px;
  padding: 18px;
  /*border: 2px solid rgba(244, 180, 0, 0.2);*/
  /*box-shadow: var(--shadow-strong);*/
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  overflow: hidden;
}

.image-glow {
  position: absolute;
  width: 120%;
  height: 120%;
  border-radius: 50%;
  /*background: linear-gradient(135deg, rgba(244, 180, 0, 0.2), rgba(251, 140, 0, 0.15));*/
  filter: blur(40px);
  z-index: 0;
}

.main-image {}

/* قبلا روی .main-image-card img بود؛ اما چون کلاس main-image وجود دارد، اینجا هم پوشش می‌دهیم */
.main-image img,
.main-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  transition: transform 0.6s ease;
}

.main-image-card:hover img {
  transform: scale(1.05);
}

.main-image-card img,
.deal-badge {
  position: relative;
  z-index: 1;
}

.deal-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  background: var(--color-secondary);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(251, 140, 0, 0.3);
}

/* Thumbs */
.thumbs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

/*.scrollbar-hide::-webkit-scrollbar {*/
/*  display: none;*/
/*}*/
/*.scrollbar-hide {*/
/*  -ms-overflow-style: none;*/
/*  scrollbar-width: none;*/
/*}*/

.thumb {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  border: 2px solid transparent;
  background: var(--color-card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  flex: 0 0 auto;
  transition: border-color var(--transition), transform var(--transition);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 180, 0, 0.4);
}

/* در HTML شما ممکن است active باشد، در CSS قبلی is-active بود */
.thumb.active,
.thumb.is-active,
.active {
  border-color: var(--color-primary);
}

/* ==== Product Info ==== */
.product-info h1 {
  font-size: 2rem;
  margin: 0 0 8px;
  line-height: 1.4;
}

.rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.stars {
  display: flex;
  gap: 2px;
  color: var(--color-primary);
}

.material-icons {}

.muted {
  color: var(--color-muted);
}

.stars .muted {
  color: #d1d5db;
}

.rating-count {}

.lead {
  color: var(--color-muted);
  line-height: 1.9;
  font-size: 1.05rem;
  margin: 0;
}

/* ==== Purchase Card ==== */
.purchase-card {
  /*background: var(--color-card);*/
  background: #ffffff6e;
  padding: 24px;
  border-radius: 24px 0 0 24px;
  /*border: 1px solid var(--color-border);*/
  /*box-shadow: var(--shadow-soft);*/
  margin-top: 28px;
}

.weight-options {}

.section-label {
  display: block;
  font-weight: 600;
  margin-bottom: 12px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  background: transparent;
  transition: all var(--transition);
}

.chip:hover {
  border-color: var(--color-primary);
  background: rgba(244, 180, 0, 0.1);
}

.chip.is-active,
.chip.active {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(244, 180, 0, 0.25);
}

.purchase-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.price-block {
  text-align: start;
}

.price-now {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.price-amount {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--color-secondary);
}

.price-label {
  color: var(--color-muted);
  font-size: 1rem;
}

.price-range {}

.purchase-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 260px;
  justify-content: flex-end;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  /*background: var(--color-surface);*/
  background:#e0e0e0;
  overflow: hidden;
  height: 48px;
}

.qty-control button {
  padding: 6px 12px;
  color: var(--color-muted);
  transition: color var(--transition);
}

.qty-control button:hover {
  color: var(--color-primary);
}

.qty-control input {
  width: 48px;
  text-align: center;
  border: none;
  background: transparent;
  font-weight: 700;
  color: var(--color-text);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 14px;
  background: var(--color-secondary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 16px 30px rgba(251, 140, 0, 0.3);
  transition: transform var(--transition), box-shadow var(--transition);
  flex: 1;
  min-height: 48px;
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(251, 140, 0, 0.35);
}

.total-line {}

/* ==== Features ==== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.feature-card {
  /*background: var(--color-card);*/
  background:#dadada;
  padding: 12px;
  border-radius: 16px;
  /*box-shadow: var(--shadow-soft);*/
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-muted);
  display: grid;
  gap: 6px;
  /*border:1px solid #ffffff6e;*/
}

.feature-card .material-icons {
  color: var(--color-primary);
  font-size: 1.8rem;
}

/* ==== Tabs & Content ==== */
.tabs-section {
  margin-bottom: 64px;
}

.tabs {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  border-bottom: 1px solid var(--color-border);
}

.tab {
  padding: 16px 0;
  border-bottom: 2px solid transparent;
  color: var(--color-muted);
  font-size: 1.05rem;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}

.tab.is-active,
.tab.active {
  color: var(--color-primary);
  border-color: var(--color-primary);
  font-weight: 700;
}

.tab-panel {
  /*background: var(--color-card);*/
  background:#ffffff6e;
  padding: 28px;
  border-radius: 0 0px 24px 24px;
  box-shadow: var(--shadow-soft);
  line-height: 2;
  color: var(--color-text);
}

.bullet-list {}

.detail-grid {}

.detail-card {}

.detail-label {}

.detail-value {}

/* ==== Responsive (فقط مرتبط با کلاس‌های بالا) ==== */
@media (min-width: 1024px) {
  .main-image-card {
    min-height: 500px;
  }
}

@media (max-width: 980px) {
  .product-layout {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .purchase-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .qty-control {
    width: 100%;
    justify-content: center;
  }

  .primary-button {
    width: 100%;
  }

  .thumb {
    width: 72px;
    height: 72px;
  }
}
