/* Product gallery + lightbox (clean storefront) */
.pp-gallery {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
}

@media (max-width: 680px) {
  .pp-gallery {
    grid-template-columns: 1fr;
  }
}

.pp-thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 680px) {
  .pp-thumbs {
    flex-direction: row;
    order: 2;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .pp-thumbs::-webkit-scrollbar {
    display: none;
  }
}

.pp-thumb {
  width: 88px;
  height: 88px;
  border: 2px solid transparent;
  background: #f5f6f8;
  overflow: hidden;
  cursor: pointer;
  flex: 0 0 88px;
  transition: border-color 0.15s ease;
  padding: 0;
}

.pp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pp-thumb:hover {
  border-color: var(--teal, #16b3a5);
}

.pp-thumb.is-active {
  border-color: var(--navy, #0e1626);
}

.pp-main-img {
  position: relative;
  background: #f5f6f8;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line, #e6e8ed);
  cursor: zoom-in;
  touch-action: pan-y pinch-zoom;
}

.pp-main-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.pp-main-img .pp-zoom-pane {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: 200%;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

.pp-main-img.is-lens-active img {
  opacity: 0;
}

.pp-main-img.is-lens-active .pp-zoom-pane {
  opacity: 1;
}

@media (max-width: 1023px) {
  .pp-main-img .pp-zoom-pane {
    display: none !important;
  }

  .pp-main-img.is-lens-active img {
    opacity: 1;
  }
}

.pp-main-img .ph {
  font-size: 120px;
  opacity: 0.18;
}

.pp-main-img .pmi-tags {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 4;
  pointer-events: none;
}

.pp-main-img .pmi-zoom {
  position: absolute;
  bottom: 14px;
  inset-inline-end: 14px;
  width: 40px;
  height: 40px;
  background: #fff;
  border: 1px solid var(--line, #e6e8ed);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink, #0e1626);
  cursor: zoom-in;
  z-index: 4;
}

.pp-main-img .pmi-zoom:hover {
  background: var(--navy, #0e1626);
  color: #fff;
  border-color: var(--navy, #0e1626);
}

/* Lightbox */
.lb-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  overscroll-behavior: contain;
}

.lb-modal.is-on {
  display: flex;
}

.lb-modal[aria-hidden='false'] {
  display: flex;
}

.lb-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(92vw, 1200px);
  max-height: 88vh;
  touch-action: none;
  overflow: hidden;
}

.lb-modal .lb-img {
  max-width: min(92vw, 1200px);
  max-height: 88vh;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.lb-modal .lb-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  inset-inline-end: 16px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 24px;
  z-index: 2;
}

.lb-modal .lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 22px;
  z-index: 2;
}

.lb-modal .lb-prev {
  inset-inline-start: 16px;
}

.lb-modal .lb-next {
  inset-inline-end: 16px;
}

.lb-modal .lb-counter {
  position: absolute;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 600;
}

/* No-JS: hide zoom chrome */
html.no-js .pmi-zoom {
  display: none;
}
