.znf-product-photo--clickable {
  cursor: zoom-in;
}

.shop-mp-pdp__main-image {
  cursor: zoom-in;
  border: none;
  padding: 0;
  background: transparent;
  width: 100%;
  display: block;
}

.shop-mp-pdp__main-image:focus-visible {
  outline: 2px solid var(--shop-primary, #f27a1a);
  outline-offset: 3px;
  border-radius: 0.75rem;
}

.product-image-lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgb(15 23 42 / 0.82);
  backdrop-filter: blur(8px);
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}

.product-image-lightbox-backdrop.is-open {
  display: flex;
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
  animation: shop-lightbox-in 0.22s ease;
}

body.shop-lightbox-open {
  overflow: hidden !important;
  touch-action: none;
}

@keyframes shop-lightbox-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.product-image-lightbox {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: min(98vw, 72rem);
  max-height: 96vh;
}

.product-image-lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
}

.product-image-lightbox-close {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  z-index: 5;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 6px 20px rgb(15 23 42 / 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.product-image-lightbox-close:hover {
  transform: scale(1.06);
  background: #fef2f2;
}

.product-image-lightbox-frame {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: min(92vw, 64rem);
  padding: 0.85rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 72px rgb(15 23 42 / 0.38);
}

.product-image-lightbox-frame.is-gallery .product-image-lightbox-viewport {
  cursor: ew-resize;
}

.product-image-lightbox-viewport {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: min(72vh, 34rem);
  max-height: calc(96vh - 7rem);
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(180deg, rgb(248 250 252) 0%, rgb(241 245 249) 100%);
  touch-action: pan-y pinch-zoom;
  user-select: none;
}

.product-image-lightbox-viewport.is-scrubbing .product-image-lightbox-hint {
  opacity: 1;
}

.product-image-lightbox-loading,
.product-image-lightbox-empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0;
  padding: 1rem;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  background: rgb(248 250 252 / 0.96);
}

.product-image-lightbox-loading[hidden],
.product-image-lightbox-empty[hidden],
.product-image-lightbox-img[hidden],
.product-image-lightbox-hint[hidden] {
  display: none !important;
}

.product-image-lightbox-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid rgb(226 232 240);
  border-top-color: var(--shop-primary, #0f766e);
  border-radius: 50%;
  animation: shop-lightbox-spin 0.75s linear infinite;
}

@keyframes shop-lightbox-spin {
  to { transform: rotate(360deg); }
}

.product-image-lightbox-img {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  max-height: calc(96vh - 8rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.product-image-lightbox-img.is-switching {
  opacity: 0.35;
  transform: scale(0.985);
}

.product-image-lightbox-hint {
  position: absolute;
  left: 50%;
  bottom: 0.85rem;
  z-index: 3;
  transform: translateX(-50%);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  background: rgb(15 23 42 / 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.product-image-lightbox-nav {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 6px 20px rgb(15 23 42 / 0.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.product-image-lightbox-nav:hover {
  transform: scale(1.06);
  background: #fff7ed;
}

.product-image-lightbox-nav[hidden] {
  display: none !important;
}

.product-image-lightbox-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.product-image-lightbox-dots[hidden] {
  display: none !important;
}

.product-image-lightbox-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.product-image-lightbox-dot.is-active {
  background: #fff;
  transform: scale(1.25);
}

.product-image-lightbox-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.product-image-lightbox-footer[hidden] {
  display: none !important;
}

.product-image-lightbox-counter {
  display: inline-flex;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.2);
  border: 1px solid rgb(255 255 255 / 0.28);
  color: #f8fafc;
  font-size: 0.76rem;
  font-weight: 700;
}

.product-image-lightbox-caption {
  margin: 0;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.14);
  color: #f8fafc;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: center;
  max-width: min(90vw, 42rem);
}

@media (max-width: 720px) {
  .product-image-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 2.35rem;
    height: 2.35rem;
    opacity: 0.92;
  }

  .product-image-lightbox-nav--prev {
    left: 0.35rem;
  }

  .product-image-lightbox-nav--next {
    right: 0.35rem;
  }

  .product-image-lightbox-stage {
    position: relative;
  }

  .product-image-lightbox-viewport {
    min-height: min(58vh, 22rem);
  }
}
