/* Carousel Gallery Component */
.carousel-gallery {
  /* margin-bottom: 30px; */
}

/* Main Preview Image Styles */
.carousel-gallery__main {
  margin-bottom: 24px;
}

.carousel-gallery__main-image-container {
  position: relative;
  width: 100%;
  height: 640px;
  overflow: hidden;
  border-radius: 24px;
}

.carousel-gallery__main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Main carousel navigation buttons */
.carousel-gallery__main-prev,
.carousel-gallery__main-next {
  position: absolute;
  top: 50%;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  z-index: 10;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
}

.carousel-gallery__main-prev {
  left: 10px;
}

.carousel-gallery__main-next {
  right: 10px;
}

/* Fix main slide display */
.carousel-gallery__main-slide {
  position: relative;
  height: 640px;
}

/* Make sure the swiper container is properly sized */
.carousel-gallery__main.swiper-container {
  width: 100%;
  height: 640px;
  margin-bottom: 15px;
}

/* Ensure the main wrapper is properly configured */
.carousel-gallery__main-wrapper {
  height: 100%;
}

/* Thumbnails Styles */
.carousel-gallery__thumbs {
  position: relative;
  padding: 0 0; /* Space for navigation arrows */
}

.swiper-wrapper {
  display: flex;
  flex-direction: row;
  gap: 16px;
}

.swiper-slide {
  width: auto; /* Allow automatic sizing based on aspect ratio */
  height: 88px; /* Fixed height as required */
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.carousel-gallery__thumb-slide.swiper-slide-thumb-active {
  opacity: 1;
  border: 2px solid #007bff;
}

.carousel-gallery__thumb-image-container {
  width: 156px; /* 16:9 ratio with 88px height */
  height: 88px;
  overflow: hidden;
}

.carousel-gallery__thumb-image {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
}

/* Content Overlay Styles */
.carousel-gallery__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}

.carousel-gallery__title {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.carousel-gallery__caption {
  font-size: 1rem;
  line-height: 1.4;
}

/* Navigation Buttons */
.carousel-gallery__thumbs-prev,
.carousel-gallery__thumbs-next {
  position: absolute;
  top: 50%;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  z-index: 10;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
}

.carousel-gallery__thumbs-prev {
  left: 0;
}

.carousel-gallery__thumbs-next {
  right: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .carousel-gallery__main-image-container {
    height: 400px; /* Smaller height on mobile */
  }

  .carousel-gallery__thumb-image-container {
    width: 117px; /* Maintain 16:9 ratio with smaller 66px height */
    height: 66px; /* Smaller thumbnails on mobile */
  }

  .carousel-gallery__thumb-slide {
    height: 66px;
  }

  .carousel-gallery__main-slide,
  .carousel-gallery__main.swiper-container {
    height: 400px;
  }

  .carousel-gallery__main {
    margin-bottom: 16px;
  }
}
