/* Main container setup */
.woocommerce-product-gallery {
  position: relative;
  max-width: 100%;
}

/* Hide opacity until loaded */
.woocommerce-product-gallery[style*="opacity: 0"] {
  display: block; /* maintain space */
}

/* Main Slider */
.seif-product-gallery-slider {
  width: 100%;
  margin-bottom: 10px;
  border-radius: 8px; /* Modern touch */
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9; /* Enforce 1920x1080 ratio context if desired, or let image dictate height */
}

.seif-product-gallery-slider .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  height: auto;
}

.seif-product-gallery-slider .swiper-slide img {
  width: 100%;
  height: 100%; /* Fill the slide */
  display: block;
  object-fit: cover;
  aspect-ratio: 1920/1080; /* Explicit requirement */
}

/* Thumbnails */
.seif-product-gallery-thumbs {
  width: 100%;
  height: auto;
  box-sizing: border-box;
  padding: 0;
}

.seif-product-gallery-thumbs .swiper-slide {
  width: 25%; /* Determines how many slides per view partially, but JS overrides 'slidesPerView' or 'width' */
  height: auto;
  opacity: 0.6;
  transition:
    opacity 0.3s,
    border-color 0.3s;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  box-sizing: border-box;
  aspect-ratio: 16 / 9;
}

.seif-product-gallery-thumbs .swiper-slide-thumb-active {
  opacity: 1;
  border-color: #000; /* Main Highlight Color - adjust as needed */
}

.seif-product-gallery-thumbs .swiper-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 16/9; /* Explicit requirement: 16:9 */
}

/* Navigation Arrows - Customize Swiper Defaults */
.seif-product-gallery-slider .swiper-button-next,
.seif-product-gallery-slider .swiper-button-prev {
  color: #333; /* Arrow color */
  background: rgba(255, 255, 255, 0.7);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.seif-product-gallery-slider .swiper-button-next:after,
.seif-product-gallery-slider .swiper-button-prev:after {
  font-size: 18px;
  font-weight: bold;
}

.seif-product-gallery-slider .swiper-button-next:hover,
.seif-product-gallery-slider .swiper-button-prev:hover {
  background: rgba(255, 255, 255, 1);
}

/* Lightbox/Zoom Compatibility */
.woocommerce-product-gallery__image {
  display: block;
  width: 100%;
  height: 100%;
  text-align: center;
}

.woocommerce-product-gallery__image a {
  display: block;
  cursor: zoom-in;
  width: 100%;
  height: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .seif-product-gallery-slider .swiper-button-next,
  .seif-product-gallery-slider .swiper-button-prev {
    display: none; /* Often cleaner to hide arrows on mobile */
  }
}
