/* ============================================================
   ui-fixes.css  — accessibility + UX polish overrides
   Loaded LAST (after styles.min.css + polish + mobile-polish + hero-fade)
   so these rules win the cascade. Isolated + reversible: delete this
   link to revert. Source: ui-ux-pro-max audit 2026-06-21.
   ============================================================ */

/* --- Stock badges: amber/red failed WCAG AA on the 10% tint.
   Darken text to clear 4.5:1 (green --ok already remediated upstream). --- */
.stock-badge.stock--mid { color: #b45309 !important; }   /* amber  ~4.8:1 */
.stock-badge.stock--low { color: #b3261e !important; }   /* red    ~5.9:1 */

/* --- Add-to-cart success feedback: cart.js toggles .is-added ~1.2s but
   no style existed, so the primary CTA never confirmed the action. --- */
.btn.is-added {
  background: #15803d !important;
  border-color: #15803d !important;
  color: #fff !important;
}

/* --- Disabled buttons had no visual state (looked fully active during
   async submit / out-of-stock). --- */
.btn:disabled,
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: .55 !important;
  cursor: not-allowed !important;
  transform: none !important;
  pointer-events: none !important;
  box-shadow: none !important;
}

/* --- Cart-page quantity steppers rendered at 36px (< 44px touch target). --- */
.qty__btn,
.qty-stepper button {
  min-width: 44px !important;
  min-height: 44px !important;
}

/* --- Checkout field borders were ~1.3:1 (near-invisible edges).
   Resting state only; :focus / :focus-visible keep their blue ring. --- */
.field input:not(:focus):not(:focus-visible),
.field select:not(:focus):not(:focus-visible),
.field textarea:not(:focus):not(:focus-visible),
.disc-row input:not(:focus):not(:focus-visible) {
  border-color: #8a8a8a !important;   /* ~3.1:1 on white (WCAG 1.4.11) */
}

/* --- Icon-only nav buttons: blue focus ring was low-contrast on the dark
   nav; nav links already use white. Match them. --- */
.nav .iconbtn:focus-visible {
  outline: 2px solid #fff !important;
  outline-offset: 3px !important;
}

/* --- Payment-method radios excluded from the focus-ring rule: keyboard
   users got no visible focus moving between methods. --- */
.pay-card:focus-within {
  box-shadow: 0 0 0 3px rgba(28, 105, 212, .45) !important;
  border-color: var(--blue, #1c69d4) !important;
}

/* --- Hero stat-ribbon labels failed 4.5:1 on desktop over the bright
   video (mobile was already fixed). --- */
@media (min-width: 901px) {
  .lab__ribbon__k { color: rgba(255, 255, 255, .72) !important; }
  .lab__ribbon__v i { color: rgba(255, 255, 255, .82) !important; }
  .lab__ribbon { background: rgba(10, 13, 18, .82) !important; }
}

/* --- Autoplay background videos ignored reduced-motion (the existing
   rule only killed a non-existent CSS animation). Show the poster. --- */
@media (prefers-reduced-motion: reduce) {
  .lab__video,
  .page-hero__video { display: none !important; }
  /* Hero entrance stagger collapses to instant so LCP text/CTA never
     sit at opacity:0 waiting on an animation the user opted out of. */
  .hero--lab .lab__display__line,
  .hero--lab .lab__lead,
  .hero--lab .lab__cta,
  .hero--lab .lab__coa { animation: none !important; }
}

/* --- Screen-reader-only utility: visually hides <caption> on data tables
   (compare + blog) so the accessible name is announced without altering
   layout. No .sr-only/.visually-hidden existed in the loaded CSS. --- */
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* --- Product cards: button-in-anchor was invalid HTML (interactive nested
   in interactive). Card is now a <div>; a transparent stretched <a.card__link>
   carries navigation, the add-to-cart button rises above it. Two clean tab
   stops per card (View product, Add to cart). --- */
.card { position: relative; }
a.card__link {
  position: absolute; inset: 0; z-index: 1;
  font-size: 0; color: transparent; text-decoration: none;
}
a.card__link:focus-visible { outline: 2px solid var(--blue, #1c69d4); outline-offset: 3px; }
.card .card__quick { position: relative; z-index: 2; }

/* --- Checkout inline error banner: replaces blocking alert() for empty
   cart / price-drift / payment-not-ready / validation errors. --- */
.checkout-error {
  margin: 0 0 18px;
  padding: 12px 16px;
  background: #fdecea;
  border: 1px solid #dc2626;
  border-left-width: 4px;
  color: #b3261e;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 4px;
}
.checkout-error[hidden] { display: none; }

/* --- Touch targets < 44px on mobile (ui-ux-pro-max P2): the hero secondary
   button rendered ~31px tall and the category filter chips ~38px. Bump tap
   height on small viewports only; desktop layout unchanged. --- */
@media (max-width: 640px) {
  .lab__btn { min-height: 44px; display: inline-flex; align-items: center; }
  .chip { min-height: 44px; display: inline-flex; align-items: center; }
}

/* --- Remove any residual ~300ms tap delay and double-tap-zoom on controls
   so taps register instantly (viewport is already width=device-width). --- */
a, button, [role="button"], input[type="submit"], .btn, .chip {
  touch-action: manipulation;
}

/* --- Newsletter capture band (footer, injected by newsletter.js).
   Fresh .nl-cap namespace: legacy killers strip .footer__newsletter and
   .newsletter-cap, so those class names must never be reused. --- */
.nl-cap {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px 0;
}
.nl-cap__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.nl-cap__h {
  color: #fff;
  font-size: 18px;
  margin: 0 0 4px;
}
.nl-cap__p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13.5px;
  margin: 0;
  max-width: 46ch;
}
.nl-cap__form {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.nl-cap__srlabel {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.nl-cap__input {
  height: 44px;
  min-width: 240px;
  padding: 0 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 14px;
}
.nl-cap__input::placeholder { color: rgba(255, 255, 255, 0.45); }
.nl-cap__input:focus-visible {
  outline: 2px solid #6ea8ff;
  outline-offset: 2px;
}
.nl-cap__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
}
.nl-cap__btn {
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 4px;
  background: #1c69d4;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}
.nl-cap__btn:hover { background: #1a5fbe; }
.nl-cap__btn:active { transform: translateY(1px); }
.nl-cap__btn:disabled { opacity: 0.6; cursor: default; }
.nl-cap__btn:focus-visible {
  outline: 2px solid #6ea8ff;
  outline-offset: 2px;
}
.nl-cap__status {
  flex-basis: 100%;
  margin: 2px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  min-height: 1em;
}
.nl-cap__status--err { color: #ffb4a8; }
.nl-cap__ok {
  color: #fff;
  font-size: 14.5px;
  margin: 0;
}
@media (max-width: 640px) {
  .nl-cap__inner { flex-direction: column; align-items: stretch; }
  .nl-cap__form { width: 100%; }
  .nl-cap__input { flex: 1; min-width: 0; }
}

/* --- Catalog + hero payment reassurance line (no-card model was invisible
   until checkout). Sits on the dark image hero, so light text. --- */
.catalog-pay {
  margin: 10px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82) !important;
  letter-spacing: 0.01em;
}

/* --- PDP main price rendered "$60CAD" with no gap before the unit, while
   product cards and the buy-rail correctly show "$60 CAD". Add the space +
   lighten the unit so the most prominent price on the page reads cleanly. --- */
.pdp__price small {
  margin-left: 0.3em;
  font-weight: 500;
  color: var(--muted, #6b6b6b);
}
