#main-image {
  display: flex;
  width: 100%;
  aspect-ratio: 1;

  background-repeat: no-repeat;
  background-origin: content-box;
  background-clip: padding-box;
  box-sizing: border-box;
}

.custom-product-images .gallery-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.custom-product-images img {
  max-width: 100%;
  max-height: 100%;
  mix-blend-mode: multiply;
}

.custom-product-images .gallery-container .wrapper {
  display: inline-flex;
  justify-content: center;
  align-items: center;

  width: 25%;
  /* min-width: 120px; */
  aspect-ratio: 1;
  padding: .5em;
  box-sizing: border-box;

  opacity: .5;
  cursor: pointer;
}

.custom-product-images .gallery-container img {
  max-width: 100%;
  max-height: 100%;

  transition: ease-in-out;
}

.custom-product-images .gallery-container .active-img {
  opacity: 1;
}


/* Modal */
.custom-img-modal-overlay {

  display: none;
  justify-content: center;
  align-items: center;

  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  background-color: #000b;
  width: 100%;
  height: 100vh;
}

.custom-img-modal-overlay .custom-modal {
  display: flex;
  justify-content: center;
  align-items: center;

  background-color: #fff;
  --size: min(calc(100vh - 100px), 100vw);
  width: var(--size);
  height: var(--size);
}


.custom-img-modal-overlay .custom-modal .custom-modal-img {
  width: 100%;
  height: 100%;

  background-repeat: no-repeat;
  background-origin: content-box;
  background-clip: padding-box;
  box-sizing: border-box;
}

.custom-img-modal-overlay .custom-modal-button {
  position: absolute;
  font-size: 3em;
  color: #ccc;
  cursor: pointer;
  user-select: none;
}

.custom-img-modal-overlay .custom-modal-button:hover {
  color: #eee;
}

.custom-img-modal-overlay .custom-modal-navigation {
  padding: .5em 3%;
  font-size: 5em;
}

.custom-img-modal-overlay .custom-modal-navigation.left {
  left: 0;
}

.custom-img-modal-overlay .custom-modal-navigation.right {
  right: 0;
}

.custom-img-modal-overlay .close-modal {
  padding: .1em .5em;
  right: 0;
  top: 0;
}