/* ===== Sticky header base ===== */
.sticky-header{
  position: relative;
  width: 100%;
  z-index: 10;
  background: #fff;
}

body.has-sticky-header .sticky-header{
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}

/* Add spacing ONLY when sticky is active (adjust height!) */
body.has-sticky-header{
  padding-top: 80px; /* match sticky header height */
}

/* Default (NOT sticky): give it 5px top margin */
body:not(.has-sticky-header) .sticky-header{
  margin-top: 5px;
}

/* Sticky active: no margin so it sits flush at the top */
body.has-sticky-header .sticky-header{
  margin-top: 0 !important;
}


/* ===== Hide/show the CART CONTAINER (prevents empty space) ===== */
body:not(.has-sticky-header) .sticky-header .sticky-cart{
  display: none !important;
}
body.has-sticky-header .sticky-header .sticky-cart{
  display: flex !important;
  align-items: center;
}

/* Safety: if something still shows, hide cart block too */
body:not(.has-sticky-header) .sticky-header #hfe-site-header-cart{
  display: none !important;
}
body.has-sticky-header .sticky-header #hfe-site-header-cart{
  display: block !important;
}

/* ===== Layout: price next to cart ===== */
body.has-sticky-header .sticky-header #hfe-site-header-cart .hfe-cart-container{
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  overflow: visible !important;
}

/* The injected subtotal element */
body.has-sticky-header .sticky-header .hfe-cart-subtotal{
  display: inline-block !important;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0.9;
}


