/* InkFusion header cart icon — v28 (square, ink, hard-edged orange badge). */
.ifd-hcart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: 8px;
  color: #151310;
  text-decoration: none;
  flex: 0 0 auto;
}
.ifd-hcart svg {
  display: block;
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ifd-hcart svg circle { fill: currentColor; stroke: none; }
.ifd-hcart:hover { color: #00a7e1; }
.ifd-hcart__n {
  position: absolute;
  top: 3px;
  right: 1px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ff5a1f;
  /* was #fff on #ff5a1f = 3.12:1, below AA. Ink on the same orange is 5.95:1. */
  color: #151310;
  font-family: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  border: 2px solid #efe9db;
}

/*
 * THE EMPTY-CART "0" — 2026-08-10.
 *
 * header-cart.js sets `badge.hidden = true` at zero, and it always has. The
 * badge showed a permanent orange 0 anyway, because `display: inline-flex`
 * above beats the browser's UA `[hidden] { display: none }` rule on specificity.
 * The JS was right; the stylesheet quietly overruled it.
 *
 * This is why the site advertised an empty cart on every page to every visitor.
 */
.ifd-hcart__n[hidden] { display: none !important; }
.ifd-hcart.has svg { color: #151310; }

/* Fallback when there's no recognisable header. */
.ifd-hcart--fixed {
  position: fixed;
  top: 12px;
  right: 14px;
  z-index: 99999;
  background: #efe9db;
  border: 2.5px solid #151310;
  box-shadow: 3px 3px 0 #151310;
}

@media (max-width: 720px) {
  .ifd-hcart { width: 40px; height: 40px; margin-left: 4px; }
}

/* The persistent header cart icon replaces the per-builder cart-review pills
   (the "+1 item from other builders" popover). The add-to-cart buttons stay. */
#ifgs-cart-pill,
.ifgs-cart-pill,
#mob-cart-pill,
.gs-mob-cart-pill {
  display: none !important;
}
