/* ============================================================
   LIKHIT PENS — PRODUCT DETAIL PAGE
   Source: docs/design.md → Section 6 "PRODUCT DETAIL PAGE"
   ============================================================ */

.product-page {
  padding-top: calc(var(--navbar-height-desktop) + 36px);
  background: var(--color-parchment);
  min-height: 100vh;
}

@media (max-width: 767px) {
  .product-page { padding-top: calc(var(--navbar-height-mobile) + 36px); }
}

.product-layout {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: var(--space-8);
  padding: var(--space-7) 0;
  align-items: start;
}

@media (max-width: 1023px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* ── Gallery ── */
.product-gallery {
  position: sticky;
  top: calc(var(--navbar-height-desktop) + 48px);
}

@media (max-width: 1023px) {
  .product-gallery { position: static; }
}

.gallery-main {
  position: relative;
  background: var(--color-aged-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(201,168,76,0.15);
  cursor: crosshair;
  margin-bottom: var(--space-4);
}

.gallery-main img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  transition: opacity 0.3s;
}

/* Lens zoom on hover (desktop) */
.gallery-main:hover img {
  transform: scale(1.5);
  transform-origin: var(--zoom-x, 50%) var(--zoom-y, 50%);
}

@media (max-width: 767px) {
  .gallery-main:hover img { transform: none; }
}

.gallery-thumbnails {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.gallery-thumbnails::-webkit-scrollbar { display: none; }

.gallery-thumb {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid rgba(201,168,76,0.2);
  cursor: pointer;
  background: var(--color-aged-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s, transform 0.2s;
}

.gallery-thumb:hover { transform: scale(1.05); }

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

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

/* Mobile swipe gallery */
.gallery-dots {
  display: none;
  justify-content: center;
  gap: 6px;
  margin-top: var(--space-3);
}

@media (max-width: 767px) {
  .gallery-dots { display: flex; }
}

.gallery-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(201,168,76,0.3);
  cursor: pointer;
  transition: background 0.2s;
}

.gallery-dot.active { background: var(--color-antique-gold); }

/* ── Product Info ── */
.product-info {
  padding: var(--space-5) 0;
}

.product-info-name {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--color-deep-brown);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-3);
}

.product-info-price {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: var(--weight-semibold);
  color: var(--color-antique-gold);
  margin-bottom: var(--space-5);
}

.product-info-desc {
  font-size: var(--text-base);
  color: rgba(59,31,10,0.75);
  line-height: var(--leading-loose);
  font-weight: var(--weight-light);
  margin-bottom: var(--space-5);
}

/* Specifications table */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-5);
}

.specs-table tr {
  border-bottom: 1px solid rgba(201,168,76,0.1);
}

.specs-table td {
  padding: 8px 0;
  font-size: var(--text-sm);
  vertical-align: top;
}

.specs-table td:first-child {
  color: rgba(59,31,10,0.5);
  width: 45%;
  font-weight: var(--weight-medium);
  letter-spacing: 0.03em;
}

.specs-table td:last-child { color: var(--color-deep-brown); }

/* Add to Cart area */
.product-add-area {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.product-qty-row {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.product-qty-label {
  font-size: var(--text-sm);
  color: rgba(59,31,10,0.6);
  font-weight: var(--weight-medium);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: var(--text-xs);
}

.product-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.wishlist-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: rgba(59,31,10,0.5);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  padding: 0;
  transition: color 0.2s;
}

.wishlist-btn:hover { color: var(--color-antique-gold); }

/* Shipping info */
.product-shipping-info {
  background: rgba(201,168,76,0.05);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.product-shipping-info svg { color: var(--color-antique-gold); flex-shrink: 0; margin-top: 2px; }
.product-shipping-info p { font-size: var(--text-sm); color: rgba(59,31,10,0.7); line-height: var(--leading-relaxed); }

.product-corporate-note {
  font-size: var(--text-sm);
  color: rgba(59,31,10,0.5);
  text-align: center;
  padding: var(--space-3) 0;
}

.product-corporate-note a { color: var(--color-antique-gold); }

/* ── Related Products ── */
.related-section {
  background: var(--color-aged-white);
  padding: var(--space-9) 0;
  border-top: 1px solid rgba(201,168,76,0.1);
}

/* ============================================================
   MOBILE STICKY ADD-TO-CART BAR
   ============================================================ */
.product-mobile-cta { display: none; }

@media (max-width: 767px) {
  .product-page { padding-bottom: 128px; }

  .product-mobile-cta {
    display: flex;
    position: fixed;
    bottom: 64px;
    left: 0;
    right: 0;
    background: var(--color-aged-white);
    border-top: 1px solid rgba(201,168,76,0.2);
    padding: 12px 20px;
    gap: 16px;
    align-items: center;
    z-index: calc(var(--z-sticky) - 1);
    box-shadow: 0 -2px 16px rgba(59,31,10,0.06);
  }

  .product-mobile-cta-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }

  .product-mobile-cta-name {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-deep-brown);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .product-mobile-cta-price {
    font-family: var(--font-mono);
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    color: var(--color-antique-gold);
  }

  .product-mobile-cta .btn-primary {
    white-space: nowrap;
    min-width: 120px;
    padding: 12px 20px;
  }

  /* Hide desktop action buttons on mobile — sticky bar replaces them */
  .product-actions .btn-primary,
  .product-actions .btn-secondary { display: none; }
}
