/* ==========================================================================
   East Coast Filters — header mini cart + slide-out.

   Loaded site-wide (the header is on every page), unlike kohper-b2b.css
   which is scoped to the Kohper and shop screens. Nothing here is
   Kohper-specific: it dresses Bricks' own Mini Cart element and
   WooCommerce's mini-cart markup.
   ==========================================================================
   Markup comes from Bricks' Mini Cart element:

     .brxe-woocommerce-mini-cart
       a > .cart-icon > [icon] + .cart-count
           .cart-subtotal
       .cart-detail[.off-canvas.right]      ← the slide-out panel
         .widget_shopping_cart_content      ← WooCommerce's own mini-cart markup
         button.bricks-mini-cart-close
       .off-canvas-overlay

   Place the element in the Header template, set Cart details → Off canvas →
   Right, and tick "Open on add to cart (AJAX)". These rules dress it; the
   open/close behaviour is Bricks'. */

/* ---- Trigger ------------------------------------------------------------ */
.brxe-woocommerce-mini-cart > a{
  display:inline-flex;align-items:center;gap:.6em;
  text-decoration:none;color:var(--ink);
  font-family:var(--font-head);font-weight:700;font-size:var(--fs-sm);
}
.brxe-woocommerce-mini-cart > a:hover{color:var(--green-700)}
.brxe-woocommerce-mini-cart .cart-icon{position:relative;display:inline-flex;line-height:0}
.brxe-woocommerce-mini-cart .cart-count{
  position:absolute;top:-8px;right:-10px;
  min-width:19px;height:19px;padding:0 5px;
  display:inline-flex;align-items:center;justify-content:center;
  font-family:var(--font-mono);font-size:11px;font-weight:700;line-height:1;
  color:#fff;background:var(--amber-500);border-radius:999px;
}
/* The element adds .hide-empty-count itself; this is the styling half. */
.brxe-woocommerce-mini-cart.hide-empty-count .cart-count:empty{display:none}
.brxe-woocommerce-mini-cart .cart-subtotal{
  font-family:var(--font-mono);font-size:var(--fs-xs);color:var(--muted);white-space:nowrap;
}

/* ---- Slide-out panel ---------------------------------------------------- */
.brxe-woocommerce-mini-cart .cart-detail{
  background:var(--card);color:var(--ink);
  border-left:1px solid var(--line);box-shadow:var(--shadow-lg);
}
.brxe-woocommerce-mini-cart .cart-detail.off-canvas{
  width:min(420px,100vw);max-width:100vw;
  display:flex;flex-direction:column;
  padding:var(--sp-6) var(--sp-5);
}
.brxe-woocommerce-mini-cart .off-canvas-overlay{background:rgba(15,30,22,.45)}

.brxe-woocommerce-mini-cart .bricks-mini-cart-close{
  position:absolute;top:var(--sp-4);right:var(--sp-4);
  width:36px;height:36px;display:grid;place-items:center;cursor:pointer;
  color:var(--muted);background:var(--surface);
  border:1px solid var(--line);border-radius:var(--radius-sm);
  transition:color .15s,border-color .15s,background .15s;
}
.brxe-woocommerce-mini-cart .bricks-mini-cart-close:hover{
  color:var(--ink);border-color:var(--green-400);background:var(--green-100);
}

/* ---- WooCommerce mini-cart contents ------------------------------------- */
.brxe-woocommerce-mini-cart .widget_shopping_cart_content{
  display:flex;flex-direction:column;min-height:0;flex:1;
}
.brxe-woocommerce-mini-cart .woocommerce-mini-cart{
  flex:1;min-height:0;overflow-y:auto;margin:0 0 var(--sp-4);padding:0;list-style:none;
}
.brxe-woocommerce-mini-cart .woocommerce-mini-cart-item{
  display:flex;align-items:flex-start;gap:var(--sp-3);
  padding:var(--sp-4) 0;border-bottom:1px solid var(--line-2);
  font-size:var(--fs-sm);line-height:1.5;position:relative;
}
/* No thumbnail. Every product on this store carries the placeholder, so this
   was an identical grey square on every line of the drop-down. */
.brxe-woocommerce-mini-cart .woocommerce-mini-cart-item img{display:none}
.brxe-woocommerce-mini-cart .woocommerce-mini-cart-item a:not(.remove){
  font-family:var(--font-head);font-weight:700;color:var(--ink);text-decoration:none;
}
.brxe-woocommerce-mini-cart .woocommerce-mini-cart-item a:not(.remove):hover{color:var(--green-700)}
.brxe-woocommerce-mini-cart .woocommerce-mini-cart-item .quantity{
  display:block;margin-top:2px;
  font-family:var(--font-mono);font-size:var(--fs-xs);color:var(--muted);
}

