/* ***************** CAROUSEL — App Screenshot Slider ***************** */

/* ─── Wrapper ───────────────────────────────────────────── */
.carousel-wrapper {
  position: relative;
  max-width: 360px;
  margin-inline: auto;
  margin-bottom: var(--space-4xl);
  /* extra horizontal space so prev/next buttons don't overlap image */
  /* padding-inline: 48px; */
  /* stop the touch events from being gobbled by the page scroll */
  touch-action: pan-y;
}

/* ─── Viewport (clip) ──────────────────────────────────── */
.carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius-2xl);
  /* soft shadow mimicking a phone on a surface */
  /* box-shadow:
    0 24px 60px rgba(26, 24, 20, 0.16),
    0 4px 16px rgba(26, 24, 20, 0.08); */
}

/* ─── Track ─────────────────────────────────────────────── */
.carousel-track {
  display: flex;
  /* smooth CSS-driven scroll */
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}

/* ─── Slide ─────────────────────────────────────────────── */
.carousel-slide {
  flex: 0 0 100%;
  /* each slide takes exactly 100% of the viewport */
  min-width: 0;
  position: relative;
  background: #F8F7F4;
  line-height: 0;
  /* collapse whitespace under inline images */
}

.carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  /* prevent right-click save / drag-ghost on desktop */
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

/* ─── Prev / Next Buttons ────────────────────────────────── */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background-color: #fff;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  /* keep buttons out of viewport clip */
  padding: 0;
}

.carousel-btn:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 16px var(--color-primary-shadow);
  transform: translateY(-50%) scale(1.08);
}

.carousel-btn:active {
  transform: translateY(-50%) scale(0.96);
}

.carousel-btn--prev {
  left: 0;
}

.carousel-btn--next {
  right: 0;
}

/* hide when there's nothing left to navigate to */
.carousel-btn[disabled] {
  opacity: 0.3;
  pointer-events: none;
}

/* ─── Dot Indicators ─────────────────────────────────────── */
.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: var(--space-lg);
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--border-strong);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.carousel-dot.is-active {
  width: 22px;
  background: var(--color-primary);
}

.carousel-dot:hover:not(.is-active) {
  background: var(--text-tertiary);
}

/* ─── Progress bar (thin line below dots) ────────────────── */
.carousel-progress {
  height: 2px;
  background: var(--border);
  border-radius: var(--radius-full);
  margin-top: var(--space-sm);
  overflow: hidden;
  max-width: 200px;
  margin-inline: auto;
}

.carousel-progress__fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* ─── Responsive tweaks ──────────────────────────────────── */
@media (min-width: 480px) {
  .carousel-wrapper {
    /* max-width: 400px; */
    /* padding-inline: 52px; */
  }
}

@media (min-width: 768px) {
  .carousel-wrapper {
    /* max-width: 400px; */
    /* padding-inline: 56px; */
  }

  .carousel-btn {
    width: 44px;
    height: 44px;
  }
}