/* Shared product image gallery + lightbox (detail page + product panel) */

.product-gallery-cover {
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
  user-select: none;
  position: relative;
}
.product-gallery-cover.has-multi {
  cursor: grab;
}
.product-gallery-cover:focus-visible {
  outline: 2px solid var(--gold, #AB7743);
  outline-offset: 3px;
}
.product-gallery-cover img {
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.product-gallery-zoom-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 5;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.product-gallery-cover:hover .product-gallery-zoom-hint {
  opacity: 1;
}

.product-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(10, 8, 6, 0.45);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, opacity 0.15s;
  opacity: 0.75;
}
.product-gallery-nav:hover,
.product-gallery-nav:focus-visible {
  opacity: 1;
  background: rgba(10, 8, 6, 0.65);
}
.product-gallery-prev { left: 8px; }
.product-gallery-next { right: 8px; }

.product-gallery-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 6px;
  pointer-events: none;
}
.product-gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.product-gallery-dot.is-active {
  background: #fff;
  transform: scale(1.15);
}

.product-gallery-counter {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 5;
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 8px;
  border-radius: 980px;
  pointer-events: none;
}

.product-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}
.product-gallery-thumbs:not(.has-thumbs),
.product-gallery-thumbs[hidden] {
  display: none;
}

.product-gallery-thumb {
  width: 52px;
  height: 68px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: var(--card, #f7f5f0);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.product-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}
.product-gallery-thumb:hover {
  border-color: rgba(184, 134, 11, 0.45);
}
.product-gallery-thumb.is-active {
  border-color: var(--gold, #AB7743);
  box-shadow: 0 0 0 1px rgba(184, 134, 11, 0.25);
}
.product-gallery-thumb:focus-visible {
  outline: 2px solid var(--gold, #AB7743);
  outline-offset: 2px;
}

/* Lightbox — readable abstracts: scrollable stage + zoom */
.product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s;
}
.product-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.product-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 6, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: zoom-out;
}

.product-lightbox-stage {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  margin: 52px 56px 72px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  touch-action: pan-y;
}

.product-lightbox-figure {
  position: relative;
  margin: 0 auto;
  max-width: min(1100px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px 0 24px;
}
.product-lightbox-img {
  max-width: 100%;
  width: auto;
  height: auto;
  /* Prefer natural size for abstract text; stage scrolls for tall pages */
  max-height: none;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  background: #f7f3ea;
  -webkit-user-drag: none;
  user-select: none;
  cursor: zoom-in;
}
.product-lightbox-img.is-zoomed {
  /* width set inline as % of figure for scrollable enlarge */
  height: auto;
}

.product-lightbox-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: 'Outfit', sans-serif;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  padding: 0 12px;
}
.product-lightbox-counter {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.product-lightbox-hint {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.product-lightbox-tools {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 980px;
  background: rgba(20, 16, 12, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.product-lightbox-tool {
  min-width: 40px;
  height: 36px;
  padding: 0 12px;
  border: none;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.product-lightbox-tool:hover {
  background: rgba(255, 255, 255, 0.2);
}

.product-lightbox-close,
.product-lightbox-nav {
  position: absolute;
  z-index: 2;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.product-lightbox-close:hover,
.product-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}
.product-lightbox-close {
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
}
.product-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-lightbox-prev { left: 12px; }
.product-lightbox-next { right: 12px; }
.product-lightbox-nav[hidden] { display: none; }

@media (max-width: 600px) {
  .product-lightbox-stage {
    margin: 52px 8px 68px;
  }
  .product-lightbox-nav {
    width: 38px;
    height: 38px;
    font-size: 24px;
  }
  .product-lightbox-prev { left: 4px; }
  .product-lightbox-next { right: 4px; }
  .product-gallery-thumb {
    width: 44px;
    height: 58px;
  }
  .product-lightbox-hint {
    font-size: 10px;
  }
  .product-gallery-nav {
    width: 40px;
    height: 40px;
    font-size: 24px;
    opacity: 0.9;
  }
  .product-gallery-zoom-hint {
    /* keep clear of counter / dots */
    right: 10px;
    bottom: 36px;
  }
}
