/* ==========================================================================
   MAGNETIE — Cross-cutting QA Overrides (Function F: Responsive & QA)
   Last stylesheet loaded on every page (see ARCHITECTURE.md convention #3).
   Fixes/polish that span more than one function's files without rewriting
   the components those functions own. Nothing here redesigns an approved
   layout — see ARCHITECTURE.md "Function F" for the QA pass this backs.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   Wishlist "already saved" active state (Function D/E cross-cutting gap)
   product-grid.js/wishlist.js/product.js now add is-active + aria-pressed to
   every wishlist toggle button once the product is in Magnetie.wishlist;
   this is the one visual rule for that state, so a card looks the same way
   whether it's on the homepage, a showroom, or the PDP.
   --------------------------------------------------------------------------- */

.product-card__wishlist.is-active {
  color: var(--color-accent);
}

.product-card__wishlist.is-active svg {
  fill: currentColor;
}

/* ---------------------------------------------------------------------------
   Wishlist page — sale price parity with ProductCard/PDP
   commerce.css's .wishlist-card__price-current had no sale-priced variant,
   so a discounted item's current price rendered in plain ink instead of the
   sale color every other price display in the site uses.
   --------------------------------------------------------------------------- */

.wishlist-card__price-current--sale {
  color: var(--color-sale);
}

/* ---------------------------------------------------------------------------
   Showroom facet dropdowns — focus outline parity + Escape/outside-close is
   wired in product-grid.js; this just makes an open facet's focus state
   visible against the pill-shaped summary (the global :focus-visible outline
   already applies, this only tightens the offset so it doesn't clip on
   narrow toolbars).
   --------------------------------------------------------------------------- */

.facet__summary:focus-visible {
  outline-offset: 3px;
}

/* ---------------------------------------------------------------------------
   Touch targets — the wishlist heart (18px icon, zero padding) and the cart
   qty stepper (20px box) were both under the ~24px CSS-px minimum tappable
   size on any pointer, worse on touch. Padding grows the wishlist button's
   hit area without resizing the icon inside it; the qty buttons get a
   slightly larger box outright since they already have a fixed size (with
   box-sizing: border-box, padding alone would shrink their glyph's room).
   --------------------------------------------------------------------------- */

.product-card__wishlist {
  padding: 8px;
}

.cart-line__qty-btn {
  width: 32px;
  height: 32px;
}

/* ---------------------------------------------------------------------------
   Small-screen safety net — a defensive floor, not a redesign. Verified via
   Playwright at every required breakpoint (1920/1440/1280/1024/768/430/390/
   375) with zero horizontal overflow on any page, so these rules are inert
   under normal conditions; they only guard against a flex/grid child's
   default min-width:auto pushing the header wider than the viewport on a
   device narrower than what was tested.
   --------------------------------------------------------------------------- */

.site-header {
  min-width: 0;
}

.site-nav,
.site-search,
.site-utility,
.site-logo {
  min-width: 0;
}

.icon-btn {
  flex-shrink: 0;
}
