.carousel-wrapper {
  container-name: imageCarousel;
  container-type: inline-size;
}

.product-image-carousels {
  --main-image-width: 100%;
  --main-image-max-height: 600px;
  --thumbnail-track-width: 90px;
  --thumbnail-height: 79px;

  display: flex;
  justify-content: center;
}

/**
  Thumbnails carousel
*/
.thumbnails-slider {
  width: var(--thumbnail-track-width);
  padding-top: 30px;
  margin-right: 5px;
  margin-bottom: 0;
  /** Previous/next buttons */
  /** Single thumbnail */
}
.thumbnails-slider button {
  height: 30px;
  width: 100%;
  padding: 0;
  margin: 0;
  font-size: 30px;
  color: rgba(0, 0, 0, 0.7);
}
.thumbnails-slider .thumbnail-button:not([disabled]):hover {
  background-color: rgba(0, 0, 0, 0.1);
  color: black;
}


.thumbnails-slider .thumbnail-button {
  display: block;
  height: var(--thumbnail-height) !important;
  cursor: pointer;
  border: 0;
  background: none;
  background-color: rgba(0, 0, 0, 0.4);
  transition: opacity 0.1s linear;
}
.thumbnails-slider .thumbnail-button:focus img, .thumbnails-slider .thumbnail-button:hover img, .thumbnails-slider .thumbnail-button[aria-current=true] img {
  opacity: 1;
  filter: grayscale(0);
}
.thumbnails-slider .thumbnail-button:focus img {
  outline: 3px dashed white;
  outline-offset: -4px;
}
.thumbnails-slider .thumbnail-button img {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.3;
  -o-object-fit: cover;
     object-fit: cover;
  filter: grayscale(0.6);
  transition: all 0.1s linear;
}

/**
  Main image carousel
*/
.main-image-slider {
  position: relative;
  width: calc(var(--main-image-width) - var(--thumbnail-track-width) - 5px);

  max-height: var(--main-image-max-height);
  aspect-ratio: 16/9;
  position: relative;
  margin-bottom: 1px;
  /** Previous/next buttons */
  /** Slides */
}
.main-image-slider button {
  z-index: 1;
}

.main-image-slider .slick-slide {
  width: var(--main-image-width);
}
.main-image-slider .slick-slide .image-link {
  max-height: var(--main-image-max-height);
  aspect-ratio: 16/9;
  transition: outline 0.1s linear;

  position: relative;
}
.main-image-slider .slick-slide .image-link:focus {
  outline: 4px dashed white;
  outline-offset: -7px;
}
.main-image-slider .slick-slide .image-link img {
  display: block;
  -o-object-fit: cover;
     object-fit: cover;
  width: 100%;
  height: 100%;
}



.image-gallery__button {
  background-color: hsl(0, 0%, 0%, 0.7);
  transition: background-color 0.3s ease;
  border: 0;

  &:is(:hover, :focus) {
    background-color: hsl(0, 0%, 0%, 1);
  }

  & svg {
    fill: #fff;
  }
}


.image-gallery__button--main-prev,
.image-gallery__button--main-next {
  position: absolute;
  top: calc(50% - 17px);
}


.image-gallery__button--main-prev {
  left: 10px;
}

.image-gallery__button--main-next {
  right: 10px;
}

:where(.image-gallery__button--side-prev, .image-gallery__button--side-next) svg {
  rotate: 90deg;
  margin-inline: auto;
}

.main-image-text {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 1rem 4rem;
  background-color: hsl(0deg 0% 0% / 60%);
  color: #fff;

  & a {
    color: #fff !important;
    font-weight: bold;
    text-decoration: underline;
  }

  & .clamp {
    margin-bottom: 0;
  }
}

.product-image-carousels .slick-dots li button .slick-dot-icon,
.product-image-carousels .slick-dots li.slick-active button .slick-dot-icon {
  color: #295D92;
}

.product-image-carousels .slick-dots li.slick-active button:is(:focus, :hover) .slick-dot-icon,
.product-image-carousels .slick-dots li button:focus .slick-dot-icon:before {
  color: #137FAA;
}

.product-image-carousels .slick-dotted {
  margin-bottom: 0;
}

.product-image-carousels .slick-dots {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;

  position: relative;
  bottom: 0;

  & li {
    display: grid;
    place-items: center;
    margin: 0;
  }

  & li button {
    height: auto;
    width: auto;
    margin-top: 0;
    margin-left: 0;
  }
}


.product-image-carousels {




  & .slick-dots li.slick-active button .slick-dot-icon:before,
  & .slick-dots li button .slick-dot-icon:before {
    font-size: 40px;
  }

  & .slick-dots li.slick-active button .slick-dot-icon:before {
    margin-top: 0;
    margin-left: 0;
  }

  & .slick-dots li button .slick-dot-icon:before {
    line-height: normal;
    position: relative;


    margin-top: 0;
    margin-left: 0;
    line-height: .5;
    height: 100%;
    display: block;


  }

}

  .main-image-text {
    padding: 1rem 1.5rem;

    & .clamp {
      /*--Only shows the top 4 lines --*/
      --line-clamp: 4;
      display: -webkit-box;
      -webkit-line-clamp: var(--line-clamp);
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
  }

@container imageCarousel (width > 675px) {

  .product-image-carousels .slick-dots{
    display: none !important;
  }


}


@container imageCarousel (width <= 675px) {


  .main-image-text .clamp {
    --line-clamp: 3;
  }




  .thumbnails-slider {
    display: none;
  }

  .main-image-slider {
    position: relative;
    width: calc(var(--main-image-width));
  }


}

@container imageCarousel (width <= 600px) {
  .main-image-slider,
  .main-image-slider .slick-slide .image-link {
    height: clamp(300px, 50vw, 400px);
    aspect-ratio: auto;
  }
}


/******************************************************************
  Targeting the display within the CMS to display correctly
******************************************************************/
.iw_component-wrapper .product-image-carousels {
  overflow: hidden;
}

.iw_component-wrapper .product-image-carousels .image-link img {
  width: 100%;
  height: auto;

}