.block-product-image {
  width: 100%;
  min-width: 0;
}

.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 > a {
  position: absolute;
  inset: 0;
  display: block;
}
@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__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.block-product-image__media.is-active {
  z-index: 1;
  opacity: 1;
}

.block-product-image__media > .block-product-image__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: var(--fit-type);
  pointer-events: none;
}

.block-product-image__media-thumbnails {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin-block-start: 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.block-product-image__media-thumbnails::-webkit-scrollbar {
  display: none;
}

.block-product-image__media-thumbnail {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #f8fafb;
  border: 1px solid transparent;
  border-radius: 2px;
}

.block-product-image__media-thumbnail[aria-pressed="true"] {
  border-color: #173a5e;
}

.block-product-image__media-thumbnail:focus-visible {
  outline: 2px solid rgba(23, 58, 94, 0.55);
  outline-offset: 2px;
}

.block-product-image__media-thumbnail-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 959px) {
  .block-product-image__media-thumbnail {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .block-product-image__image-wrapper > .block-product-image__image,
  .block-product-image__media {
    transition: none;
  }
}
