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

.brandy-product-image-slideshow a {
  display: block;
  position: relative;
}

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

/* Gallery images - hidden by default */
.brandy-product-image-slideshow .brandy-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 */
.brandy-product-image-slideshow .brandy-slide-image.active {
  opacity: 1;
  pointer-events: auto;
}

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

/* Navigation arrows (optional) */
.brandy--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;
}

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

.brandy--arrow-prev {
  left: 20px;
}

.brandy--arrow-next {
  right: 20px;
}

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

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

.brandy-product-image-slideshow img {
  animation: fadeIn 0.3s ease-in-out;
}

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

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