/* Carousel Header */
.carousel-header {
  text-align: center;
  margin-bottom: 60px;
}

.carousel-header h2 {
  margin: 0 0 16px 0;
  font-size: 2.5rem;
  font-weight: 600;
  color: #1a1a1a;
}

.carousel-subtitle {
  margin: 0;
  font-size: 1.1rem;
  color: #666;
  font-weight: 300;
}

/* Carousel Container */
.carousel-container {
  position: relative;
  width: 100%;
  margin-bottom: 40px;
}

.carousel-wrapper {
  position: relative;
  overflow: hidden;
  background: #f9f9f9;
  border-radius: 12px;
  aspect-ratio: 1 / 1.2;
  max-width: 600px;
  margin: 0 auto;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}

.carousel-item {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
}

.carousel-item-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.carousel-item-image:hover {
  transform: scale(1.02);
  filter: brightness(1.05);
}

.carousel-item-name {
  display: none;
}

/* Carousel Navigation Buttons */
.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e0e0e0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
  transition: all 0.3s ease;
  z-index: 10;
  flex-shrink: 0;
}

.carousel-button:hover {
  background: rgba(255, 255, 255, 1);
  border-color: #1a1a1a;
  transform: translateY(-50%) scale(1.1);
}

.carousel-button:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-button-prev {
  left: 16px;
}

.carousel-button-next {
  right: 16px;
}

.carousel-button svg {
  stroke: currentColor;
}

/* Carousel Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d0d0d0;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  padding: 0;
}

.carousel-dot:hover {
  background: #999;
  width: 12px;
  height: 12px;
}

.carousel-dot.active {
  background: #1a1a1a;
  width: 12px;
  height: 12px;
}

/* Modal Styles */
.carousel-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 40px 20px;
  overflow-y: auto;
}

.carousel-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.carousel-modal-content {
  position: relative;
  width: 90%;
  height: auto;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: slideIn 0.3s ease;
  gap: 20px;
}

@keyframes slideIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.carousel-modal-image {
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 65vh;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.carousel-modal-title {
  display: none;
}

.carousel-modal-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  justify-content: center;
  z-index: 1001;
}

.carousel-modal-nav-button {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 20px;
  padding: 0;
  flex-shrink: 0;
}

.carousel-modal-nav-button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.carousel-modal-nav-button:active {
  transform: scale(0.95);
}

.carousel-modal-dots {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  justify-content: center;
  z-index: 1001;
}

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

.carousel-modal-dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

.carousel-modal-dot.active {
  background: white;
  width: 10px;
  height: 10px;
}

.carousel-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 24px;
  padding: 0;
  z-index: 1002;
}

.carousel-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.carousel-modal-close:active {
  transform: scale(0.95);
}

/* Desktop */
@media (min-width: 769px) {
  .carousel-header h2 {
    font-size: 2.5rem;
  }

  .carousel-subtitle {
    font-size: 1rem;
  }

  .carousel-wrapper {
    aspect-ratio: 1 / 1.2;
  }

  .carousel-item {
    padding: 20px;
  }

  .carousel-button {
    width: 48px;
    height: 48px;
  }

  .carousel-dot {
    width: 10px;
    height: 10px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .carousel-header {
    margin-bottom: 40px;
  }

  .carousel-header h2 {
    font-size: 1.5rem;
  }

  .carousel-subtitle {
    font-size: 0.95rem;
  }

  .carousel-wrapper {
    aspect-ratio: 1 / 1.3;
    border-radius: 8px;
  }

  .carousel-item {
    padding: 12px;
  }

  /* Hide carousel navigation buttons on mobile - use swipe instead */
  .carousel-button {
    display: none;
  }

  .carousel-button-prev {
    display: none;
  }

  .carousel-button-next {
    display: none;
  }

  .carousel-dot {
    width: 8px;
    height: 8px;
  }

  .carousel-dot:hover,
  .carousel-dot.active {
    width: 10px;
    height: 10px;
  }

  .carousel-modal {
    padding: 20px;
  }

  .carousel-modal-content {
    width: 100%;
    max-width: 100%;
    height: auto;
    gap: 15px;
  }

  .carousel-modal-image {
    max-width: 95vw;
    max-height: 60vh;
  }

  .carousel-modal-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  /* Show modal navigation buttons */
  .carousel-modal-controls {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    gap: 15px;
    display: flex;
    justify-content: center;
  }

  .carousel-modal-nav-button {
    width: 44px;
    height: 44px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .carousel-modal-dots {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    gap: 6px;
    display: flex;
    justify-content: center;
  }

  .carousel-modal-dot {
    width: 6px;
    height: 6px;
  }

  .carousel-modal-dot.active {
    width: 8px;
    height: 8px;
  }
}
