.product-gallery .glide__slide {
  height: auto;
}

.product-gallery__link {
  display: block;
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f6f6f6;
  cursor: zoom-in;
}

.product-gallery__link::before {
  content: "";
  display: block;
  padding-top: 100%;
}

.product-gallery .product-gallery__link img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

.product-gallery__link:focus-visible {
  outline: 3px solid #8cc63e;
  outline-offset: -3px;
}

.product-gallery-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: rgba(13, 15, 17, .97);
  color: #fff;
  z-index: 2147483647;
}

.product-gallery-viewer:not([open]) {
  display: none;
}

.product-gallery-viewer::backdrop {
  background: rgba(0, 0, 0, .7);
}

.product-gallery-viewer__toolbar {
  position: absolute;
  top: 12px;
  left: 24px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  z-index: 2;
}

.product-gallery-viewer__counter {
  font-size: 15px;
  line-height: 1.4;
}

.product-gallery-viewer__button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  background: rgba(30, 32, 34, .8);
  color: #fff;
  cursor: pointer;
  font: 32px/1 Arial, sans-serif;
}

.product-gallery-viewer__button:hover {
  background: #8cc63e;
  color: #141414;
}

.product-gallery-viewer__button:focus-visible {
  outline: 3px solid #8cc63e;
  outline-offset: 3px;
}

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

.product-gallery-viewer__stage {
  position: absolute;
  inset: 76px 80px 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.product-gallery-viewer__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

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

.product-gallery-viewer__previous,
.product-gallery-viewer__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.product-gallery-viewer__previous { left: 16px; }
.product-gallery-viewer__next { right: 16px; }

.product-gallery-viewer__caption {
  position: absolute;
  bottom: 16px;
  left: 80px;
  right: 80px;
  margin: 0;
  max-height: 42px;
  overflow: auto;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
}

.product-gallery-viewer__error {
  text-align: center;
  font-size: 16px;
}

@media (max-width: 576px) {
  .product-gallery-viewer__toolbar { left: 16px; right: 12px; }
  .product-gallery-viewer__stage { inset: 76px 12px 112px; }
  .product-gallery-viewer__previous,
  .product-gallery-viewer__next {
    top: auto;
    bottom: 58px;
    transform: none;
  }
  .product-gallery-viewer__previous { left: calc(50% - 64px); }
  .product-gallery-viewer__next { right: calc(50% - 64px); }
  .product-gallery-viewer__caption { left: 16px; right: 16px; bottom: 10px; }
}
