
/* V159 - Product card brand logo placement
   Fix brand badge overlapping the product title.
   Keep badge anchored inside the image area only. */

body:not(.admin-layout) .v117-product-card{
  overflow:hidden!important;
}

/* The product media remains the containing block for brand logo. */
body:not(.admin-layout) .v117-product-card .v117-product-media{
  position:relative!important;
  overflow:hidden!important;
}

/* Brand logo/badge stays entirely inside the image */
body:not(.admin-layout) .v117-product-card .v117-brand-float{
  position:absolute!important;
  left:12px!important;
  bottom:10px!important;
  top:auto!important;
  right:auto!important;

  width:58px!important;
  height:44px!important;
  min-width:58px!important;
  min-height:44px!important;
  max-width:58px!important;
  max-height:44px!important;

  display:flex!important;
  align-items:center!important;
  justify-content:center!important;

  padding:5px 7px!important;
  margin:0!important;

  background:rgba(255,255,255,.96)!important;
  border:1px solid rgba(18,82,55,.10)!important;
  border-radius:10px!important;
  box-shadow:0 4px 12px rgba(22,54,41,.10)!important;

  transform:none!important;
  z-index:4!important;
  overflow:hidden!important;
  pointer-events:none!important;
}

/* Logo image is contained, never spills out */
body:not(.admin-layout) .v117-product-card .v117-brand-float img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center center!important;
  margin:0!important;
  padding:0!important;
}

/* Text fallback for brands without a logo */
body:not(.admin-layout) .v117-product-card .v117-brand-float b{
  display:block!important;
  width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  text-align:center!important;
  font-size:9px!important;
  line-height:1.1!important;
  color:#174A31!important;
}

/* Ensure title/body starts below media and cannot be covered by floating elements */
body:not(.admin-layout) .v117-product-card .v117-product-body{
  position:relative!important;
  z-index:2!important;
  background:#fff!important;
}

body:not(.admin-layout) .v117-product-card .v117-product-body h3{
  position:relative!important;
  z-index:2!important;
}

/* Desktop 1600px cards can use a slightly larger brand mark */
@media(min-width:1500px){
  body:not(.admin-layout) .v117-product-card .v117-brand-float{
    left:13px!important;
    bottom:11px!important;
    width:62px!important;
    height:46px!important;
    min-width:62px!important;
    min-height:46px!important;
    max-width:62px!important;
    max-height:46px!important;
  }
}

/* Tablet/mobile: reduce size to avoid crowding */
@media(max-width:767px){
  body:not(.admin-layout) .v117-product-card .v117-brand-float{
    left:8px!important;
    bottom:8px!important;
    width:48px!important;
    height:36px!important;
    min-width:48px!important;
    min-height:36px!important;
    max-width:48px!important;
    max-height:36px!important;
    padding:4px 5px!important;
    border-radius:8px!important;
  }
}
