html.vr-modal-open,
html.vr-modal-open body {
  overflow: hidden;
}

.vr-product-gallery__thumbs {
  flex-wrap: wrap;
  align-content: flex-start;
  max-width: 100%;
  overflow-x: visible;
}

.vr-product-gallery__thumb {
  flex: 0 0 76px;
}

.vr-product-variant__options {
  overflow: visible;
}

.vr-product-variant__swatch {
  position: relative;
}

.vr-product-variant__swatch::before,
.vr-product-variant__swatch::after {
  position: absolute;
  left: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition:
    opacity var(--dur-fast),
    transform var(--dur-fast);
  z-index: 40;
}

.vr-product-variant__swatch::before {
  content: attr(data-tooltip);
  bottom: calc(100% + 12px);
  max-width: 240px;
  padding: 8px 11px;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 8px;
  background: #fff;
  color: var(--slate-800);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.vr-product-variant__swatch::after {
  content: "";
  bottom: calc(100% + 6px);
  width: 10px;
  height: 10px;
  border-right: 1px solid rgba(226, 232, 240, .95);
  border-bottom: 1px solid rgba(226, 232, 240, .95);
  background: #fff;
  box-shadow: 5px 5px 12px rgba(15, 23, 42, .06);
  transform: translate(-50%, 6px) rotate(45deg);
}

.vr-product-variant__swatch:hover::before,
.vr-product-variant__swatch:hover::after,
.vr-product-variant__swatch:focus::before,
.vr-product-variant__swatch:focus::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.vr-product-variant__swatch:hover::after,
.vr-product-variant__swatch:focus::after {
  transform: translate(-50%, 0) rotate(45deg);
}

.vr-product-gallery-modal[hidden] {
  display: none !important;
}

.vr-product-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.vr-product-gallery-modal__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  border: 0;
  background: rgba(15, 23, 42, .86);
  cursor: zoom-out;
}

.vr-product-gallery-modal__frame {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(1120px, 94vw);
  max-height: 88vh;
}

.vr-product-gallery-modal__frame img {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .32);
}

.vr-product-gallery-modal__close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  color: var(--slate-800);
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
}

.vr-product-gallery-modal__close:hover,
.vr-product-gallery-modal__close:focus {
  color: var(--accent);
  outline: none;
}

@media (max-width: 640px) {
  .vr-product-gallery-modal {
    padding: 18px;
  }

  .vr-product-gallery-modal__close {
    top: 12px;
    right: 12px;
  }
}
