.c-product {
  --product-box-color: var(--gray);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.c-product__images {
  position: relative;
  z-index: 4;
  margin-bottom: 1.2rem;
  text-align: center;
}

.c-product-images {
  position: relative;
  z-index: 5;
  height: 100%;
}

.c-product-images__link {
  display: block;
  height: 100%;
  color: inherit;
}

.c-product-images ul {
  display: flex;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: auto hidden;
  list-style: none;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
}

.c-product-images ul::-webkit-scrollbar {
  height: .1rem;
}

.c-product-images ul::-webkit-scrollbar-track {
  background-color: rgba(217, 217, 217, .3);
}

.c-product-images ul::-webkit-scrollbar-thumb {
  background-color: var(--darkgreen);
}

.c-product-images ul::-webkit-scrollbar-thumb:hover {
  background-color: var(--gray);
}

.c-product-images li {
  flex: 1 0 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  background: none;
  scroll-snap-align: center;
}

.c-product-images picture {
  display: block;
  aspect-ratio: 1 / 1;
  line-height: 0;
}

.c-product-images picture img,
.c-product-images img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.c-product-images__prev,
.c-product-images__next {
  position: absolute;
  z-index: 10;
  top: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  padding: 0;
  line-height: 0;
  cursor: pointer;
  transition: opacity var(--t), visibility var(--t);
  transform: translateY(-50%);
  opacity: 1;
  color: var(--darkgreen);
  border-width: 0;
  background-color: transparent;
  box-shadow: none;
  pointer-events: auto;
  appearance: none;
}

.c-product-images__prev {
  left: 0;
}

.c-product-images__next {
  right: 0;
}

.c-product-images__prev .w-icon,
.c-product-images__next .w-icon,
.c-product-images__prev .svg-icon,
.c-product-images__next .svg-icon {
  width: 2rem;
  height: 2rem;
}

.c-product-images__prev.is-disabled,
.c-product-images__next.is-disabled {
  cursor: not-allowed;
  opacity: .5;
}

.c-product-images.has-multiple .c-product-images__prev,
.c-product-images.has-multiple .c-product-images__next,
.c-product-images:has(li:nth-child(2)) .c-product-images__prev,
.c-product-images:has(li:nth-child(2)) .c-product-images__next {
  display: flex;
}

@media (min-width: 1024px) {
  .c-product__images {
    position: static;
    aspect-ratio: 448 / 250;
  }

  .c-product-images {
    position: absolute;
    inset: 0 0 -1px;
  }

  .c-product-images ul,
  .c-product-images li,
  .c-product-images a {
    height: 100%;
  }

  .c-product-images li:first-child picture {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 75%;
  }

  .c-product-images li:first-child picture img {
    max-width: 25rem;
    max-height: 25rem;
  }

  .c-product-images picture {
    width: 100%;
    height: 100%;
    margin: 0 auto;
    padding: 0;
    aspect-ratio: initial;
  }

  .no-touch .c-product-images__prev,
  .no-touch .c-product-images__next {
    opacity: 0;
  }

  .no-touch .c-product:hover .c-product-images__prev,
  .no-touch .c-product:hover .c-product-images__next,
  .c-product-images:focus-within .c-product-images__prev,
  .c-product-images:focus-within .c-product-images__next {
    opacity: 1;
  }

  .no-touch .c-product:hover .c-product-images__prev.is-disabled,
  .no-touch .c-product:hover .c-product-images__next.is-disabled {
    opacity: .5;
  }
}
