/* Lightbox overlay */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  cursor: zoom-out;
}

.lightbox-overlay.lightbox-active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  cursor: default;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.lightbox-active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s;
  z-index: 1;
}

.lightbox-close:hover {
  opacity: 1;
}

/* Cursor hint on clickable images in prose */
.prose img:not(a img) {
  cursor: zoom-in;
}

/* ─── Product gallery lightbox ─── */
.product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  cursor: zoom-out;
}

.product-lightbox--active {
  opacity: 1;
  visibility: visible;
}

.product-lightbox__img {
  max-width: 85vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  cursor: default;
  transform: scale(0.95);
  transition: transform 0.25s ease, opacity 0.25s ease;
  user-select: none;
  position: relative;
  z-index: 2;
}

.product-lightbox--active .product-lightbox__img {
  transform: scale(1);
}

.product-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
  z-index: 1;
}

.product-lightbox__close:hover {
  opacity: 1;
}

.product-lightbox__prev,
.product-lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: oklch(0.15 0 0 / 0.6);
  backdrop-filter: blur(4px);
  border: 1px solid oklch(0.4 0 0 / 0.3);
  color: #fff;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s, background 0.15s;
  z-index: 1;
}

.product-lightbox__prev { left: 1.5rem; }
.product-lightbox__next { right: 1.5rem; }

.product-lightbox__prev:hover,
.product-lightbox__next:hover {
  opacity: 1;
  background: oklch(0.5 0.15 30 / 0.6);
}

.product-lightbox__counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: oklch(0.15 0 0 / 0.6);
  backdrop-filter: blur(4px);
  color: oklch(0.8 0 0);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.375rem 1rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .product-lightbox__prev,
  .product-lightbox__next {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.875rem;
  }
  .product-lightbox__prev { left: 0.75rem; }
  .product-lightbox__next { right: 0.75rem; }
}
