html.is-product-gallery-open,
body.is-product-gallery-open {
  overflow: hidden;
}

.is-zoomable-gallery-slide {
  position: relative;
}

.is-zoomable-gallery-slide:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: -4px;
}

.product-gallery-zoom-indicator {
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--white);
  background-color: rgba(255, 255, 255, 0.08);
  pointer-events: none;
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  cursor: zoom-in;
  transform: scale(1);
  transform-origin: center;
  transition: transform 0.22s ease, background-color 0.22s ease, border-color 0.22s ease;
  will-change: transform;
}

.is-zoomable-gallery-slide:hover .product-gallery-zoom-indicator,
.is-zoomable-gallery-slide:focus-visible .product-gallery-zoom-indicator {
  background-color: rgba(255, 255, 255, 0.18);
  transform: scale(1.12);
}

.product-gallery-zoom-indicator::before,
.product-gallery-zoom-indicator::after {
  content: '';
  background-color: var(--white);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.product-gallery-zoom-indicator::before {
  width: 0.75rem;
  height: 1px;
}

.product-gallery-zoom-indicator::after {
  width: 1px;
  height: 0.75rem;
}

.product-gallery-popup {
  background-color: var(--white);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.product-gallery-popup.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.product-gallery-popup-dialog {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 5.5rem 2rem 2rem;
}

.product-gallery-popup-grid {
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
  display: flex;
  flex-flow: column;
  gap: 1.25rem;
  will-change: transform, opacity;
}

.product-gallery-popup-row {
  width: 100%;
  align-items: flex-start;
}

.product-gallery-popup-row.is-wide-row {
  display: block;
}

.product-gallery-popup-row.is-two-column-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-gallery-popup-row.is-two-column-row.is-single-portrait .product-gallery-popup-item {
  grid-column: 1 / -1;
  width: min(32rem, calc((100% - 1.25rem) / 2));
  justify-self: center;
}

.product-gallery-popup-item {
  overflow: hidden;
}

.product-gallery-popup-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.product-gallery-popup-row.is-wide-row .product-gallery-popup-item {
  width: 100%;
}

.product-gallery-popup-row.is-two-column-row .product-gallery-popup-item {
  width: 100%;
  height: auto;
}

.product-gallery-popup-row.is-single-item .product-gallery-popup-item,
.product-gallery-popup-row.is-single-item .product-gallery-popup-image {
  width: 100%;
  height: auto;
}

.product-gallery-popup-close {
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--black);
  background-color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  padding: 0;
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  transition: transform 0.22s ease, background-color 0.22s ease;
}

.product-gallery-popup-close:hover,
.product-gallery-popup-close:focus-visible {
  background-color: rgba(255, 255, 255, 1);
  transform: scale(1.04);
}

.product-gallery-popup-close span {
  width: 1.125rem;
  height: 1px;
  background-color: var(--black);
  position: absolute;
  top: 50%;
  left: 50%;
}

.product-gallery-popup-close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.product-gallery-popup-close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.product-gallery-popup-close:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

@media screen and (max-width: 767px) {
  .product-gallery-zoom-indicator {
    top: 0.5rem;
    right: 0.5rem;
  }

  .product-gallery-popup-dialog {
    padding: 4.75rem 1rem 1rem;
  }

  .product-gallery-popup-grid {
    gap: 1rem;
  }

  .product-gallery-popup-row {
    display: block;
    gap: 1rem;
  }

  .product-gallery-popup-row.is-two-column-row {
    grid-template-columns: 1fr;
  }

  .product-gallery-popup-close {
    width: 2.75rem;
    height: 2.75rem;
    top: 1rem;
    right: 1rem;
  }
}
