/* css/product.css */
.product-main {
  padding: 8rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  margin-bottom: 2rem;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: var(--color-text);
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .product-layout {
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
  }
}

.product-hero-image-wrapper {
  aspect-ratio: 4/5;
  background-color: #ededed;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.product-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.gallery-image-wrapper {
  aspect-ratio: 1; /* Square for gallery */
  background-color: #ededed;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  cursor: zoom-in;
}

.gallery-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-image-wrapper:hover img {
  transform: scale(1.05);
}

.product-hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.product-hero-image-wrapper:hover img {
  transform: scale(1.02);
}

.product-hero-image-wrapper {
  cursor: zoom-in;
}

.product-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--color-text);
  margin-bottom: 1rem;
  line-height: 1.1;
}

.product-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 2rem;
}

.product-description {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: 3rem;
  max-width: 500px;
}

.product-meta {
  border-top: 1px solid rgba(0,0,0,0.1);
  padding-top: 2rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.meta-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.meta-value {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: var(--color-text);
}

/* Dark mode fallback if applicable */
@media (prefers-color-scheme: dark) {
  .product-meta {
    border-top: 1px solid rgba(255,255,255,0.1);
  }
}

/* =============================================
   FULLSCREEN LIGHTBOX MODAL
   ============================================= */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 8, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

/* Image stage */
.lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 90vh;
  transform: scale(0.92);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-overlay.is-open .lightbox-stage {
  transform: scale(1);
}

.lightbox-stage img {
  display: block;
  max-width: 88vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 0.2s ease;
}

/* Dot indicators */
.lightbox-counter {
  position: absolute;
  bottom: -2.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
}

.lightbox-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  transition: background 0.25s ease, transform 0.25s ease;
}

.lightbox-dot.active {
  background: #fff;
  transform: scale(1.45);
}

/* Close button */
.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.75rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  transition: background 0.25s ease, transform 0.25s ease;
  z-index: 10000;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(90deg) scale(1.1);
}

/* Nav arrows */
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
  z-index: 10000;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox-nav.prev {
  left: 1.75rem;
}

.lightbox-nav.next {
  right: 1.75rem;
}

.lightbox-nav.prev:hover {
  transform: translateY(-50%) translateX(-3px);
}

.lightbox-nav.next:hover {
  transform: translateY(-50%) translateX(3px);
}

/* Hide nav when only 1 image */
.lightbox-nav.hidden {
  display: none;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .lightbox-nav {
    width: 40px;
    height: 40px;
  }
  .lightbox-nav.prev { left: 0.75rem; }
  .lightbox-nav.next { right: 0.75rem; }
  .lightbox-close { top: 1rem; right: 1rem; }
}
