/* =====================================================================
   Lazarus Labs — slide-out cart drawer (.lld)
   Matches the rebuilt cart page (dark + lime, Montserrat/Inter, .citem cards).
   Markup: inc/ll-cart-drawer.php (shell + AJAX fragment). Logic: ll-cart-drawer.js.
   Self-contained tokens so it renders identically on every page.
   ===================================================================== */
.lld{
  --bg:#0A0C0A; --panel:#11161C; --panel-2:#0F1318; --panel-3:#0A0F14;
  --line:#1E2631; --line-soft:rgba(255,255,255,.08); --line-lime:rgba(167,210,45,.30);
  --lime:#A7D22D; --lime-hot:#C7F33B; --on-lime:#0A0D06;
  --text:#ECEFE6; --muted:#AEB6BF; --muted-2:#8A939D;
  --shadow:0 24px 70px rgba(0,0,0,.55); --ease:cubic-bezier(.2,.75,.2,1);
  --sans:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  --display:Montserrat,Inter,sans-serif;

  position:fixed; inset:0; z-index:100000;
  display:grid; justify-items:end;
  pointer-events:none; visibility:hidden; opacity:0;
  transition:opacity .2s var(--ease), visibility .2s var(--ease);
  font-family:var(--sans);
}
.lld.is-open{ pointer-events:auto; visibility:visible; opacity:1; }
body.lld-open{ overflow:hidden; }

.lld__overlay{
  position:absolute; inset:0;
  background:rgba(2,5,8,.62); backdrop-filter:blur(7px); -webkit-backdrop-filter:blur(7px);
  opacity:0; transition:opacity .3s var(--ease); cursor:pointer;
}
.lld.is-open .lld__overlay{ opacity:1; }

