* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px;

}

img {
  max-width: 100%;
  height: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.carousel__viewport {
  position: relative;
  margin-inline: -24px;
}

.carousel__controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.carousel__button {
  position: absolute;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  pointer-events: auto;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #1c1514;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.carousel__button--prev {
  left: 16px;
  transform: translateY(-50%) rotate(180deg);
}

.carousel__container {
  display: flex;
  gap: 16px;
  overflow-x: scroll;
  margin-left: 0;
  margin-right: 0;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.carousel__item {
  flex: 0 0 80%;
  scroll-snap-align: center;
}

.carousel__item img {
  display: block;
  width: 100%;
}

@media (min-width: 640px) {
  .carousel__item {
    flex-basis: 45%;
  }
}

@media (min-width: 1024px) {
  .carousel__item {
    flex-basis: 30%;
  }
}

.carousel__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 0;
  margin: 16px 0;
  list-style: none;
}

.carousel__button--next {
  right: 16px;
}
