/* Mars 1.4.8 - single badge + gallery structure fix */
.single-product .woocommerce-product-gallery{
  position:relative!important;
}
.single-product .woocommerce-product-gallery > .mars-sale-badge,
.single-product .woocommerce-product-gallery > .mars-product-badge{
  position:absolute!important;
  left:12px!important;
  top:12px!important;
  right:auto!important;
  bottom:auto!important;
  z-index:20!important;
  width:auto!important;
  min-width:0!important;
  min-height:0!important;
  max-width:96px!important;
  margin:0!important;
  transform:none!important;
  white-space:nowrap!important;
  pointer-events:none!important;
}
.single-product .woocommerce-product-gallery > .mars-sale-badge,
.single-product .woocommerce-product-gallery > .mars-product-badge--text{
  padding:5px 8px!important;
  border-radius:999px!important;
  font-size:10px!important;
  line-height:1!important;
  box-shadow:0 4px 12px rgba(20,35,60,.10)!important;
}
.single-product .woocommerce-product-gallery > .mars-product-badge--media{
  padding:0!important;
  background:transparent!important;
  box-shadow:none!important;
  max-width:72px!important;
}
.single-product .woocommerce-product-gallery > .mars-product-badge--media img{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:72px!important;
  max-height:30px!important;
  object-fit:contain!important;
}
/* Woo thumbnails belong to the wrapper. Ensure no detached thumbnail nodes affect layout. */
.single-product .woocommerce-product-gallery__wrapper{
  min-width:0!important;
}
.single-product .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image{
  box-sizing:border-box;
}
@media(max-width:700px){
  .single-product .woocommerce-product-gallery > .mars-sale-badge,
  .single-product .woocommerce-product-gallery > .mars-product-badge{
    left:8px!important;
    top:8px!important;
    max-width:78px!important;
  }
  .single-product .woocommerce-product-gallery > .mars-sale-badge,
  .single-product .woocommerce-product-gallery > .mars-product-badge--text{
    padding:4px 7px!important;
    font-size:9px!important;
  }
  .single-product .woocommerce-product-gallery > .mars-product-badge--media,
  .single-product .woocommerce-product-gallery > .mars-product-badge--media img{
    max-width:60px!important;
    max-height:26px!important;
  }
}
