/* style.css — Boiron product gallery
   Smooth mobile, GPU hints, centered play badge, refined thumbs
*/

/* ---------- Layout basics ---------- */
.boiron-main-swiper-wrap {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.swiper.boiron-main-swiper,
.boiron-main-swiper {
  width: 100%;
  overflow: hidden;
  z-index: 0;
}

.swiper.boiron-thumb-swiper,
.boiron-thumb-swiper {
  margin-top: 14px;
  width: 100%;
}

/* Center content inside each slide */
.boiron-main-swiper .swiper-slide,
.boiron-thumb-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative; /* so badges center correctly */
}

/* Images & videos fill slide area without distortion */
.boiron-main-swiper .swiper-slide img,
.boiron-main-swiper .swiper-slide video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- Thumbnails look ---------- */
.boiron-thumb-swiper .swiper-slide {
  position: relative;
  height: auto;                 /* let width drive height */
  aspect-ratio: 1 / 1;          /* squares on desktop */
  background: #fff;
  border: 1px solid #E6E6E6;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
  cursor: pointer;
}

.boiron-thumb-swiper .swiper-slide img,
.boiron-thumb-swiper .swiper-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.boiron-thumb-swiper .swiper-slide-thumb-active {
  border-color: #BDBDBD;
  box-shadow: 0 2px 6px rgba(0,0,0,0.10);
}

/* ---------- Centered play badge (DOM element) ---------- */
.boiron-play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  pointer-events: none;          /* never block clicks/taps */
  z-index: 3;
}
.boiron-play-badge::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  /* triangle centered inside the circle */
  transform: translate(-35%, -50%); /* slight right bias for visual centering */
  width: 0; height: 0;
  border-left: 18px solid #fff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}
.boiron-thumb-swiper .boiron-play-badge {
  width: 32px;
  height: 32px;
}
.boiron-thumb-swiper .boiron-play-badge::after {
  border-left-width: 10px;
  border-top-width: 7px;
  border-bottom-width: 7px;
}

/* Hide any stray theme play icons */
.boiron-main-swiper .video-icon,
.boiron-thumb-swiper .video-icon { display: none !important; }

/* ---------- Navigation buttons ---------- */
.swiper-button-next,
.swiper-button-prev {
  color: inherit;
  width: 44px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

/* ---------- Mobile stability ---------- */
@media (max-width: 768px) {
  .boiron-main-swiper-wrap {
    aspect-ratio: 1 / 1; /* change to 4/3 or 3/4 if your assets differ */
    overflow: hidden;
  }
  .boiron-main-swiper .swiper-slide {
    width: 100%;
    height: 100%;
  }
  .boiron-thumb-swiper .swiper-slide { height: 80px; }
}

/* ---------- Performance / Compositing hints ---------- */
.boiron-main-swiper,
.boiron-main-swiper .swiper-wrapper,
.boiron-main-swiper .swiper-slide,
.boiron-thumb-swiper,
.boiron-thumb-swiper .swiper-wrapper,
.boiron-thumb-swiper .swiper-slide {
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
}

/* Prevent accidental selection during swipe */
.boiron-main-swiper .swiper-slide,
.boiron-thumb-swiper .swiper-slide {
  user-select: none;
  -webkit-user-drag: none;
}

/* Make sure video receives taps/clicks on mobile */
.boiron-main-swiper .swiper-slide video {
  pointer-events: auto;
  max-height: 100%;
  outline: none;
}

/* GLightbox + Plyr: make video fill the phone viewport */
@media (max-width: 768px) {
  .glightbox-container .gcontainer,
  .glightbox-container .gslider,
  .glightbox-container .gslide,
  .glightbox-container .ginner-container,
  .glightbox-container .gslide-media,
  .glightbox-container .gvideo-container,
  .glightbox-container .plyr,
  .glightbox-container .plyr__video-wrapper {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important; /* falls back to 100vh where dvh unsupported via JS */
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* kill Plyr’s ratio padding class */
  .glightbox-container .plyr__video-wrapper--fixed-ratio {
    padding: 0 !important;
    height: 100dvh !important;
  }

  .glightbox-container .gslide-media video,
  .glightbox-container .gslide-media iframe,
  .glightbox-container .gvideo-container video,
  .glightbox-container .gvideo-container iframe {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    background: #000 !important;
  }

  /* Hide our gallery play badge inside the lightbox */
  .glightbox-container .boiron-play-badge { display: none !important; }

  /* If GLightbox injects descriptions below the media, hide on mobile */
  .glightbox-container .gslide-description,
  .glightbox-container .gdesc-inner { display: none !important; }
}

/* Remove background “pills” on Swiper nav buttons in the product gallery */
.boiron-main-swiper-wrap .swiper-button-prev,
.boiron-main-swiper-wrap .swiper-button-next {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;   /* in case theme makes them round */
}

/* Some themes draw the circle with ::before — neutralize it */
.boiron-main-swiper-wrap .swiper-button-prev::before,
.boiron-main-swiper-wrap .swiper-button-next::before {
  content: none !important;
  background: none !important;
  box-shadow: none !important;
}

/* Keep the arrow icon itself (Swiper uses ::after) and control its color/size */
.boiron-main-swiper-wrap {
  --swiper-navigation-color: currentColor;  /* arrow color inherits from text color */
  --swiper-navigation-size: 45px;           /* tweak arrow size if needed */
}
.boiron-main-swiper-wrap .swiper-button-prev::after,
.boiron-main-swiper-wrap .swiper-button-next::after {
  background: none !important; /* some themes apply bg here too */
  text-shadow: none !important;
}

/* Optional: if your theme uses Elementor nav buttons, clear those too */
.boiron-main-swiper-wrap .elementor-swiper-button {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* example: dark gray arrows */
.boiron-main-swiper-wrap .swiper-button-prev,
.boiron-main-swiper-wrap .swiper-button-next { color: #0370B9;}



