/* ============================================
   WAQTORO — Product Detail Page Styles
   ============================================ */

.product-page-wrap {
  padding-bottom: 4rem;
  background: var(--clr-bg);
}

/* ---- PRODUCT LAYOUT ---- */
.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.product-placeholder {
  grid-column: 1/-1;
  text-align: center;
  padding: 5rem;
  color: var(--clr-muted);
}

/* ---- IMAGE GALLERY ---- */
.product-gallery { position: sticky; top: calc(var(--navbar-h) + 2rem); }
.gallery-main {
  position: relative;
  aspect-ratio: 1/1;
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1rem;
}
.gallery-main img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  cursor: zoom-in;
}
.gallery-main:hover img { transform: scale(1.04); }
.gallery-badge-wrap {
  position: absolute;
  top: 1rem; left: 1rem;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.gallery-thumbs {
  display: flex;
  gap: 0.75rem;
}
.gallery-thumb {
  flex: 1;
  aspect-ratio: 1/1;
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active { border-color: var(--clr-gold); }
.gallery-thumb:hover { border-color: var(--clr-gold-dark); }

/* ---- PRODUCT INFO ---- */
.product-info { padding-top: 0.5rem; }
.product-info-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.product-info-brand span { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--clr-gold); }
.product-sku { font-size: 0.7rem; color: var(--clr-muted); }
.product-info h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 400;
  color: var(--clr-white);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.product-info-rating { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.product-info-rating .stars { font-size: 1rem; }
.product-info-rating .count { font-size: 0.8rem; color: var(--clr-muted); }
.review-link { font-size: 0.78rem; color: var(--clr-gold); text-decoration: underline; cursor: pointer; }

.product-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--clr-border);
}
.product-price-current {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--clr-white);
}
.product-price-original {
  font-size: 1.1rem;
  color: var(--clr-muted);
  text-decoration: line-through;
}
.product-price-save {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--clr-green);
  background: rgba(39,174,96,0.1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

/* Stock */
.product-stock {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  margin-bottom: 1.5rem;
}
.stock-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.stock-dot.in-stock { background: var(--clr-green); box-shadow: 0 0 6px rgba(39,174,96,0.5); }
.stock-dot.low-stock { background: #e67e22; }

/* Color Selection */
.product-colors {
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
}

/* Label row: "Colour" left, selected name right */
.color-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.color-label-text {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-muted);
}
.color-selected-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-gold);
  background: rgba(201,168,76,0.08);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(201,168,76,0.2);
  transition: all 0.25s ease;
  max-width: 60%;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Strap · Dial legend */
.color-combo-legend {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-muted);
}
.legend-half { color: var(--clr-muted); }
.legend-divider { color: var(--clr-border); }
.legend-pill {
  width: 18px; height: 10px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--clr-border);
  flex-shrink: 0;
}
.legend-dot {
  display: block;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, #888 50%, #bbb 50%);
}

