.block-product-image__layer-wrapper {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@layer theme {
  .block-product-image__layer-wrapper * {
    pointer-events: auto;
  }
}
.block-product-image__layer-image-wrapper {
  position: relative;
  display: flex;
  width: 100%;
  padding: var(--padding);
  overflow: hidden;
}
.block-product-image__layer-image-wrapper.has-thumbnail-strip {
  flex-direction: column;
  gap: 8px;
}
.block-product-image__layer-image-wrapper > a {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 1;
}
@media (min-width: 960px) {
  .block-product-image__layer-image-wrapper.desktop-hover:hover
    .block-product-image__image:nth-of-type(1) {
    opacity: 0;
  }

  .block-product-image__layer-image-wrapper.desktop-hover:hover
    .block-product-image__image:nth-of-type(2) {
    opacity: 1;
  }
}
@media (max-width: 959px) {
  .block-product-image__layer-image-wrapper.mobile-hover:hover
    .block-product-image__image:nth-of-type(1) {
    opacity: 0;
  }

  .block-product-image__layer-image-wrapper.mobile-hover:hover
    .block-product-image__image:nth-of-type(2) {
    opacity: 1;
  }
}
.block-product-image__image-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  aspect-ratio: var(--aspect-ratio);
  overflow: hidden;
  pointer-events: none;
  background-color: rgb(var(--color-media-background));
  border-radius: var(--border-radius);
}
@layer theme {
  .block-product-image__image-wrapper * {
    pointer-events: auto;
  }
}
.block-product-image__image-wrapper > svg {
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.block-product-image__image-wrapper > .block-product-image__image {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  object-fit: var(--fit-type);
  transition: 1s;
}
.block-product-image__image-wrapper > .block-product-image__image * {
  pointer-events: all;
}
.block-product-image__image-wrapper
  > .block-product-image__image:nth-of-type(1) {
  opacity: 1;
}
.block-product-image__image-wrapper
  > .block-product-image__image:nth-of-type(2) {
  opacity: 0;
}

.block-product-image__gallery-frame {
  position: absolute;
  inset: 0;
  display: flex;
  opacity: 0;
  transition: opacity 180ms ease;
}

.block-product-image__gallery-frame.is-active {
  opacity: 1;
}

.block-product-image__gallery-image {
  width: 100%;
  height: 100%;
  pointer-events: none;
  object-fit: var(--fit-type);
}

.block-product-image__thumbnails {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(var(--thumbnail-count, 4), minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.block-product-image__thumbnail {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  padding: 2px;
  overflow: hidden;
  cursor: pointer;
  background: rgb(var(--color-media-background));
  border: 1px solid rgba(var(--color-text), 0.12);
  border-radius: 5px;
}

.block-product-image__thumbnail:hover,
.block-product-image__thumbnail.is-active {
  border-color: rgb(var(--color-text));
}

.block-product-image__thumbnail:focus-visible {
  outline: 2px solid rgb(var(--color-text));
  outline-offset: 2px;
}

.block-product-image__thumbnail-image {
  width: 100%;
  height: 100%;
  pointer-events: none;
  object-fit: contain;
}

@media (max-width: 959px) {
  .block-product-image__layer-image-wrapper.has-thumbnail-strip {
    gap: 5px;
  }

  .block-product-image__thumbnails {
    gap: 4px;
  }
}
