/* ==========================================================================
   Petrekivka2 — Carousel Component
   ========================================================================== */

.carousel-container {
  position: relative;
  width: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-surface-muted);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  aspect-ratio: 4/5;
}

@media (min-width: 768px) {
  .carousel-track {
    aspect-ratio: 1;
  }
}

.carousel-track::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
  position: relative;
}

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

/* Navigation Buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-base);
  opacity: 0;
}

@media (hover: none) {
  .carousel-btn {
    display: none;
  }
}

.carousel-container:hover .carousel-btn {
  opacity: 1;
}

.carousel-btn:hover {
  background: rgba(20, 20, 20, 0.8);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn-prev {
  left: var(--space-4);
}

.carousel-btn-next {
  right: var(--space-4);
}

.carousel-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Indicators */
.carousel-indicators {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: var(--radius-full);
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  padding: 0;
}

.carousel-dot.is-active {
  background: white;
  transform: scale(1.2);
}