/* Swatch rows */
.color-options {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

/* Base swatch */
.color-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--clr-border);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  background-color: var(--swatch-color, #888);
  flex-shrink: 0;
  padding: 0;
}
.color-swatch:hover {
  border-color: var(--clr-gold-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}
.color-swatch.active {
  border-color: var(--clr-gold);
  box-shadow: 0 0 0 2px var(--clr-bg-card), 0 0 0 4px var(--clr-gold);
  transform: scale(1.12);
}

/* Split swatch — left half = strap, right half = dial */
.color-swatch--split {
  background: linear-gradient(
    90deg,
    var(--strap-color, #888) 50%,
    var(--dial-color, #444) 50%
  );
}

/* Tooltip label on hover */
.color-swatch::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  color: var(--clr-white);
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(4px);
  border: 1px solid var(--clr-border);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 10;
  font-weight: 500;
}
.color-swatch:hover::after {
  opacity: 1;
}
.color-swatch.active::after {
  opacity: 0;
}


/* Qty & Actions */
.product-actions { display: flex; gap: 1rem; margin-bottom: 1.5rem; align-items: center; }
.qty-control {
  display: flex;
  align-items: center;
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-btn {
  width: 40px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  color: var(--clr-white-dim);
  font-size: 1.2rem;
  transition: all 0.2s;
  background: none;
  border: none;
}
.qty-btn:hover { color: var(--clr-gold); background: rgba(201,168,76,0.06); }
#qty-value {
  width: 48px;
  text-align: center;
  background: none;
  border: none;
  color: var(--clr-white);
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
}
.product-atc-btn {
  flex: 1;
  padding: 0 2rem;
  height: 48px;
  background: var(--clr-gold);
  color: #0a0a0a;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.25s;
}
.product-atc-btn:hover { background: var(--clr-gold-light); transform: translateY(-1px); box-shadow: var(--shadow-gold); }
.product-atc-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.product-wishlist-btn {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  color: var(--clr-white-dim);
  transition: all 0.2s;
}
.product-wishlist-btn:hover { color: #e74c3c; border-color: rgba(231,76,60,0.4); }
.product-wishlist-btn.wishlisted { color: #e74c3c; border-color: rgba(231,76,60,0.4); background: rgba(231,76,60,0.05); }
.product-wishlist-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.product-wishlist-btn.wishlisted svg { fill: #e74c3c; }

.mobile-sticky-atc {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(10,10,10,0.96);
  border-top: 1px solid var(--clr-border-gold);
  backdrop-filter: blur(14px);
  display: none;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
}
.mobile-sticky-atc-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.mobile-sticky-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--clr-white-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-sticky-price {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--clr-gold);
}
.mobile-sticky-atc-btn {
  background: var(--clr-gold);
  color: #0a0a0a;
  border-color: var(--clr-gold);
  font-size: 0.7rem;
  padding: 0.65rem 0.95rem;
}
.mobile-sticky-atc-btn:hover {
  background: var(--clr-gold-light);
  color: #0a0a0a;
}

/* Trust badges */
.product-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
}
.trust-item { text-align: center; }
.trust-item svg { width: 20px; height: 20px; color: var(--clr-gold); margin-bottom: 0.4rem; fill: none; stroke: currentColor; stroke-width: 1.5; }
.trust-item span { display: block; font-size: 0.63rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--clr-muted); }

/* ---- PRODUCT TABS ---- */
.product-tabs-section {
  margin-top: 4rem;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.product-tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--clr-border);
  background: var(--clr-bg-card);
}
.product-tab-btn {
  padding: 1rem 1.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-muted);
  border-bottom: 2px solid transparent;
  position: relative;
  bottom: -1px;
  transition: all 0.2s;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
}
.product-tab-btn:hover { color: var(--clr-white-dim); }
.product-tab-btn.active { color: var(--clr-gold); border-bottom-color: var(--clr-gold); }

.tab-panel { display: none; padding: 2rem; }
.tab-panel.active { display: block; }

/* Specs table */
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table tr { border-bottom: 1px solid var(--clr-border); }
.specs-table tr:last-child { border-bottom: none; }
.specs-table th, .specs-table td { padding: 0.75rem 0; text-align: left; font-size: 0.85rem; }
.specs-table th { width: 40%; color: var(--clr-muted); font-weight: 400; }
.specs-table td { color: var(--clr-white); font-weight: 500; }

/* Reviews */
.reviews-summary {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--clr-border);
}
.reviews-big-rating { text-align: center; }
.reviews-big-rating .big-num {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 300;
  color: var(--clr-white);
  line-height: 1;
}
.reviews-big-rating .stars { font-size: 1rem; }
.reviews-big-rating span { font-size: 0.75rem; color: var(--clr-muted); }
.review-bars { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.review-bar-row { display: flex; align-items: center; gap: 0.75rem; font-size: 0.75rem; }
.review-bar-row .star-label { width: 30px; color: var(--clr-muted); }
.review-bar { flex: 1; height: 4px; background: var(--clr-border); border-radius: 2px; overflow: hidden; }
.review-bar-fill { height: 100%; background: var(--clr-gold); border-radius: 2px; }
.review-bar-row .pct { width: 30px; text-align: right; color: var(--clr-muted); }

.review-item { padding: 1.5rem 0; border-bottom: 1px solid var(--clr-border); }
.review-item:last-child { border-bottom: none; }
.review-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.review-author { font-size: 0.85rem; font-weight: 600; color: var(--clr-white); }
.review-date { font-size: 0.72rem; color: var(--clr-muted); }
.review-title { font-size: 0.9rem; color: var(--clr-white-dim); font-weight: 500; margin-bottom: 0.4rem; }
.review-body { font-size: 0.83rem; color: var(--clr-muted); line-height: 1.7; }

/* Related */
.related-section { background: var(--clr-bg-2); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .product-layout { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 768px) {
  .product-layout { grid-template-columns: 1fr; }
  .product-gallery { position: static; }
  .product-trust { grid-template-columns: repeat(3, 1fr); }
  .mobile-sticky-atc.visible { display: grid; }
  .product-page-wrap { padding-bottom: 6rem; }
}
@media (max-width: 480px) {
  .product-actions { flex-wrap: wrap; }
  .product-atc-btn { flex: 1 1 100%; order: 3; }
  .product-trust { grid-template-columns: 1fr 1fr; }
}
