/* Header cart count and slide-in mini cart. */
.bz-hb .bz-cart-link{position:relative}
.bz-cart-count{position:absolute;top:-4px;inset-inline-start:calc(100% - 4px);min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#ff791a;color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center;box-sizing:border-box}
.bz-hb .bz-cart-link .bz-fa-icon{position:relative}
/* No badge is rendered visually when the cart is empty. */
.bz-cart-count.is-empty{display:none!important}
.bz-cart-total{display:none;margin-inline-start:6px;font-weight:600;font-size:14px}
@media(min-width:768px){.bz-hb .bz-cart-link .bz-cart-total{display:inline}.bz-cart-count{inset-inline-start:auto;inset-inline-end:auto;left:22px}}
.bz-cart-total .woocommerce-Price-currencySymbol{margin-inline-end:2px}

html.bz-minicart-open{overflow:hidden}
.bz-minicart{position:fixed;inset:0;z-index:100000;visibility:hidden}
.bz-minicart:not([hidden]){visibility:visible}
.bz-minicart__overlay{position:absolute;inset:0;background:rgba(29,42,34,.45);opacity:0;transition:opacity .2s ease}
.bz-minicart__panel{position:absolute;top:0;bottom:0;inset-inline-end:0;display:flex;flex-direction:column;width:min(400px,100vw);background:#fff;box-shadow:-8px 0 30px rgba(29,42,34,.18);transform:translateX(100%);transition:transform .22s ease;outline:0}
[dir=rtl] .bz-minicart__panel{transform:translateX(-100%)}
.bz-minicart.is-open .bz-minicart__overlay{opacity:1}
.bz-minicart.is-open .bz-minicart__panel{transform:none}
.bz-minicart__header{display:flex;align-items:center;justify-content:space-between;padding:18px 20px}
.bz-minicart__header h2{margin:0;font-size:18px;font-weight:700;color:#1d2a22}
.bz-minicart__close{width:36px;height:36px;border:0;border-radius:5px;background:#f6f7f6;color:#1d2a22;font-size:22px;line-height:1;cursor:pointer}
.bz-minicart__close:hover,.bz-minicart__close:focus-visible{background:var(--bz-primary,#2f7d4f);color:#fff;outline:0}
.bz-minicart__status{margin:0 20px 8px;padding:8px 12px;border-radius:5px;background:#fbeceb;color:#c0392b;font-size:13px}
.bz-minicart__status:empty{display:none}
.bz-minicart .widget_shopping_cart_content{display:flex;flex-direction:column;flex:1;min-height:0;padding:0 20px 20px}
.bz-minicart.is-busy .widget_shopping_cart_content{opacity:.55;pointer-events:none}
.bz-minicart ul.woocommerce-mini-cart{flex:1;min-height:0;margin:0;padding:0;overflow-y:auto;list-style:none}
.bz-minicart li.woocommerce-mini-cart-item{position:relative;display:grid;grid-template-columns:64px minmax(0,1fr);column-gap:12px;row-gap:6px;align-items:start;margin:0 0 10px;padding:12px 40px 12px 12px;border:0;border-radius:5px;background:#f6f7f6}
.bz-minicart li.woocommerce-mini-cart-item>a:not(.remove){display:contents;color:#1d2a22;font-weight:600;text-decoration:none;line-height:1.35}
.bz-minicart li.woocommerce-mini-cart-item img{grid-column:1;grid-row:1/4;width:64px!important;height:64px!important;object-fit:cover;border-radius:5px;background:#fff;float:none;margin:0}
.bz-minicart a.remove{position:absolute;top:8px;inset-inline-end:8px;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:5px;background:#fff;color:#5f6b7a!important;font-size:16px;line-height:1;text-decoration:none}
.bz-minicart a.remove:hover{background:#c0392b;color:#fff!important}
.bz-minicart li.woocommerce-mini-cart-item .variation{grid-column:2;margin:0;font-size:12px;color:#5f6b7a}
.bz-minicart li.woocommerce-mini-cart-item .quantity{grid-column:2;display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:4px;font-size:13px;color:#1d2a22}
.bz-mq{display:inline-flex;align-items:center;border-radius:5px;background:#fff;overflow:hidden}
.bz-mq__btn{width:30px;height:30px;border:0;background:transparent;color:#1d2a22;font-size:16px;line-height:1;cursor:pointer}
.bz-mq__btn:hover:not([disabled]),.bz-mq__btn:focus-visible{background:var(--bz-primary,#2f7d4f);color:#fff;outline:0}
.bz-mq__btn[disabled]{opacity:.35;cursor:default}
.bz-mq__n{min-width:28px;text-align:center;font-weight:600}
.bz-mq__price .woocommerce-Price-amount{font-weight:700;color:var(--bz-primary,#2f7d4f)}
.bz-minicart .woocommerce-mini-cart__total{display:flex;justify-content:space-between;margin:12px 0;padding:0;border:0;font-size:15px;color:#1d2a22}
.bz-minicart .woocommerce-mini-cart__total strong{font-weight:600}
.bz-minicart .woocommerce-mini-cart__buttons{display:grid;gap:8px;margin:0}
.bz-minicart .woocommerce-mini-cart__buttons a.button{display:flex;align-items:center;justify-content:center;min-height:46px;margin:0;border-radius:5px;font-weight:600;text-decoration:none}
.bz-minicart .woocommerce-mini-cart__buttons a.button:not(.checkout){background:#f6f7f6;color:#1d2a22;border:1px solid #dfe3df}
.bz-minicart .woocommerce-mini-cart__buttons a.button:not(.checkout):hover{border-color:var(--bz-primary,#2f7d4f);color:var(--bz-primary,#2f7d4f)}
.bz-minicart .woocommerce-mini-cart__buttons a.button.checkout{background:var(--bz-primary,#2f7d4f);color:#fff;border:1px solid var(--bz-primary,#2f7d4f)}
.bz-minicart .woocommerce-mini-cart__buttons a.button.checkout:hover{background:#256640}
.bz-minicart .woocommerce-mini-cart__empty-message{margin:24px 0;padding:28px 16px;border-radius:5px;background:#f6f7f6;color:#5f6b7a;text-align:center}
@media(prefers-reduced-motion:reduce){.bz-minicart__overlay,.bz-minicart__panel{transition:none}}
.bz-minicart a.remove{top:50%;transform:translateY(-50%)}
.bz-minicart li.woocommerce-mini-cart-item{align-items:center}
.bz-minicart .bz-shipping-bar-mini-wrap{margin:0 0 16px}
.bz-minicart .woocommerce-mini-cart__buttons{margin-top:16px}
.bz-hb .bz-wishlist-link,.bz-hb .bz-compare-link{position:relative}
.bz-hd-badge{position:absolute;top:2px;inset-inline-end:-2px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#ff791a;color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center;box-sizing:border-box}
.bz-hd-badge.is-empty{display:none}
.bz-cart-total{margin-inline-start:8px}
.bz-hb .bz-hb-zone--right{gap:14px}
@media(min-width:768px){.bz-hb .bz-cart-link{padding-inline-end:6px}}
.bz-hb .bz-cart-count,.bz-hb .bz-hd-badge{top:calc(50% - 21px)}
.bz-minicart dl.variation:has(.variation-Includes,.variation-Freegift,.variation-Bonus){margin:0;padding:0;border:0;display:block}
.bz-minicart dl.variation:has(.variation-Includes,.variation-Freegift,.variation-Bonus) dt{display:none}
.bz-minicart dl.variation:has(.variation-Includes,.variation-Freegift,.variation-Bonus) dd{margin:0;padding:0;border:0}
.bz-minicart dl.variation:has(.variation-Includes,.variation-Freegift,.variation-Bonus) dd p{margin:0}
.bz-minicart .bz-bundle-includes{margin:0}
/* Bonus row (gift or discount choice): label and value on one line, below the Includes list. */
.bz-minicart dl.variation dd.variation-Includes{display:block}
.bz-minicart dl.variation dt.variation-Bonus{display:inline;margin:0 .3em 0 0;font-weight:400}
.bz-minicart dl.variation dd.variation-Bonus,.bz-minicart dl.variation dd.variation-Bonus p{display:inline;margin:0}
.bz-minicart dl.variation dt.variation-Bonus::before{content:"";display:block;height:2px}

/* Keep the header count independent of page templates and Woo Blocks controls. */
html body .bz-hb .bz-cart-link{position:relative;overflow:visible}
html body .bz-hb .bz-cart-link>.bz-cart-count{display:inline-flex!important;position:absolute!important;z-index:3;align-items:center;justify-content:center;top:calc(50% - 21px)!important;left:22px!important;right:auto!important;inset-inline-start:auto!important;inset-inline-end:auto!important;min-width:18px;min-height:18px;height:18px;padding:0 5px;background:#ff791a;color:#fff;border-radius:9px;font-size:11px;line-height:18px;white-space:nowrap;box-sizing:border-box;pointer-events:none}

/* The fallback header uses the same WooCommerce cart markup as Header Builder.
   Both must retain identical orange count placement on Cart/Checkout and Shop. */
html body .bz-header .bz-cart-link{position:relative;overflow:visible}
html body .bz-header .bz-cart-link>.bz-cart-count{display:inline-flex!important;position:absolute!important;z-index:3;align-items:center;justify-content:center;top:calc(50% - 21px)!important;left:22px!important;right:auto!important;inset-inline-start:auto!important;inset-inline-end:auto!important;min-width:18px;min-height:18px;height:18px;padding:0 5px;background:#ff791a;color:#fff;border-radius:9px;font-size:11px;font-weight:700;line-height:18px;white-space:nowrap;box-sizing:border-box;pointer-events:none}
@media(min-width:768px){.bz-header .bz-cart-link .bz-cart-total{display:inline}}

/* Anchor the count to the shopping bag, not to the combined icon/label/price link.
   The nested span is also replaced by WooCommerce's normal cart fragments. */
html body .bz-cart-link .bz-cart-icon-wrap {
  display:inline-flex;
  position:relative;
  align-items:center;
  justify-content:center;
  flex:0 0 21px;
  width:21px;
  height:21px;
  overflow:visible;
}
html body .bz-cart-link .bz-cart-icon-wrap > .bz-fa-icon { flex:0 0 21px; }
html body :is(.bz-hb,.bz-header) .bz-cart-link .bz-cart-icon-wrap > .bz-cart-count {
  position:absolute!important;
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  top:-10px!important;
  right:-10px!important;
  bottom:auto!important;
  left:auto!important;
  inset-inline-start:auto!important;
  inset-inline-end:-10px!important;
  z-index:3;
  min-width:18px;
  min-height:18px;
  height:18px;
  padding:0 5px;
  margin:0;
  border-radius:9px;
  background:#ff791a;
  color:#fff;
  font-size:11px;
  font-weight:700;
  line-height:18px;
  text-align:center;
  box-sizing:border-box;
  white-space:nowrap;
  pointer-events:none;
}

/* The zero state must beat the icon-anchored badge rules in both headers. */
html body :is(.bz-hb,.bz-header) .bz-cart-link .bz-cart-icon-wrap > .bz-cart-count.is-empty,
html body :is(.bz-hb,.bz-header) .bz-cart-link > .bz-cart-count.is-empty {
  display:none!important;
}

/* Keep mobile icons visible: badge sits just outside the cart glyph,
   rather than covering its center or overlapping the hamburger action. */
@media(max-width:767px){
  html body :is(.bz-hb,.bz-header) .bz-cart-link{overflow:visible;padding-inline-end:10px}
  html body :is(.bz-hb,.bz-header) .bz-cart-link .bz-cart-icon-wrap{position:relative;flex:0 0 21px;width:21px;height:21px;overflow:visible}
  html body :is(.bz-hb,.bz-header) .bz-cart-link .bz-cart-icon-wrap > .bz-fa-icon--cart{display:block;flex:0 0 21px;width:21px;height:21px;opacity:1}
  html body :is(.bz-hb,.bz-header) .bz-cart-link .bz-cart-icon-wrap > .bz-cart-count{
    top:-8px!important;right:-9px!important;left:auto!important;
    inset-inline-end:-9px!important;inset-inline-start:auto!important;
    min-width:15px;min-height:15px;height:15px;padding:0 3px;border-radius:9px;
    font-size:10px;line-height:15px;transform:none!important
  }
  /* Respect configured Wishlist/Compare items; show their full icons if present. */
  html body .bz-hb :is(.bz-wishlist-link,.bz-compare-link){flex-shrink:0;min-width:36px}
  html body .bz-hb .bz-wishlist-link .bz-hb-heart,
  html body .bz-hb .bz-compare-link .bz-hb-compare-icon{display:inline-block;flex:0 0 24px;width:24px;height:24px;opacity:1}
}
