.small-banners {
  --small-banners-accent: #e4002b;
  --small-banners-gap: 10px;
  --small-banners-visible: 8;
  position: relative;
  width: 100%;
  min-width: 0;
  margin: 24px 0 32px;
}

.small-banners *,
.small-banners *::before,
.small-banners *::after {
  box-sizing: border-box;
}

.small-banners__viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y pinch-zoom;
  -webkit-overflow-scrolling: touch;
  cursor: default;
}

.small-banners__viewport::-webkit-scrollbar {
  display: none;
}

.small-banners.is-dragging .small-banners__viewport {
  scroll-behavior: auto;
  scroll-snap-type: none;
  user-select: none;
}

.small-banners.is-wheel-scrolling .small-banners__viewport {
  scroll-behavior: auto;
  scroll-snap-type: none;
}

.small-banners__track {
  display: flex;
  align-items: stretch;
  width: 100%;
  gap: var(--small-banners-gap);
}

.small-banners__slide {
  flex: 0 0 calc((100% - 70px) / 8);
  min-width: 0;
  scroll-snap-align: start;
}

.small-banners__item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 84 / 149;
  overflow: hidden;
  border-radius: 12px;
  background: #ececef;
  color: inherit;
}

.small-banners.is-scrollable .small-banners__item {
  cursor: grab;
}

.small-banners.is-scrollable.is-dragging .small-banners__item {
  cursor: grabbing;
}

.small-banners__skeleton {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #ececef;
}

.small-banners__skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 25%,
    rgba(255, 255, 255, 0.7) 45%,
    transparent 65%
  );
  transform: translateX(-100%);
  animation: small-banners-shimmer 1.5s infinite;
}

.small-banners__image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.small-banners__item.is-loaded .small-banners__image {
  opacity: 1;
}

.small-banners__item.is-loaded .small-banners__skeleton {
  display: none;
}

.small-banners__arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid #dfe2e7;
  border-radius: 50%;
  background: #fff;
  color: #252a35;
  box-shadow: 0 4px 16px rgba(20, 24, 34, 0.12);
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;
}

.small-banners__arrow--prev {
  left: 8px;
}

.small-banners__arrow--next {
  right: 8px;
}

.small-banners__arrow:hover,
.small-banners__arrow:focus-visible {
  border-color: var(--small-banners-accent);
  outline: none;
  background: var(--small-banners-accent);
  color: #fff;
}

.small-banners__arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

.small-banners__dots {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 10px;
  margin-top: 14px;
  gap: 7px;
}

.small-banners__dot {
  width: 8px;
  height: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c9cdd4;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.small-banners__dot.is-active {
  background: var(--small-banners-accent);
}

@keyframes small-banners-shimmer {
  to {
    transform: translateX(100%);
  }
}

@media (max-width: 1199px) {
  .small-banners {
    --small-banners-visible: 4;
  }

  .small-banners__slide {
    flex-basis: calc((100% - 30px) / 4);
  }
}

@media (max-width: 767px) {
  .small-banners {
    --small-banners-visible: 2;
  }

  .small-banners__slide {
    flex-basis: calc((100% - 10px) / 2);
  }

  .small-banners__arrow {
    display: none;
  }

  .small-banners__dots {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  .small-banners__viewport {
    scroll-behavior: auto;
  }

  .small-banners__skeleton::after {
    animation: none;
  }

  .small-banners__image,
  .small-banners__dot {
    transition: none;
  }
}
