/* Seamless catalogue shelves: two equal ten-card laps share one fixed speed. */
.catalog-shelf-viewport {
  overflow: hidden;
}

.catalog-shelf-track {
  --catalog-shelf-gap: 17px;
  display: flex;
  align-items: stretch;
  gap: 0;
  width: max-content;
  transform: translate3d(0, 0, 0);
  animation-name: catalog-shelf-seamless-loop;
  animation-duration: var(--catalog-shelf-duration, 46s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
  backface-visibility: hidden;
}

.catalog-shelf-track--reverse {
  animation-direction: reverse;
}

.catalog-shelf-lap {
  display: flex;
  align-items: stretch;
  flex: 0 0 auto;
  gap: var(--catalog-shelf-gap);
  padding-inline-end: var(--catalog-shelf-gap);
}

.catalog-shelf-track:focus-within {
  animation-play-state: paused;
}

@keyframes catalog-shelf-seamless-loop {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(50%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .catalog-shelf-viewport {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-mask-image: none;
    mask-image: none;
    scrollbar-width: thin;
  }

  .catalog-shelf-track {
    animation: none !important;
    transform: none;
    will-change: auto;
  }

  .catalog-shelf-lap--clone {
    display: none;
  }
}