/* One column: name, then the spec, then the quantity. As a flex row the spec
   list of a made-to-order line ran beside the name as a second column and the
   bare quantity sat up against the remove ×, where it read as a footnote.
   The right padding keeps every line clear of the ×. */
.brxe-woocommerce-mini-cart .woocommerce-mini-cart-item{display:block;padding-right:32px}
.brxe-woocommerce-mini-cart .woocommerce-mini-cart-item dl.variation{
  display:grid;grid-template-columns:auto 1fr;gap:2px 8px;
  margin:6px 0 0;font-size:var(--fs-xs);color:var(--muted);
}
.brxe-woocommerce-mini-cart .woocommerce-mini-cart-item dl.variation dt{font-weight:600;margin:0}
.brxe-woocommerce-mini-cart .woocommerce-mini-cart-item dl.variation dd{margin:0}
.brxe-woocommerce-mini-cart .woocommerce-mini-cart-item dl.variation dd p{margin:0}

/* The quantity stepper (ecf-custom-mods/inc/mini-cart-qty.php). */
.ecf-mcqty{display:flex;align-items:center;gap:10px;margin-top:10px}
.ecf-mcqty__label{
  font-family:var(--font-mono);font-size:var(--fs-xs);font-weight:600;
  letter-spacing:.06em;text-transform:uppercase;color:var(--muted);
}
.ecf-mcqty__stepper{
  display:inline-flex;align-items:stretch;overflow:hidden;background:var(--white);
  border:1.5px solid var(--line);border-radius:var(--radius-sm);
}
.ecf-mcqty__btn{
  width:34px;min-height:34px;padding:0;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:var(--fs-base);line-height:1;color:var(--ink);background:none;border:0;
}
.ecf-mcqty__btn:hover:not(:disabled){background:var(--green-100);color:var(--green-700)}
.ecf-mcqty__btn:disabled{opacity:.35;cursor:default}
.ecf-mcqty__input{
  width:48px;min-height:34px;padding:0;text-align:center;
  font-family:var(--font-head);font-weight:700;font-size:var(--fs-sm);color:var(--ink);
  background:none;border:0;border-inline:1.5px solid var(--line);border-radius:0;
  -moz-appearance:textfield;
}
.ecf-mcqty__input::-webkit-outer-spin-button,
.ecf-mcqty__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.ecf-mcqty.is-busy{opacity:.55;pointer-events:none}

/* "Subtotal:" with nothing after it — prices are hidden on this store, so the
   row is a label for a figure that never appears. There used to be a styling
   rule for the row further down this file, and being later at the same
   specificity its display:flex won — which is why the client still saw it. */
.brxe-woocommerce-mini-cart .woocommerce-mini-cart__total{display:none}
.brxe-woocommerce-mini-cart .woocommerce-mini-cart-item a.remove{
  position:absolute;top:var(--sp-4);right:0;
  width:22px;height:22px;display:grid;place-items:center;
  font-size:16px;line-height:1;text-decoration:none;
  color:var(--muted);border-radius:var(--radius-sm);
}
.brxe-woocommerce-mini-cart .woocommerce-mini-cart-item a.remove:hover{
  color:var(--ecf-danger);background:var(--ecf-danger-bg);
}

.brxe-woocommerce-mini-cart .woocommerce-mini-cart__empty-message{
  padding:var(--sp-7) 0;text-align:center;color:var(--muted);font-size:var(--fs-sm);
}

/* Two actions: View cart is secondary, Checkout is the commitment. */
.brxe-woocommerce-mini-cart .woocommerce-mini-cart__buttons{
  display:grid;gap:var(--sp-3);grid-template-columns:1fr 1fr;margin:0;
}
.brxe-woocommerce-mini-cart .woocommerce-mini-cart__buttons a{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:48px;padding:13px 18px;text-decoration:none;white-space:nowrap;
  font-family:var(--font-head);font-weight:700;font-size:var(--fs-sm);line-height:1;
  border-radius:var(--radius-sm);border:2px solid var(--line);
  color:var(--green-700);background:var(--white);
  transition:border-color .15s,background .15s,color .15s,box-shadow .15s;
}
.brxe-woocommerce-mini-cart .woocommerce-mini-cart__buttons a:hover{
  border-color:var(--green-500);background:var(--green-100);color:var(--green-800);
}
.brxe-woocommerce-mini-cart .woocommerce-mini-cart__buttons a.checkout{
  color:#fff;background:var(--amber-500);border-color:var(--amber-500);
}
.brxe-woocommerce-mini-cart .woocommerce-mini-cart__buttons a.checkout:hover{
  background:var(--amber-600);border-color:var(--amber-600);color:#fff;
}
