/* ============================================================
   PRODUCT PAGE — Styles
   ============================================================ */

.product-page { padding-top: var(--nav-height); }

/* ── Breadcrumb ── */
.product-breadcrumb-bar {
  background: var(--cream-mid);
  border-bottom: 1px solid var(--border-light);
  padding: 0.75rem 0;
}

.product-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.8125rem;
  color: var(--text-light);
  flex-wrap: wrap;
}

.product-breadcrumb a { color: var(--text-light); transition: color var(--transition); }
.product-breadcrumb a:hover { color: var(--gold); }
.product-breadcrumb span { color: var(--border); }
.product-breadcrumb .current { color: var(--text-mid); font-weight: 500; }

/* ── Product Main ── */
.product-main {
  padding: var(--space-xl) 0 var(--space-2xl);
}

.product-grid {
  display: grid;
  gap: var(--space-2xl);
}

/* ── Gallery ── */
.product-gallery { position: relative; }

.product-main-img {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--cream-mid);
  margin-bottom: var(--space-md);
}

.product-main-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  transition: transform 0.4s ease;
}

.product-main-img:hover .product-main-img-placeholder { transform: scale(1.03); }

.product-main-badges {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  z-index: 1;
}

.product-thumbs {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.product-thumbs::-webkit-scrollbar { display: none; }

.product-thumb {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition);
  background: var(--cream-mid);
}

.product-thumb.active { border-color: var(--gold); }
.product-thumb:hover  { border-color: var(--gold-light); }

.product-thumb-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

/* ── Product Info ── */
.product-info {}

.product-info-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.product-category-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color var(--transition);
}
.product-category-link:hover { color: var(--amber-dark); }

.product-share {
  display: flex;
  gap: var(--space-xs);
}

.share-btn {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition: all var(--transition);
}
.share-btn:hover { border-color: var(--gold); color: var(--gold); }
.share-btn svg { width: 15px; height: 15px; }

.product-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  color: var(--brown);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

/* Rating mini */
.product-rating-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.product-stars {
  display: flex;
  gap: 2px;
  color: var(--gold);
}
.product-stars svg { width: 16px; height: 16px; }

.product-rating-count {
  font-size: 0.875rem;
  color: var(--text-light);
}
.product-rating-count a {
  color: var(--gold);
  text-decoration: underline;
}

.product-in-stock {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--success);
}
.product-in-stock::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: var(--radius-full);
}

.product-out-stock {
  color: var(--error);
}
.product-out-stock::before { background: var(--error); }

/* Price */
.product-price-block {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.product-price-main {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--brown);
}

.product-price-old {
  font-size: 1.125rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.product-price-save {
  background: #FEE2E2;
  color: var(--error);
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
}

.product-price-unit {
  font-size: 0.875rem;
  color: var(--text-light);
  align-self: center;
}

/* Short description */
.product-short-desc {
  font-size: 0.9375rem;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: var(--cream);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--gold);
}

/* Variant Selector */
.product-variants {
  margin-bottom: var(--space-lg);
}

.variant-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brown);
  margin-bottom: var(--space-sm);
  display: flex;
  gap: var(--space-sm);
}

.variant-label .selected-variant {
  color: var(--gold);
  font-weight: 400;
}

.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.variant-btn {
  padding: 0.5rem 1.125rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-mid);
  background: var(--white);
  cursor: pointer;
  transition: all var(--transition);
}

.variant-btn:hover { border-color: var(--gold-light); color: var(--brown); }

.variant-btn.active {
  border-color: var(--gold);
  background: var(--gold-pale);
  color: var(--amber-dark);
  font-weight: 600;
}

.variant-btn.out-of-stock {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Quantity + Add to Cart */
.product-actions {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.product-qty-wrap {
  display: flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--white);
}

.product-qty-btn {
  width: 44px;
  height: 48px;
  border: none;
  background: transparent;
  color: var(--brown);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}

.product-qty-btn:hover { background: var(--cream-mid); }

.product-qty-input {
  width: 52px;
  text-align: center;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--brown);
  background: transparent;
  outline: none;
  font-family: var(--font-serif);
}

.product-add-to-cart {
  flex: 1;
  min-width: 160px;
  padding: 0.875rem 1.5rem;
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: all var(--transition);
}

.product-add-to-cart:hover {
  background: var(--amber-dark);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.product-add-to-cart svg { width: 20px; height: 20px; }

.product-wishlist-btn {
  width: 52px;
  height: 52px;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition: all var(--transition);
}
.product-wishlist-btn:hover { border-color: #E74C3C; color: #E74C3C; }
.product-wishlist-btn svg { width: 20px; height: 20px; }

/* Trust mini-row */
.product-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: var(--space-lg);
}

.product-trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.8125rem;
  color: var(--text-mid);
}

.product-trust-item svg { width: 16px; height: 16px; color: var(--gold); }

/* ── Tabs: Description / Details / Reviews ── */
.product-tabs-section {
  margin-top: var(--space-2xl);
}

.product-tabs-nav {
  display: flex;
  border-bottom: 2px solid var(--border-light);
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.product-tabs-nav::-webkit-scrollbar { display: none; }

.product-tab-btn {
  padding: 0.875rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-light);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

.product-tab-btn:hover { color: var(--brown); }

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

.product-tab-pane { display: none; padding: var(--space-xl) 0; }
.product-tab-pane.active { display: block; }

/* Description content */
.product-description {
  max-width: 680px;
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text-mid);
}

.product-description h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--brown);
  margin: var(--space-lg) 0 var(--space-sm);
}

.product-description ul {
  list-style: disc;
  padding-left: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* Details table */
.product-details-table {
  width: 100%;
  max-width: 520px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.product-details-table tr:not(:last-child) td {
  border-bottom: 1px solid var(--border-light);
}

.product-details-table td {
  padding: 0.75rem var(--space-md);
}

.product-details-table td:first-child {
  font-weight: 600;
  color: var(--brown);
  width: 45%;
  background: var(--cream);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.product-details-table td:last-child {
  color: var(--text-mid);
}

/* Reviews tab */
.reviews-tab-grid {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.write-review-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ── Related Products ── */
.related-products {
  background: var(--gold-bg);
  padding: var(--space-3xl) 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

/* ── Sticky Add to Cart (mobile) ── */
.product-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: var(--space-sm) var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  z-index: 400;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  transform: translateY(100%);
  transition: transform var(--transition-slow);
}

.product-sticky-bar.visible { transform: translateY(0); }

.sticky-product-info { flex: 1; min-width: 0; }

.sticky-product-name {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--brown);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-product-price {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* ── Responsive ── */
@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

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

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

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
  }
}
