/* Product Image Slideshow Styles */
.bb-product-image-slide-show {
  position: relative;
  overflow: hidden;
  display: none;
}

.bb-product-image-slide-show a {
  display: block;
  position: relative;
}

/* Main product image */
.bb-product-image-slide-show img[data-testid="product-image"] {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.3s ease-in-out;
}

/* Gallery images - hidden by default */
.bb-product-image-slide-show .bb-slide-image {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  pointer-events: none;
  /* Size and aspect ratio inherited from inline styles to match main image */
}

/* Active slide */
.bb-product-image-slide-show .bb-slide-image.active {
  opacity: 1;
  pointer-events: auto;
}

/* Hide main image when gallery image is active */
.bb-product-image-slide-show.has-active-slide img[data-testid="product-image"] {
  opacity: 0;
}

/* Navigation arrows (optional) */
.bb-slideshow-arrow {
  padding: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: transparent;
  border: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10;
  pointer-events: none;
}

.bb-product-image-slide-show:hover .bb-slideshow-arrow {
  opacity: 1;
  pointer-events: auto;
}

.bb-slideshow-arrow-prev {
  left: 12px;
}

.bb-slideshow-arrow-next {
  right: 12px;
}

.bb-slideshow-arrow svg {
  width: 26px;
  height: 26px;
  fill: #000;
}

/* Smooth loading animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.bb-product-image-slide-show img {
  animation: fadeIn 0.3s ease-in-out;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .bb-slideshow-arrow {
    width: 32px;
    height: 32px;
  }

  .bb-slideshow-arrow svg {
    width: 14px;
    height: 14px;
  }
}
