/* Container Styles */
.custom-product-gallery {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: stretch; /* stretch thumbs + main to match height */
  gap: 1rem;
  overflow: hidden;
  margin-bottom: 24px;
}

/* Main Gallery Styles */
.gallery-top {
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
}
.gallery-top {flex: 1 1 auto; position: relative;}

/* Slide Styles */
.gallery-top .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.swiper-slide,
.swiper-slide img {
  width: 100%;
  height: auto;
}

/* Image Styles */
.gallery-top .swiper-slide img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}
.gallery-top .swiper-slide img {border-radius: 8px;}

/* Thumbnail Styles */
.gallery-thumbs {
  overflow-y: auto;
  overflow-x: hidden;
}
.gallery-thumbs .swiper-slide img {border-radius: 4px;}
.gallery-thumbs .swiper-slide img:hover {cursor: pointer;}

/* Transition Styles */
.gallery-top .swiper-wrapper {
  transition: transform 0.3s ease;
}

/* kill any forced fixed heights on the thumb slides */
.gallery-thumbs .swiper-slide {
    height: auto !important;
  }
  
  /* make the thumb image fill its slide’s width and scale its height */
  .gallery-thumbs .swiper-slide img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  /* Gallery counter styling */
.gallery-counter {
  position: absolute;
  top: 16px;                 /* adjust to taste */
  left: 16px;                /* adjust to taste */
  background-color: rgba(0, 0, 0, 0.6); /* semi-opaque dark */
  color: #fff;
  padding: 4px 8px;         /* vertical | horizontal */
  border-radius: 16px;       /* pill shape */
  min-width: 40px;           /* ensures “7/10” always fits */
  text-align: center;
  pointer-events: none;      /* click-through */
  z-index: 1;               /* above slides but below nav */
}