/* Carousels (js/carousel.js): a native sideways scroller with scroll snapping, and previous/next buttons on its edges.
   Items per view come from the script as --carousel-per-view. The theme's item styles (margins, borders) are written
   against .carousel-slide .item in style.css, as they were against owl's .owl-item .item. */
.carousel {
  position: relative;
  --carousel-arrow-top: 50%;
  --carousel-arrow-inset: 0px;
}
.carousel-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none; /* the buttons, swiping and trackpads scroll it */
}
.carousel-track::-webkit-scrollbar {
  display: none;
}
@media (prefers-reduced-motion: no-preference) {
  .carousel-track {
    scroll-behavior: smooth;
  }
}
.carousel-track:focus-visible {
  outline: 3px solid var(--hs-button-blue);
  outline-offset: 2px;
}
.carousel-slide {
  flex: 0 0 calc(100% / var(--carousel-per-view, 1));
  min-width: 0;
  scroll-snap-align: start;
}
.carousel-slide[hidden] {
  display: none;
}
/* Too few items to fill the row: center them ($centerStudioCarousels for the studio's) */
.carousel--center.carousel--fits .carousel-track {
  justify-content: center;
}

/* Previous / next: a white circle with a Button Blue chevron, filled blue on hover and focus. Hidden at an end with
   nothing more that way, and both hidden when everything fits. */
.carousel-btn {
  position: absolute;
  top: var(--carousel-arrow-top);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  padding: 0;
  border: 2px solid var(--hs-button-blue);
  border-radius: 50%;
  background: #fff;
  color: var(--hs-button-blue);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
  cursor: pointer;
  transition: background-color .15s, color .15s, opacity .15s, visibility .15s;
}
.carousel-prev {
  left: var(--carousel-arrow-inset);
}
.carousel-next {
  right: var(--carousel-arrow-inset);
}
.carousel-btn:hover,
.carousel-btn:focus-visible {
  background: var(--hs-button-blue);
  color: #fff;
}
.carousel-btn:focus-visible,
.carousel-play:focus-visible {
  outline: 3px solid var(--hs-maroon);
  outline-offset: 2px;
}
.carousel-btn[disabled] {
  opacity: 0;
  visibility: hidden;
}
.carousel-btn[hidden],
.carousel-play[hidden] {
  display: none;
}
.carousel-btn svg,
.carousel-play svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Pause / play for carousels that advance on their own (banners) */
.carousel-play {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  cursor: pointer;
}
.carousel-play svg {
  width: 16px;
  height: 16px;
}
.carousel-play.is-paused svg {
  fill: currentColor;
}

/* Studio steps: arrows level with the design and chocolate images, not the middle of image + title */
.hdsStep .carousel {
  --carousel-arrow-top: 36%;
}
/* Banners: arrows just inside the image */
#category-desc-slider .carousel {
  --carousel-arrow-inset: 10px;
}
/* Product page thumbnails: smaller arrows over the small images */
.more-views .carousel-btn {
  width: 32px;
  height: 32px;
  margin-top: -16px;
}
.more-views .carousel-btn svg {
  width: 18px;
  height: 18px;
}
@media (max-width: 767px) {
  /* Studio carousels are inset 20px like the titles (style.css); the arrows sit centered on that margin */
  .hdsStep .carousel {
    --carousel-arrow-inset: -20px;
  }
}
