/* PupVibes 8.9.22 — cart mascot positioning + smooth crossfade.
   Goal:
   - mascot visually attached to the TOP edge of the summary card;
   - full bust visible above the card;
   - state switch between rest/hover PNGs must be smooth, without flash.
*/

body#cart .pv-cart-summary-shell,
body#cart .pv-cart-summary-stage,
body#cart .pv-cart-summary-card,
body#cart .pv-cart-summary-visual{
  overflow:visible!important;
}

/* Reserve exactly the vertical room needed by the tallest mascot frame so the
   black rail held by the hands sits on the card top edge. */
body#cart .pv-cart-summary-stage{
  display:block!important;
  width:357px!important;
  max-width:100%!important;
  padding-top:258px!important;
}

body#cart .pv-cart-summary-card{
  position:relative!important;
  z-index:2!important;
}

body#cart .pv-cart-summary-visual{
  position:absolute!important;
  top:0!important;
  left:50%!important;
  right:auto!important;
  bottom:auto!important;
  z-index:5!important;
  width:302px!important;
  height:258px!important;
  margin:0!important;
  padding:0!important;
  pointer-events:none!important;
  transform:translateX(-50%)!important;
}

body#cart .pv-cart-mascot{
  position:absolute!important;
  left:50%!important;
  right:auto!important;
  bottom:0!important;
  display:block!important;
  width:302px!important;
  max-width:none!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  pointer-events:none!important;
  user-select:none!important;
  transform:translateX(-50%) translateZ(0)!important;
  backface-visibility:hidden!important;
  will-change:opacity!important;
  transition:opacity .28s cubic-bezier(.22,.61,.36,1)!important;
}

body#cart .pv-cart-mascot--rest{
  opacity:1!important;
}
body#cart .pv-cart-mascot--hover{
  opacity:0!important;
}

@media (hover:hover) and (pointer:fine){
  body#cart .pv-cart-summary-card:hover + .pv-cart-summary-visual .pv-cart-mascot--rest,
  body#cart .pv-cart-summary-card:focus-within + .pv-cart-summary-visual .pv-cart-mascot--rest{
    opacity:0!important;
  }
  body#cart .pv-cart-summary-card:hover + .pv-cart-summary-visual .pv-cart-mascot--hover,
  body#cart .pv-cart-summary-card:focus-within + .pv-cart-summary-visual .pv-cart-mascot--hover{
    opacity:1!important;
  }
}

/* Hard-disable any previous sprite implementation. */
body#cart .pv-cart-mascot-sprite{display:none!important;}

@media (max-width:991.98px){
  body#cart .cart-grid__aside{margin-top:0!important;}
  body#cart .pv-cart-summary-stage{
    width:357px!important;
    max-width:100%!important;
    margin:0 auto!important;
    padding-top:238px!important;
  }
  body#cart .pv-cart-summary-visual{
    width:280px!important;
    height:238px!important;
  }
  body#cart .pv-cart-mascot{
    width:280px!important;
  }
}

@media (max-width:640px){
  body#cart .pv-cart-summary-stage{
    width:100%!important;
    padding-top:220px!important;
  }
  body#cart .pv-cart-summary-visual{
    width:256px!important;
    height:220px!important;
  }
  body#cart .pv-cart-mascot{
    width:256px!important;
  }
}
