.carousel {
  min-width: 0;
  /* Stops the row of photos from stretching the page layout */
}

.carousel-viewport {
  position: relative;
  /* Lets the arrows sit on top of the photo */
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* Makes each photo snap into place when swiping */
  scroll-behavior: smooth;
  scrollbar-width: none;
  border-radius: 4px;
}

.carousel-track::-webkit-scrollbar {
  display: none;
  /* Hides the scrollbar in Safari and Chrome */
}

.carousel-image {
  flex: 0 0 100%;
  /* Each photo takes up the full width */
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  scroll-snap-align: start;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: color-mix(in srgb, var(--colour-surface) 80%, transparent);
  color: var(--colour-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  /* These three lines centre the arrow inside the circle */
}

.carousel-arrow svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  /* Uses the button's "color", so the arrow colour is set in one place */
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.carousel-prev {
  left: 0.75rem;
}

.carousel-next {
  right: 0.75rem;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid var(--dot-border);
  border-radius: 50%;
  background-color: var(--dot-inactive);
  cursor: pointer;
}

.carousel-dot[aria-current="true"] {
  background-color: var(--dot-active);
}

/* -------------------- PHONES (576px and below) -------------------- */
/* Arrows are hidden and customers swipe instead.
   Tablets (577px–768px) and desktops keep the arrows. */

@media(max-width: 576px) {
  .carousel-arrow {
    display: none;
  }
}