/*
 * Horizontally-scrolling product row (the "Deals for you" pattern). Works
 * with no JavaScript at all — overflow-x:auto is native browser behaviour,
 * reachable by touch swipe, trackpad, or shift+wheel. The prev/next arrow
 * buttons are a JS-only convenience layered on top; main.js hides them
 * automatically when JS can't run, so nothing dead-ends without it.
 */
.carousel {
  position: relative;
}

.carousel__track {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-block: var(--space-1);
  scrollbar-width: none;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__item {
  flex: 0 0 240px;
  scroll-snap-align: start;
}

.carousel__arrow {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  font-size: 1.25rem;
  line-height: 1;
  color: var(--color-text);
  align-items: center;
  justify-content: center;
}

.carousel__arrow:hover {
  color: var(--color-brand);
  border-color: var(--color-brand);
}

.carousel__arrow--prev {
  left: -18px;
}

.carousel__arrow--next {
  right: -18px;
}

.js-enhanced .carousel__arrow {
  display: flex;
}

.home-band--dark .carousel__arrow {
  background: var(--color-bg);
  color: var(--color-text);
}

@media (max-width: 640px) {
  .carousel__item {
    flex-basis: 168px;
  }

  .carousel__arrow {
    display: none !important;
  }
}
