.catalyst-carousel{
  width: 100%;
  overflow: hidden;
  height: clamp(240px, 40vh, 600px);
}

.catalyst-carousel__track{
  display: flex;
  height: 100%;
  width: max-content; /* important: track can be wider than viewport */
  align-items: flex-end;
}

.catalyst-carousel__group{
  display: flex;
  height: 100%;
  align-items: flex-end;
  gap: 0px;
  will-change: transform;
  animation: catalystCarouselMarquee 28s linear infinite;
}

/* slides unchanged */
.catalyst-carousel__slide{
  height: var(--slide-h, 100%);
  width: clamp(220px, 40vh, 600px);
  flex: 0 0 auto;
  margin: 0;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  overflow: hidden;
}

.catalyst-carousel__slide img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* The key: move one full group width */
@keyframes catalystCarouselMarquee{
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

.catalyst-carousel:hover .catalyst-carousel__group{
  /* animation-play-state: paused; */
}

@media (prefers-reduced-motion: reduce){
  .catalyst-carousel__group{ animation: none; }
}