/* ============================================
   Apple-Style Product Slideshow
   Crossfades + Ken Burns + Floating Labels
   ============================================ */

.ap-slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 10px 30px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .ap-slideshow {
  background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.15),
    0 10px 30px rgba(0, 0, 0, 0.08);
}

.ap-slideshow__track {
  position: absolute;
  inset: 0;
}

.ap-slideshow__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.ap-slideshow__slide.is-active {
  opacity: 1;
  animation: apKenBurns 8s ease-in-out forwards;
}

.ap-slideshow__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Subtle Ken-Burns zoom per slide */
@keyframes apKenBurns {
  0% {
    transform: scale(1.0) translate(0, 0);
  }
  100% {
    transform: scale(1.08) translate(-1.5%, -1%);
  }
}

.ap-slideshow__slide:nth-child(even).is-active {
  animation: apKenBurnsAlt 8s ease-in-out forwards;
}

@keyframes apKenBurnsAlt {
  0% {
    transform: scale(1.06) translate(1%, 0.5%);
  }
  100% {
    transform: scale(1.0) translate(0, 0);
  }
}

/* Subtle vignette overlay for cinematic look */
.ap-slideshow::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
  z-index: 2;
}

[data-theme="light"] .ap-slideshow::after {
  background:
    radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.12) 100%);
}

/* Floating spec labels — Apple-style */
.ap-slideshow__labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.ap-slideshow__label {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: rgba(20, 20, 20, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  color: #fff;
  font-family: "Satoshi", "Inter", -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

[data-theme="light"] .ap-slideshow__label {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
}

.ap-slideshow__label.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ap-slideshow__label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.6);
  flex-shrink: 0;
  animation: apPulse 2s ease-in-out infinite;
}

@keyframes apPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.ap-slideshow__label--value {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

[data-theme="light"] .ap-slideshow__label--value {
  color: #1d1d1f;
}

.ap-slideshow__label-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .ap-slideshow__label-divider {
  background: rgba(0, 0, 0, 0.12);
}

/* Caption strip at bottom */
.ap-slideshow__caption {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 32px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  z-index: 4;
  pointer-events: none;
}

.ap-slideshow__caption-text {
  color: #fff;
  font-family: "Clash Grotesk", "Satoshi", sans-serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 60%;
}

.ap-slideshow__caption-text.is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-theme="light"] .ap-slideshow__caption-text {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* Progress dots */
.ap-slideshow__progress {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(20, 20, 20, 0.6);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: 100px;
  pointer-events: auto;
}

[data-theme="light"] .ap-slideshow__progress {
  background: rgba(255, 255, 255, 0.75);
}

.ap-slideshow__dot {
  width: 22px;
  height: 3px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.4s ease;
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .ap-slideshow__dot {
  background: rgba(0, 0, 0, 0.15);
}

.ap-slideshow__dot.is-active {
  background: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .ap-slideshow__dot.is-active {
  background: rgba(0, 0, 0, 0.85);
}

/* Mobile */
@media (max-width: 768px) {
  .ap-slideshow {
    border-radius: 16px;
  }

  .ap-slideshow__caption {
    left: 16px;
    right: 16px;
    bottom: 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .ap-slideshow__caption-text {
    font-size: 15px;
    max-width: 100%;
  }

  .ap-slideshow__label {
    padding: 10px 16px;
    font-size: 11px;
  }
}
