/* ================================================
   PRODUCT DETAIL PAGE - The Candle Bloom
   ================================================ */

.product-page {
  padding-top: calc(88px + 1.5rem);
}

@media (max-width: 1024px) {
  .product-page {
    padding-top: calc(80px + 1rem);
  }
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 40px 0 80px;
  align-items: start;
}

/* Gallery */
.product-gallery {
  position: sticky;
  top: 100px;
}

.product-gallery-main {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  background-color: var(--cream);
}

.product-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform var(--transition-slower);
}

.product-gallery-main:hover img {
  transform: scale(1.05);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: var(--white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px var(--shadow-color);
  color: var(--brown);
  transition: all var(--transition-base);
  cursor: pointer;
  z-index: 2;
}

.gallery-nav:hover {
  background: var(--brown);
  color: var(--white);
}

.gallery-nav.prev { left: 16px; }
.gallery-nav.next { right: 16px; }

.gallery-nav svg {
  width: 18px;
  height: 18px;
}

.product-gallery-thumbs {
  display: flex;
  gap: 12px;
}

.gallery-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-base);
  opacity: 0.6;
}

.gallery-thumb.active {
  border-color: var(--gold);
  opacity: 1;
}

.gallery-thumb:hover {
  opacity: 1;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product Info */
.product-info {
  padding: 20px 0;
}

.product-info-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.product-info h1 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  margin-bottom: 16px;
  line-height: 1.2;
}

.product-rating-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.product-rating-row .stars svg {
  width: 18px;
  height: 18px;
}

.product-rating-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.product-price-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.product-current-price {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  color: var(--brown);
}

.product-original-price {
  font-size: 1.2rem;
  text-decoration: line-through;
  color: var(--text-muted);
}

.product-discount {
  padding: 4px 12px;
  background: var(--error);
  color: var(--white);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.product-description {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.product-meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.product-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

.product-meta-item svg {
  width: 20px;
  height: 20px;
  color: var(--gold);
  flex-shrink: 0;
}

.product-meta-item strong {
  color: var(--brown);
  font-weight: 500;
}

/* Size/Variant Selector */
.product-variants {
  margin-bottom: 28px;
}

.variant-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--brown);
  margin-bottom: 12px;
}

.variant-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.variant-option {
  padding: 10px 20px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
}

.variant-option:hover {
  border-color: var(--gold);
}

.variant-option.active {
  background: var(--brown);
  border-color: var(--brown);
  color: var(--white);
}

/* Quantity */
.product-quantity {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.quantity-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--brown);
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.quantity-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--brown);
  transition: all var(--transition-base);
}

.quantity-btn:hover {
  background: var(--cream);
}

.quantity-value {
  width: 50px;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-left: 1.5px solid var(--border-color);
  border-right: 1.5px solid var(--border-color);
  height: 44px;
  background: transparent;
}

/* Action Buttons */
.product-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.product-actions .btn-primary {
  flex: 1;
}

.product-actions .btn-icon {
  width: 52px;
  height: 52px;
  border: 1.5px solid var(--border-color);
  color: var(--brown);
}

.product-actions .btn-icon:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.product-actions .btn-icon.wishlisted {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

.product-actions .btn-icon svg {
  width: 22px;
  height: 22px;
}

/* Tabs */
.product-tabs {
  margin-top: 60px;
  border-top: 1px solid var(--border-color);
  padding-top: 40px;
}

.product-tabs-nav {
  display: flex;
  gap: 32px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 32px;
}

.product-tab-btn {
  padding: 12px 0;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition-base);
  cursor: pointer;
}

.product-tab-btn.active {
  color: var(--brown);
  border-bottom-color: var(--gold);
}

.product-tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

.product-tab-content.active {
  display: block;
}

.product-tab-content p {
  margin-bottom: 16px;
  line-height: 1.8;
}

/* Related Products */
.related-products {
  padding: var(--section-padding);
  background: var(--cream);
}

@media (max-width: 1024px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .product-gallery {
    position: static;
  }
}

@media (max-width: 480px) {
  .product-actions {
    flex-direction: column;
  }

  .product-tabs-nav {
    gap: 16px;
    overflow-x: auto;
  }
}