.lld__panel{
  position:relative; z-index:1;
  display:grid; grid-template-rows:auto 1fr auto;
  /* dvh must WIN: 100vh on mobile is taller than the visible viewport (it spans
     behind the browser toolbar), which pushed the .lld__foot checkout button
     off-screen. Order matters — the later valid declaration wins, so 100dvh last. */
  width:min(100%, 432px); height:100vh; height:100dvh;
  background:
    linear-gradient(135deg, rgba(167,210,45,.07), rgba(167,210,45,0) 34%),
    linear-gradient(180deg, var(--panel), #07090d);
  border-left:1px solid var(--line-lime);
  box-shadow:var(--shadow), inset 1px 0 0 rgba(255,255,255,.04);
  transform:translateX(100%);
  transition:transform .42s var(--ease);
  will-change:transform;
}
.lld.is-open .lld__panel{ transform:translateX(0); }

/* focus visibility */
.lld :is(a,button):focus-visible{ outline:2px solid var(--lime-hot); outline-offset:2px; }

/* head */
.lld__head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:20px 22px 16px; border-bottom:1px solid var(--line-soft); }
.lld__kicker{ display:block; font:800 10px/1 var(--display); letter-spacing:.14em; text-transform:uppercase; color:var(--lime); margin-bottom:7px; }
.lld__title{ font:900 18px/1 var(--display); text-transform:uppercase; letter-spacing:.02em; color:#fff; margin:0; }
.lld__close{ appearance:none; -webkit-appearance:none; flex:0 0 40px; width:40px; height:40px; padding:0; margin:0; display:grid; place-items:center; border-radius:11px !important; border:1px solid var(--line); background:var(--panel-2); color:var(--muted); box-shadow:none !important; cursor:pointer; transition:border-color .18s var(--ease), color .18s var(--ease); }
.lld__close:hover{ border-color:var(--line-lime); color:#fff; }
.lld__close svg{ width:18px; height:18px; }

/* body */
.lld__body{ overflow-y:auto; overflow-x:hidden; padding:18px 22px; display:flex; flex-direction:column; gap:16px; -webkit-overflow-scrolling:touch; }
.lld.is-busy .lld__body{ opacity:.5; pointer-events:none; }
.lld.is-busy .lld__body{ transition:opacity .15s var(--ease); }

/* free-ship progress (reuses .ship-prog markup) */
.lld__shipbar .ship-prog{ margin:0; }
.lld .ship-prog__top{ display:flex; justify-content:space-between; align-items:baseline; gap:10px; font:800 10px/1 var(--display); letter-spacing:.07em; text-transform:uppercase; color:var(--muted); margin-bottom:9px; }
.lld .ship-prog__top b{ color:var(--lime-hot); font-weight:800; }
.lld .ship-prog__top b .woocommerce-Price-amount{ color:var(--lime-hot); }
.lld .ship-prog__bar{ position:relative; height:8px; border-radius:99px; background:rgba(255,255,255,.08); overflow:hidden; box-shadow:inset 0 0 0 1px rgba(255,255,255,.05); }
.lld .ship-prog__bar i{ display:block; height:100%; width:0; border-radius:inherit; background:linear-gradient(90deg,var(--lime),var(--lime-hot)); box-shadow:0 0 16px rgba(167,210,45,.45); transition:width .5s var(--ease); }
.lld .ship-prog.unlocked .ship-prog__bar{ box-shadow:inset 0 0 0 1px rgba(167,210,45,.4), 0 0 16px rgba(167,210,45,.3); }
.lld .ship-prog .tax_label{ display:none; }

/* item cards */
.lld__items{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; }
.lld-item{ display:grid; grid-template-columns:64px 1fr auto; gap:13px; align-items:start; padding:12px; border:1px solid var(--line); border-radius:14px; background:linear-gradient(180deg,var(--panel),var(--panel-2)); }
.lld-item__media{ display:block; width:64px; height:64px; }
.lld-item__media img{ width:64px; height:64px; border-radius:10px; object-fit:cover; border:1px solid var(--line); background:#0a0f14; display:block; }
.lld-item__info{ min-width:0; }
.lld-item__name{ display:block; font:800 13px/1.2 var(--display); text-transform:uppercase; letter-spacing:.01em; color:#fff; }
.lld-item__name a{ color:#fff; text-decoration:none; }
.lld-item__name a:hover{ color:var(--lime); }
.lld-item__meta{ display:block; margin-top:4px; font:600 11px/1.3 var(--sans); color:var(--muted); }
.lld-item__coa{ color:var(--lime); }
.lld-item__controls{ display:flex; align-items:center; gap:12px; margin-top:10px; }
/* qty stepper — hard-reset against the theme's global <button> styles
   (pill radius, big padding, lime-glow shadow) so it reads as one tidy control. */
.lld .lld-item__qty{ display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:9px; overflow:hidden; background:var(--panel-3); }
.lld .lld-item__qty .lld-qty__btn{
  appearance:none !important; -webkit-appearance:none !important;
  flex:0 0 30px; width:30px !important; min-width:30px !important; max-width:30px;
  height:30px !important; min-height:30px !important;
  margin:0 !important; padding:0 !important;
  border:0 !important; border-radius:0 !important; box-shadow:none !important;
  background:var(--panel-2) !important; color:#fff !important;
  font:700 16px/1 var(--display) !important; cursor:pointer;
  display:grid; place-items:center; transition:background .15s, color .15s;
}
.lld .lld-item__qty .lld-qty__btn:hover:not(:disabled){ background:var(--panel) !important; color:var(--lime) !important; }
.lld .lld-item__qty .lld-qty__btn:disabled{ opacity:.4 !important; cursor:default; box-shadow:none !important; }
.lld .lld-item__qty .lld-qty__val{ min-width:34px; height:30px; display:grid; place-items:center; padding:0 4px; text-align:center; font:800 12px/1 var(--display); color:#fff; border-left:1px solid var(--line); border-right:1px solid var(--line); font-variant-numeric:tabular-nums; }
.lld-item__remove{ font:700 10px/1 var(--display); letter-spacing:.06em; text-transform:uppercase; color:var(--muted-2); text-decoration:none; transition:color .18s var(--ease); }
.lld-item__remove:hover{ color:#E0683C; }
.lld-item__line{ display:flex; flex-direction:column; align-items:flex-end; gap:3px; text-align:right; white-space:nowrap; }
.lld-item__was{ font:600 11px/1 var(--sans); color:var(--muted-2); text-decoration:line-through; }
.lld-item__was .woocommerce-Price-amount{ color:var(--muted-2); }
.lld-item__now{ font:900 14px/1 var(--display); color:#fff; font-variant-numeric:tabular-nums; }
.lld-item__now .woocommerce-Price-amount{ color:#fff; }
.lld-item__tax{ font:600 9px/1 var(--sans); letter-spacing:.03em; color:var(--muted-2); }
.lld-item__save{ font:800 8.5px/1 var(--display); letter-spacing:.05em; text-transform:uppercase; color:var(--on-lime); background:var(--lime); padding:3px 6px; border-radius:6px; }
.lld-item__save .woocommerce-Price-amount{ color:var(--on-lime); }
.lld .tax_label{ display:none; }
.lld-item.is-removing{ opacity:0; transform:translateX(24px) scale(.98); pointer-events:none; transition:opacity .22s var(--ease), transform .22s var(--ease); }

/* next-tier bundle savings nudge */
.lld-nudge{ display:flex; align-items:center; gap:12px; margin-top:2px; padding:12px 14px; border:1px solid var(--line-lime); border-radius:13px; background:linear-gradient(135deg, rgba(167,210,45,.12), rgba(167,210,45,.02)); }
.lld-nudge__icon{ width:22px; height:22px; flex:0 0 22px; color:var(--lime-hot); stroke:currentColor; fill:none; stroke-width:1.7; }
.lld-nudge__copy{ flex:1; min-width:0; }
.lld-nudge__copy b{ display:block; font:800 12px/1.2 var(--display); text-transform:uppercase; letter-spacing:.02em; color:#fff; }
.lld-nudge__copy span{ display:block; margin-top:3px; font:600 11px/1.3 var(--sans); color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lld .lld-nudge__add{ appearance:none !important; -webkit-appearance:none !important; flex:0 0 auto; padding:0 14px !important; height:34px; min-height:34px !important; margin:0 !important; border:0 !important; border-radius:9px !important; background:linear-gradient(180deg,var(--lime-hot),var(--lime)) !important; color:var(--on-lime) !important; box-shadow:none !important; font:900 11px/1 var(--display) !important; letter-spacing:.04em; text-transform:uppercase; cursor:pointer; white-space:nowrap; transition:filter .15s; }
.lld .lld-nudge__add:hover{ filter:brightness(1.06); }

/* footer */
.lld__foot{ padding:16px 22px calc(20px + env(safe-area-inset-bottom, 0px)); border-top:1px solid var(--line); background:linear-gradient(180deg, transparent, rgba(0,0,0,.25)); }
.lld-pass{
  --llp-lime:#A7D22D;
  --llp-lime-hot:#C7F33B;
  --llp-ink:#EAF2DC;
  --llp-muted:#9AA3B0;
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
  padding:12px 14px;
  border:1px solid rgba(167,210,45,.28);
  border-radius:14px;
  background:linear-gradient(135deg, rgba(167,210,45,.10), rgba(167,210,45,.03) 55%), rgba(13,17,12,.85);
  text-decoration:none;
  transition:border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.lld-pass:hover{
  border-color:rgba(199,243,59,.55);
  box-shadow:0 10px 28px rgba(167,210,45,.14);
  transform:translateY(-1px);
}
.lld-pass__mark{
  flex:0 0 34px;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:10px;
  color:var(--llp-lime-hot);
  background:rgba(167,210,45,.14);
  box-shadow:0 0 0 0 rgba(199,243,59,.35);
  animation:lld-pass-mark-pulse 3.2s ease-in-out infinite;
}
.lld-pass__mark svg{ width:18px; height:18px; }
@keyframes lld-pass-mark-pulse{
  0%, 100%{ box-shadow:0 0 0 0 rgba(199,243,59,.28); }
  50%{ box-shadow:0 0 0 6px rgba(199,243,59,0); }
}
.lld-pass__copy{ flex:1 1 auto; min-width:0; display:block; }
.lld-pass__copy b{ display:block; font-weight:800; font-size:.92rem; line-height:1.25; color:var(--llp-ink); }
.lld-pass__copy b .woocommerce-Price-amount{ color:var(--llp-lime-hot); }
.lld-pass__copy > span{ display:block; margin-top:2px; font-size:.74rem; line-height:1.35; letter-spacing:.02em; color:var(--llp-muted); }
.lld-pass__go{ flex:0 0 auto; color:var(--llp-lime-hot); transition:transform .25s ease; }
.lld-pass__go svg{ width:16px; height:16px; display:block; }
.lld-pass:hover .lld-pass__go{ transform:translateX(3px); }
.lld__subtotal{ display:flex; justify-content:space-between; align-items:baseline; font:700 14px/1.3 var(--sans); color:var(--muted); margin-bottom:3px; }
.lld__subtotal-amt{ font:900 18px/1 var(--display); color:#fff; font-variant-numeric:tabular-nums; }
.lld__subtotal-amt .woocommerce-Price-amount{ color:#fff; }
.lld__summary{ margin-bottom:12px; padding:13px 14px; border:1px solid var(--line-lime); border-radius:13px; background:linear-gradient(180deg,rgba(17,22,28,.92),rgba(8,12,16,.8)); box-shadow:inset 0 1px 0 rgba(255,255,255,.04); }
.lld__summary .lld__subtotal{ margin-bottom:6px; }
.lld__summary .lld__fineprint{ margin:0; }
/* Sale/credit rows from ll_bf2026_render_cart_discount_row(): the full-price subtotal steps down, the total after them leads. */
.lld__summary--discounted .lld__subtotal:not(.lld__total) .lld__subtotal-amt,
.lld__summary--discounted .lld__subtotal:not(.lld__total) .lld__subtotal-amt .woocommerce-Price-amount{ font:700 14px/1.3 var(--sans); color:var(--muted); }
.lld__summary .cart-discount{ display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin-bottom:6px; font:700 14px/1.3 var(--sans); color:var(--lime-hot); font-variant-numeric:tabular-nums; }
.lld__summary .cart-discount .woocommerce-Price-amount{ color:inherit; }
.lld__summary .lld__total{ padding-top:7px; border-top:1px solid rgba(255,255,255,.08); color:#fff; }
.lld__fineprint{ font:500 12px/1.45 var(--sans); color:var(--muted); margin:0 0 12px; }
.lld__guest{ margin:0 0 10px; color:var(--lime-hot); font:600 12px/1.4 var(--sans); }
.lld__fineprint + .lld__fineprint{ margin-top:-8px; }
.lld__fineprint a{ color:var(--lime-hot, #C7F33B); text-decoration:underline; text-underline-offset:2px; }

/* Afterpay instalment line under the subtotal (inc/ll-bnpl-messaging.php). */
.lld .ll-bnpl{ margin:0 0 6px; font:500 12px/1.45 var(--sans); color:var(--muted); }
.lld .ll-bnpl b{ color:#fff; font-weight:800; }
.lld .ll-bnpl__logo{ display:inline-block; padding:0 6px; border-radius:4px; background:#B2FCE4; color:#0A0A0A; font:800 11px/1.55 Arial,Helvetica,sans-serif; letter-spacing:-.01em; }
.lld .ll-bnpl__info{ color:var(--lime-hot); text-decoration:underline; text-underline-offset:2px; }

/* Product-page "Add Bacteriostatic Water" tick-box (inc/ll-cart-drawer.php). */
.ll-addon-bacwater{ display:flex; align-items:center; gap:10px; flex-basis:100%; grid-column:1 / -1; margin:12px 0 0; padding:11px 14px; border:1px solid rgba(167,210,45,.3); border-radius:12px; font:600 13px/1.35 Inter,system-ui,sans-serif; color:#ECEFE6; cursor:pointer; }
.ll-addon-bacwater input{ width:18px; height:18px; margin:0; flex:0 0 auto; accent-color:#C7F33B; }
.ll-addon-bacwater b{ color:#C7F33B; }
.lld__btn{ display:flex; align-items:center; justify-content:center; gap:9px; width:100%; min-height:52px; border-radius:13px; font:900 13px/1 var(--display); letter-spacing:.04em; text-transform:uppercase; text-decoration:none; cursor:pointer; box-sizing:border-box; transition:filter .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease); }
.lld__btn--primary{ border:0; background:linear-gradient(180deg,var(--lime-hot),var(--lime)); color:var(--on-lime); box-shadow:0 12px 32px rgba(167,210,45,.22); }
.lld__btn--primary:hover{ filter:brightness(1.06); transform:translateY(-1px); }
.lld__btn--primary svg{ width:16px; height:16px; stroke:currentColor; fill:none; stroke-width:2.5; }
.lld__btn--primary.is-leaving{ opacity:.78; pointer-events:none; cursor:wait; }
/* "View cart" is a secondary detour (the drawer already shows the cart), so it is
   demoted to a quiet text link — "Secure checkout" stays the one dominant CTA. */
.lld__btn--ghost{ margin-top:8px; min-height:40px; border:0; background:transparent; color:var(--muted); font-weight:700; text-decoration:underline; text-underline-offset:3px; }
.lld__btn--ghost:hover{ color:#fff; }

/* empty */
.lld__empty{ text-align:center; padding:54px 16px 40px; display:flex; flex-direction:column; align-items:center; gap:4px; }
.lld__empty-icon{ width:46px; height:46px; stroke:var(--muted-2); fill:none; stroke-width:1.6; margin-bottom:10px; }
.lld__empty-title{ font:900 16px/1.1 var(--display); text-transform:uppercase; color:#fff; margin:0; }
.lld__empty-copy{ font:500 13px/1.5 var(--sans); color:var(--muted); margin:0; max-width:30ch; }

/* entrance stagger (added briefly on open) */
@keyframes lldItemIn{ from{ opacity:0; transform:translateY(12px); } to{ opacity:1; transform:none; } }
.lld--enter .lld-item{ animation:lldItemIn .46s var(--ease) both; animation-delay:calc(var(--i, 0) * 45ms + 40ms); }
.lld--enter .lld__shipbar,
.lld--enter .lld-nudge,
.lld--enter .lld__empty{ animation:lldItemIn .4s var(--ease) both; }

/* mobile */
@media (max-width:520px){
  .lld__panel{ width:100%; border-left:0; }
  .lld__head{ padding:18px 18px 14px; }
  .lld__body{ padding:16px 18px; }
  .lld__foot{ padding:14px 18px calc(18px + env(safe-area-inset-bottom, 0px)); }
  .lld-item{ position:relative; grid-template-columns:64px minmax(0,1fr); }
  .lld-item__name{ padding-right:0; }
  .lld-item__line{ position:static; grid-column:1 / -1; flex-direction:row; flex-wrap:wrap; align-items:baseline; justify-content:flex-end; gap:6px 8px; padding-top:10px; border-top:1px solid var(--line-soft); }
  .lld-item__controls{ flex-wrap:wrap; gap:8px; }
  .lld .lld-item__qty{ flex-shrink:0; }
  /* 44px touch targets — the drawer is the primary post-add-to-cart surface on phones */
  .lld .lld-item__qty .lld-qty__btn{ flex:0 0 44px; width:44px !important; min-width:44px !important; max-width:44px; height:44px !important; min-height:44px !important; font-size:18px !important; }
  .lld .lld-item__qty .lld-qty__val{ min-width:40px; height:44px; }
  .lld__close{ flex:0 0 44px; width:44px; height:44px; }
  .lld-item__remove{ align-self:stretch; display:inline-flex; align-items:center; min-height:44px; padding:0 8px; }
  .lld .lld-nudge__add{ min-height:44px !important; }
  .lld-nudge__copy span{ white-space:normal; }
  .lld__btn--ghost{ min-height:44px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce){
  .lld, .lld__overlay, .lld__panel, .lld-item, .lld .ship-prog__bar i, .lld__btn{ transition:none !important; }
  .lld-pass, .lld-pass__go{ transition:none; }
  .lld-pass__mark, .lld--enter .lld-item, .lld--enter .lld__shipbar, .lld--enter .lld__empty{ animation:none !important; }
  .lld-pass:hover{ transform:none; }
}

/* =====================================================================
   Nav-bar cart: the header cart icon opens THIS drawer (ll-cart-drawer.js
   intercepts the click), so suppress Blocksy's old hover mini-cart dropdown
   for one consistent cart experience. The count badge (.ct-label) is untouched.
   ===================================================================== */
.ct-header-cart .ct-cart-content{ display:none !important; }
.ct-header-cart .ct-cart-item{ cursor:pointer; }
/* The drawer is the add-to-cart confirmation now — hide WooCommerce's default
   "View cart" link that it injects next to the add button after an add. */
.added_to_cart.wc-forward,
a.added_to_cart{ display:none !important; }

/* =====================================================================
   Motion polish + lime-button label fix (2026-06).
   ===================================================================== */
/* Item cards lift on hover — pointer devices only (no sticky hover on touch). */
.lld-item{ transition:border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
@media (hover:hover){
  .lld-item:hover{ border-color:var(--line-lime); transform:translateY(-2px); box-shadow:0 14px 32px rgba(0,0,0,.42), 0 0 0 1px rgba(167,210,45,.10); }
}

/* "Secure checkout" button — KEEP the dark label in every state (a global
   a:hover was tinting the text lime → green-on-green), plus a shine sweep,
   a lift+glow, and a nudging arrow. */
.lld__btn{ transition:filter .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease); }
.lld__btn--primary{ position:relative; overflow:hidden; }
.lld__btn--primary,
.lld__btn--primary:hover,
.lld__btn--primary:focus,
.lld__btn--primary:active,
.lld__btn--primary:visited{ color:var(--on-lime); }
.lld__btn--primary::before{ content:""; position:absolute; top:0; bottom:0; left:-130%; width:55%; pointer-events:none; transform:skewX(-20deg); background:linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent); transition:left .6s var(--ease); }
.lld__btn--primary:hover{ filter:brightness(1.05); transform:translateY(-2px); box-shadow:0 18px 44px rgba(167,210,45,.34); }
.lld__btn--primary:hover::before{ left:140%; }
.lld__btn--primary:active{ transform:translateY(0); filter:brightness(1.02); }
.lld__btn--primary svg{ transition:transform .2s var(--ease); }
.lld__btn--primary:hover svg{ transform:translateX(3px); }

/* Free-shipping unlocked → a single celebratory pulse when the drawer opens. */
@keyframes lldUnlockPulse{
  0%{ box-shadow:inset 0 0 0 1px rgba(167,210,45,.4), 0 0 0 rgba(167,210,45,0); }
  45%{ box-shadow:inset 0 0 0 1px rgba(167,210,45,.7), 0 0 22px rgba(167,210,45,.5); }
  100%{ box-shadow:inset 0 0 0 1px rgba(167,210,45,.4), 0 0 14px rgba(167,210,45,.28); }
}
.lld--enter .ship-prog.unlocked .ship-prog__bar{ animation:lldUnlockPulse 1.1s var(--ease) .25s both; }

@media (prefers-reduced-motion: reduce){
  .lld-item, .lld__btn, .lld__btn--primary svg{ transition:none !important; }
  .lld__btn--primary::before{ display:none !important; }
  .lld--enter .ship-prog.unlocked .ship-prog__bar{ animation:none !important; }
}
