/* ===== PDP Lightbox Overlay ===== */

.pdp-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.pdp-lightbox.is-open {
  display: flex;
}

.pdp-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 0;
}

.pdp-lightbox__counter {
  position: absolute;
  top: 16px;
  left: 20px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  letter-spacing: 0.05em;
  z-index: 1;
  pointer-events: none;
}

.pdp-lightbox__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  padding: 0;
}

.pdp-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.pdp-lightbox__close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.pdp-lightbox__stage {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 1;
  max-width: 92vw;
}

.pdp-lightbox__image {
  max-width: min(80vw, 900px);
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  display: block;
  min-width: 0;
}

.pdp-lightbox__arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

@media (max-width: 600px) {
  .pdp-lightbox__stage {
    gap: 0;
    justify-content: center;
  }

  .pdp-lightbox__image {
    max-width: 92vw;
    max-height: 70vh;
  }

  .pdp-lightbox__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(0, 0, 0, 0.45);
  }

  .pdp-lightbox__arrow--prev { left: 8px; }
  .pdp-lightbox__arrow--next { right: 8px; }
}

.pdp-lightbox__arrow:hover {
  background: rgba(255, 255, 255, 0.22);
}

.pdp-lightbox__arrow:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.pdp-lightbox__filmstrip {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 90vw;
  overflow-x: auto;
  padding: 4px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.pdp-lightbox__filmstrip::-webkit-scrollbar {
  height: 6px;
}

.pdp-lightbox__filmstrip::-webkit-scrollbar-track {
  background: transparent;
}

.pdp-lightbox__filmstrip::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.pdp-lightbox__film-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity 0.15s, border-color 0.15s;
  background: none;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp-lightbox__film-thumb:hover {
  opacity: 0.8;
}

.pdp-lightbox__film-thumb.is-active {
  border-color: #fff;
  opacity: 1;
}

/* Cursor hint on clickable product images */
.bab-pdp__gallery-image,
.bab-pdp__carousel-slide img,
[data-merch-main-image] {
  cursor: zoom-in;
}
