/* =========================================================
   Slider with Thumbs — Widget Styles
   Mirrors gallery-slider-pure/style.css — adapted for Elementor
   ========================================================= */

/* Wrapper */
.slider-with-thumbs-wrapper {
  width: 100%;
  position: relative;
}

/* ---- Main Carousel (mirrors .gallery-carousel) ---- */
.slider-with-thumbs-wrapper .gallery-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  /* default height — overridden by Elementor control */
  overflow: hidden;
  margin-bottom: 16px;
}

/* Swiper internals must fill the carousel height */
.slider-with-thumbs-wrapper .gallery-carousel .swiper-wrapper {
  height: 100%;
}

.slider-with-thumbs-wrapper .gallery-slide {
  position: relative;
  height: 100%;
  /* fill the swiper-wrapper, which fills .gallery-carousel */
  overflow: hidden;
}

.slider-with-thumbs-wrapper .gallery-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

/* Caption — position:absolute so it never gets cut off */
.slider-with-thumbs-wrapper .gallery-caption {
  position: absolute;
  bottom: 0;
  /* default: bottom=0, overridden by Elementor control */
  left: 0;
  right: 0;
  width: 100%;
  padding: 30px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1;
  box-sizing: border-box;
}

.slider-with-thumbs-wrapper .gallery-caption .slide-title {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}

.slider-with-thumbs-wrapper .gallery-caption .slide-description {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* Arrow button reset + icon centering */
.slider-with-thumbs-wrapper .gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s ease, color 0.3s ease;
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  /* reset browser button defaults */
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  font-size: 0;
  /* prevent inline spacing */
}

.slider-with-thumbs-wrapper .gallery-nav:hover {
  background: rgba(255, 255, 255, 0.45);
  color: #000;
}

/* Elementor wraps icons in a <span> — make it flex too */
.slider-with-thumbs-wrapper .gallery-nav>span,
.slider-with-thumbs-wrapper .gallery-nav>i,
.slider-with-thumbs-wrapper .gallery-nav>svg {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  line-height: 1;
  font-size: 18px;
  /* restore icon size */
}

.slider-with-thumbs-wrapper .gallery-nav svg {
  width: 18px;
  height: 18px;
}

.slider-with-thumbs-wrapper .gallery-prev {
  left: 24px;
}

.slider-with-thumbs-wrapper .gallery-next {
  right: 24px;
}

/* Disabled state */
.slider-with-thumbs-wrapper .gallery-nav.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ---- Dots Pagination (mirrors .gallery-dots) ---- */
.slider-with-thumbs-wrapper .gallery-dots {
  position: absolute !important;
  bottom: 24px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: auto !important;
  display: flex !important;
  gap: 8px;
  z-index: 10;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.slider-with-thumbs-wrapper .gallery-dots .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  opacity: 1;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 !important;
}

.slider-with-thumbs-wrapper .gallery-dots .swiper-pagination-bullet-active {
  background: #fff;
  transform: scale(1.3);
}

.slider-with-thumbs-wrapper .gallery-dots .swiper-pagination-bullet:hover:not(.swiper-pagination-bullet-active) {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

/* ---- Thumbs Grid (mirrors .gallery-thumbs) ---- */
.slider-with-thumbs-wrapper .gallery-thumbs {
  margin-top: 0;
  padding: 8px 0;
}

.slider-with-thumbs-wrapper .gallery-grid-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  transition: transform 0.3s ease;
}

.slider-with-thumbs-wrapper .gallery-grid-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-radius: inherit;
  /* always follows the item's border-radius */
  transition: border-color 0.3s ease;
  pointer-events: none;
}

.slider-with-thumbs-wrapper .gallery-grid-item.swiper-slide-thumb-active::after {
  border-color: var(--e-global-color-accent, #FF7033);
}

.slider-with-thumbs-wrapper .gallery-grid-item:hover {
  transform: translateY(-4px);
}

.slider-with-thumbs-wrapper .gallery-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .slider-with-thumbs-wrapper .gallery-slide {
    height: 100%;
  }

  .slider-with-thumbs-wrapper .gallery-nav {
    width: 40px;
    height: 40px;
  }

  .slider-with-thumbs-wrapper .gallery-prev {
    left: 12px;
  }

  .slider-with-thumbs-wrapper .gallery-next {
    right: 12px;
  }

  .slider-with-thumbs-wrapper .gallery-caption {
    padding: 20px;
  }

  .slider-with-thumbs-wrapper .gallery-dots {
    bottom: 16px !important;
  }
}