body.lightbox-open {
  overflow: hidden;
}

.gallery-main img.is-lightbox-trigger {
  cursor: zoom-in;
}

.product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
}

.product-lightbox[hidden] {
  display: none;
}

.product-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.92);
}

.product-lightbox__dialog {
  position: relative;
  width: min(94vw, 1320px);
  height: min(90vh, 900px);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 68px 1fr 68px;
  grid-template-rows: 1fr auto;
  background: rgba(17, 17, 17, 0.72);
  backdrop-filter: blur(4px);
  z-index: 1;
}

.product-lightbox__close,
.product-lightbox__nav,
.product-lightbox__toolbar button {
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.product-lightbox__close:hover,
.product-lightbox__nav:hover,
.product-lightbox__toolbar button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.product-lightbox__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 28px;
  line-height: 1;
  z-index: 3;
}

.product-lightbox__nav {
  grid-row: 1;
  align-self: center;
  justify-self: center;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  z-index: 2;
}

.product-lightbox__stage {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  user-select: none;
}

.product-lightbox__stage.is-zoomed {
  cursor: grab;
}

.product-lightbox__stage.is-panning {
  cursor: grabbing;
}

.product-lightbox__image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  transform-origin: center center;
  transition: transform 0.16s ease, opacity 0.16s ease;
  will-change: transform;
}

.product-lightbox__image.is-switching {
  opacity: 0.35;
}

.product-lightbox__toolbar {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.45);
}

.product-lightbox__toolbar button {
  min-width: 42px;
  height: 36px;
  font-size: 15px;
  font-weight: 600;
  padding: 0 10px;
}

.product-lightbox__counter {
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-left: 8px;
}

@media (max-width: 767px) {
  .product-lightbox__dialog {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    grid-template-columns: 56px 1fr 56px;
  }

  .product-lightbox__stage {
    padding: 14px;
  }

  .product-lightbox__toolbar {
    padding: 12px;
    gap: 8px;
  }
}
