/* WooCommerce Product Gallery Videos - Fixed Height Mode */

/* 1. The Slide Container */
/* We force it to flex so we can center the video inside the imposed height. */
.woocommerce-product-gallery .wcpgv-main-slide {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background-color: transparent; 
  /* Important: Prevent the slide from collapsing if JS is slow */
  min-height: 200px; 
  height: auto;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

/* 2. The Video Element */
/* Force the video to fit INSIDE the slide, never pushing it open. */
.woocommerce-product-gallery .wcpgv-main-video {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important; /* Letterboxing: shows full video without crop */
  display: block;
  margin: 0 auto;
  pointer-events: auto;
}

/* 3. Thumbnail Badges (unchanged) */
.woocommerce-product-gallery .flex-control-thumbs li.wcpgv-video-thumb {
  position: relative;
}

.woocommerce-product-gallery .flex-control-thumbs li.wcpgv-video-thumb::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-left: 10px solid rgba(255, 255, 255, 0.95);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  z-index: 9;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.65));
}

.woocommerce-product-gallery .flex-control-thumbs li.wcpgv-video-thumb::after {
  content: attr(data-wcpgv-badge);
  position: absolute;
  left: 50%;
  top: 62%;
  transform: translate(-50%, -50%);
  z-index: 9;
  pointer-events: none;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.65);
  padding: 4px 7px;
  border-radius: 3px;
}

.woocommerce-product-gallery .flex-control-thumbs li.wcpgv-video-thumb img {
  display: block;
  position: relative;
  z-index: 1;
}