/* Product detail page */

.product-main {
  padding-top: var(--space-md);
  padding-bottom: var(--space-xl);
}

.product-back {
  display: inline-block;
  margin-bottom: var(--space-md);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
}
.product-back:hover { color: var(--accent); }

.product-view {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--space-lg);
  align-items: start;
}

/* Gallery */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.product-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--surface-2);
}

.product-stage-video {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-stage-video iframe,
.product-stage-video video {
  width: 100%;
  height: 100%;
  border: 0;
}

.product-stage-placeholder {
  color: var(--text-dim);
  font-size: 0.95rem;
  padding: var(--space-md);
  text-align: center;
}

.product-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.product-thumb {
  width: 72px;
  height: 72px;
  padding: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--text-dim);
  font-size: 0.75rem;
}

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

.product-thumb:hover { border-color: var(--accent); }
.product-thumb.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }

.product-thumb-video {
  background: var(--bg);
  flex-direction: column;
  gap: 0.15rem;
}

.product-thumb-play {
  font-size: 1.3rem;
  color: var(--accent);
  line-height: 1;
}

/* Info column */
.product-info { display: flex; flex-direction: column; gap: var(--space-sm); }

.product-info h1 {
  font-size: 1.6rem;
  line-height: 1.25;
  margin-bottom: 0.2rem;
}

.product-price {
  font-size: 2rem;
  font-weight: 700;
  color: #8a6a2a;
  margin: 0.1rem 0 var(--space-sm);
}

.product-spec {
  display: grid;
  gap: 0.4rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--space-sm) 0;
}

.product-spec-row {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: var(--space-sm);
  align-items: baseline;
}

.product-spec-row dt {
  color: var(--text-dim);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.product-spec-row dd { color: var(--text); }

.product-section-head {
  font-size: 1rem;
  margin-top: var(--space-sm);
  margin-bottom: 0.4rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#product-description {
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.product-actions .cta { text-decoration: none; display: inline-flex; align-items: center; }

@media (max-width: 760px) {
  .product-view { grid-template-columns: 1fr; }
  .product-price { font-size: 1.6rem; }
}


/* ----- Desktop image lightbox ----- */
/* Only wire the zoom affordance on real desktop pointers. On touch/mobile
   the stage image stays inert (tapping does nothing) so the popup never
   gets in the way of scrolling or the thumb gallery. */
@media (hover: hover) and (pointer: fine) and (min-width: 769px) {
  .product-stage.zoomable img { cursor: zoom-in; }
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vmin;
  background: rgba(8, 8, 12, 0.92);
  backdrop-filter: blur(4px);
  cursor: zoom-out;
}
.image-lightbox[hidden] { display: none; }

.lightbox-img {
  max-width: 96vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
}
.lightbox-close:hover { color: var(--accent); border-color: var(--accent); }
