ol.carousel__viewport li.carousel__slide::before {
  display: none !important;
}
.carousel__slide img {
  /* This ensures the image will fill the entire width of its container */
  width: 100%;
  
  /* This ensures the image will fill the entire height of its container */
  height: 100%;
  
  /* This property is crucial for maintaining the image's aspect ratio
     while filling the space. It prevents stretching or squishing.
     `cover` crops the image if necessary, while `contain` shrinks it
     to fit entirely within the container. You can choose the one that
     best fits your desired look. */
  object-fit: contain;

  /* Centers the image within the container if it doesn't fill it entirely */
  object-position: center;
}
body {
  margin: 0 auto;
  padding: 0 1.25rem;
  font-family: 'Lato', sans-serif;
}

* {
  box-sizing: border-box;
  scrollbar-color: transparent transparent; /* thumb and track color */
  scrollbar-width: 0px;
}

*::-webkit-scrollbar {
  width: 0;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: transparent;
  border: none;
}

* {
  -ms-overflow-style: none;
}

ol, li {
  list-style: none !important;
  margin: 0;
  padding: 0;
}



.carousel__viewport {
  position: relative; /* Change this to relative */
  /* Remove the top, right, bottom, left properties here */
  width: 100%;
  height: 100%;
  display: flex;
  overflow-x: scroll;
  counter-reset: item;
  z-index: 2 !important; /* Add this z-index to ensure it is behind the frame */
}

.carousel__slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  background-color: #f99;
  counter-increment: item;
}

.carousel__slide:nth-child(even) {
  background-color: #99f;
}

.carousel__slide:before {
  content: counter(item);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate3d(-50%,-40%,70px);
  color: #fff;
  font-size: 2em;
}

.carousel__snapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
}



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

.carousel:hover .carousel__snapper,
.carousel:focus-within .carousel__snapper {
  animation-name: none;
}

.carousel__navigation {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  text-align: center;
}

.carousel__navigation-list,
.carousel__navigation-item {
  display: inline-block;
}

.carousel__navigation-button {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  background-color: #333;
  background-clip: content-box;
  border: 0.25rem solid transparent;
  border-radius: 50%;
  font-size: 0;
  transition: transform 0.1s;
}

.carousel::before,
.carousel::after,
.carousel__prev,
.carousel__next {
  position: absolute;
  top: 0;
  margin-top: 37.5%;
  width: 4rem;
  height: 4rem;
  transform: translateY(-50%);
  border-radius: 50%;
  font-size: 0;
  outline: 0;
}

.carousel::before,
.carousel__prev {
  left: -1rem;
}

.carousel::after,
.carousel__next {
  right: -1rem;
}

.carousel::before,
.carousel::after {
  content: '';
  z-index: 1;
  background-color: #333;
  background-size: 1.5rem 1.5rem;
  background-repeat: no-repeat;
  background-position: center center;
  color: #fff;
  font-size: 2.5rem;
  line-height: 4rem;
  text-align: center;
  pointer-events: none;
}
.carousel__viewport {
  list-style: none !important;
}
.carousel::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='0,50 80,100 80,0' fill='%23fff'/%3E%3C/svg%3E");
}

.carousel::after {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='100,50 20,100 20,0' fill='%23fff'/%3E%3C/svg%3E");
}
/* This is the new container for both elements */
.carousel-container {
  position: relative; /* This is crucial for positioning children */
  width: 1600px; /* Set your desired frame width */
  height: 1200px; /* Set your desired frame height */
  margin: 0 auto;
}

/* This rule positions the frame image */
.carousel-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10; /* Make sure this is a high value */
}

/* Update the carousel's positioning to align with the frame's cutout */
.carousel {
  position: absolute;
  top: 200px; /* Adjust to match the frame's cutout */
  left: 500px; /* Adjust to match the frame's cutout */
  width: 640px; /* Adjust to match the frame's cutout */
  height: 480px; /* Adjust to match the frame's cutout */
  z-index: 5; /* A lower z-index to place it behind the frame */
}
.carousel__slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  background-color: #f99;
  counter-increment: item;
  scroll-snap-align: center; /* This is what makes it snap */
  scroll-margin: 0; /* Add this for a cleaner keyboard navigation experience */
}
