:root {
  --hp-float-cart-size: 56px;
  --hp-float-cart-z: 100150;
  --hp-wa-fab-size: 60px;
  --hp-float-cart-gap: 16px;
}

.hp-float-cart {
  position: fixed;
  inset-inline-start: 20px;
  bottom: calc(var(--hp-wa-fab-size) + var(--hp-float-cart-gap) + env(safe-area-inset-bottom, 0px));
  z-index: var(--hp-float-cart-z);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: var(--hp-float-cart-size);
  min-height: var(--hp-float-cart-size);
  width: var(--hp-float-cart-size);
  height: var(--hp-float-cart-size);
  padding: 0;
  border: 0;
  border-radius: var(--hp-radius-pill, 999px);
  background: linear-gradient(180deg, var(--hp-brand, #017aa8), var(--hp-brand-deep, #015a92));
  color: #fff;
  box-shadow: var(--hp-shadow-md, 0 8px 24px rgba(18, 52, 59, 0.18));
  text-decoration: none !important;
  cursor: pointer;
  font-family: var(--hp-font, "Assistant", "Heebo", sans-serif);
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--hp-dur, 0.25s) var(--hp-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    box-shadow var(--hp-dur, 0.25s) var(--hp-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.hp-float-cart:hover,
.hp-float-cart:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--hp-shadow-lg, 0 16px 40px rgba(18, 52, 59, 0.2));
  color: #fff;
}

.hp-float-cart:focus {
  outline: 2px solid var(--hp-accent-mid, #06d2e6);
  outline-offset: 3px;
}

.hp-float-cart:focus:not(:focus-visible) {
  outline: none;
}

.hp-float-cart:focus-visible {
  outline: 3px solid var(--hp-accent-mid, #06d2e6);
  outline-offset: 3px;
}

.hp-float-cart__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.hp-float-cart__svg {
  display: block;
  width: 22px;
  height: 22px;
}

.hp-float-cart__subtotal {
  display: none;
  max-width: 5.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

.hp-float-cart__subtotal .amount,
.hp-float-cart__subtotal .woocommerce-Price-amount,
.hp-float-cart .hp-header__cart-total {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.hp-float-cart__badge {
  position: absolute;
  top: -4px;
  inset-inline-end: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--hp-radius-pill, 999px);
  border: 2px solid #fff;
  background: linear-gradient(180deg, #ff69c2, #ee147f);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(238, 20, 127, 0.28);
}

@keyframes hp-cart-badge-pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.16);
  }
  100% {
    transform: scale(1);
  }
}

.hp-float-cart__badge.is-pop,
.hp-mobile-bottom-bar__badge.is-pop {
  animation: hp-cart-badge-pop 0.35s var(--hp-ease, cubic-bezier(0.22, 1, 0.36, 1)) 1;
}

@media (min-width: 768px) {
  .hp-float-cart {
    display: inline-flex;
  }
}

@media (min-width: 1200px) {
  .hp-float-cart {
    width: auto;
    min-width: var(--hp-float-cart-size);
    padding-inline: 14px 16px;
  }

  .hp-float-cart__subtotal {
    display: inline-block;
  }
}

body.woocommerce-cart .hp-float-cart,
body.woocommerce-checkout .hp-float-cart,
body.woocommerce-order-received .hp-float-cart,
body.hp-cart-open .hp-float-cart,
body.hp-menu-open .hp-float-cart,
body:has(.cky-consent-container:not(.cky-hide)) .hp-float-cart {
  display: none !important;
}

@media (max-width: 767px) {
  .hp-float-cart:not(.hp-pdp-sticky-dock) {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .hp-float-cart.hp-pdp-sticky-dock .hp-float-cart__fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: var(--hp-float-cart-size);
    min-height: var(--hp-float-cart-size);
    width: var(--hp-float-cart-size);
    height: var(--hp-float-cart-size);
    padding: 0;
    border: 0;
    border-radius: var(--hp-radius-pill, 999px);
    background: linear-gradient(180deg, var(--hp-brand, #017aa8), var(--hp-brand-deep, #015a92));
    color: #fff;
    box-shadow: var(--hp-shadow-md, 0 8px 24px rgba(18, 52, 59, 0.18));
    text-decoration: none !important;
    cursor: pointer;
    position: fixed;
    inset-inline-start: 20px;
    bottom: calc(var(--hp-wa-fab-size) + var(--hp-float-cart-gap) + env(safe-area-inset-bottom, 0px));
    z-index: var(--hp-float-cart-z);
  }
}

@media (min-width: 768px) {
  .hp-float-cart.hp-pdp-sticky-dock {
    display: block;
    position: static;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hp-float-cart,
  .hp-float-cart:hover,
  .hp-float-cart:focus-visible {
    transition: none !important;
    transform: none !important;
  }

  .hp-float-cart__badge.is-pop,
  .hp-mobile-bottom-bar__badge.is-pop {
    animation: none !important;
  }
}
