/* SparkyXConnect — faceted catalog browser (embeddable).
   Every class is sxc- prefixed and every rule is scoped under .sxc-catalog,
   so nothing here can collide with the host page's stylesheet.
   Design tokens (Sparky X dark theme) are defined locally as --sxc-* on the
   component root — this file does not depend on style.css internals. */

.sxc-catalog{
  --sxc-bg:#0a0a0c; --sxc-bg2:#101014; --sxc-panel:#141419; --sxc-line:#26262e;
  --sxc-txt:#f2f2f4; --sxc-dim:#9a9aa5; --sxc-orange:#FF5400; --sxc-orange2:#ff7a29;
  --sxc-ok:#3ddc84; --sxc-bad:#ff8a8a; --sxc-imgbg:#ffffff;
  box-sizing:border-box; background:var(--sxc-bg); color:var(--sxc-txt);
  font-family:"Inter",-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  font-size:16px; line-height:1.5; max-width:1240px; margin:0 auto;
  padding:28px clamp(14px,3vw,32px) 48px; overflow-x:clip;
  -webkit-font-smoothing:antialiased;
}
.sxc-catalog *, .sxc-catalog *::before, .sxc-catalog *::after{ box-sizing:border-box; }
.sxc-catalog :focus-visible{ outline:2px solid var(--sxc-orange); outline-offset:2px; }
.sxc-sr{ position:absolute !important; width:1px; height:1px; margin:-1px; padding:0;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

/* Head */
.sxc-head{ margin-bottom:18px; min-width:0; }
.sxc-eyebrow{ font-size:11px; letter-spacing:.22em; text-transform:uppercase;
  color:var(--sxc-dim); font-weight:600; margin:0 0 8px; }
.sxc-eyebrow b{ color:var(--sxc-orange); font-weight:600; }
.sxc-title{ font-size:clamp(24px,4vw,34px); font-weight:300; letter-spacing:-.01em;
  line-height:1.2; margin:0 0 8px; color:var(--sxc-txt); }
.sxc-sub{ color:var(--sxc-dim); font-size:15.5px; line-height:1.6; margin:0; max-width:68ch; }

/* Toolbar (sticky — carries the mobile Filters button) */
.sxc-toolbar{ position:sticky; top:73px; z-index:30; display:flex; flex-wrap:wrap;
  align-items:center; gap:10px 14px; padding:12px 0; margin-bottom:8px;
  background:var(--sxc-bg); border-bottom:1px solid var(--sxc-line); min-width:0; }
.sxc-search-wrap{ flex:1 1 220px; min-width:0; }
.sxc-search, .sxc-input, .sxc-sort{ width:100%; min-height:48px; padding:12px 14px;
  background:var(--sxc-bg2); color:var(--sxc-txt); border:1px solid var(--sxc-line);
  border-radius:10px; font:inherit; font-size:16px; }
.sxc-search::placeholder, .sxc-input::placeholder{ color:var(--sxc-dim); }
.sxc-search:focus, .sxc-input:focus, .sxc-sort:focus{ border-color:var(--sxc-orange); outline:none; }
.sxc-count{ margin:0; color:var(--sxc-dim); font-size:14.5px; flex:0 1 auto; min-width:0; }
.sxc-count strong{ color:var(--sxc-txt); font-weight:600; }
.sxc-sort-wrap{ display:flex; align-items:center; gap:8px; margin-left:auto; min-width:0; }
.sxc-sort-label{ font-size:11px; letter-spacing:.16em; text-transform:uppercase;
  color:var(--sxc-dim); font-weight:600; }
.sxc-sort{ width:auto; min-width:0; cursor:pointer; }
.sxc-filters-btn{ display:inline-flex; align-items:center; gap:8px; min-height:48px;
  padding:12px 20px; border-radius:999px; background:#fff; color:#0a0a0c; border:1px solid #fff;
  font:inherit; font-size:15px; font-weight:600; cursor:pointer; }
.sxc-filters-btn:hover{ background:#e8e8ea; }
.sxc-filters-count{ display:inline-flex; align-items:center; justify-content:center;
  min-width:24px; height:24px; padding:0 6px; border-radius:999px;
  background:var(--sxc-orange); color:#fff; font-size:13px; font-weight:700; }

/* Buttons */
.sxc-btn-primary{ display:inline-flex; align-items:center; justify-content:center;
  min-height:48px; padding:13px 26px; border-radius:999px; background:#fff; color:#0a0a0c;
  border:1px solid #fff; font:inherit; font-size:15px; font-weight:600; cursor:pointer; }
.sxc-btn-primary:hover{ background:#e8e8ea; }
.sxc-btn-ghost{ display:inline-flex; align-items:center; justify-content:center;
  min-height:48px; padding:13px 22px; border-radius:999px; background:transparent;
  color:var(--sxc-orange2); border:1px solid var(--sxc-orange); font:inherit;
  font-size:15px; font-weight:600; cursor:pointer; }
.sxc-btn-ghost:hover{ background:rgba(255,84,0,.1); }
.sxc-link-btn{ background:none; border:0; padding:0; color:var(--sxc-orange2);
  font:inherit; font-weight:600; text-decoration:underline; cursor:pointer; }

/* Layout */
.sxc-layout{ display:block; min-width:0; }
.sxc-results{ min-width:0; }

/* Filter panel — mobile: full-screen sheet (opened via .sxc-sheet-open on root) */
.sxc-filters{ position:fixed; inset:0; z-index:60; background:var(--sxc-bg2);
  padding:0 18px 24px; overflow-y:auto; overscroll-behavior:contain;
  transform:translateY(102%); visibility:hidden; transition:transform .22s ease, visibility .22s; }
.sxc-catalog.sxc-sheet-open .sxc-filters{ transform:translateY(0); visibility:visible; }
.sxc-backdrop{ position:fixed; inset:0; z-index:55; background:rgba(0,0,0,.6); }
.sxc-backdrop[hidden]{ display:none; }
.sxc-filters-head{ position:sticky; top:0; z-index:2; display:flex; align-items:center;
  justify-content:space-between; gap:12px; min-height:60px; margin:0 -18px 6px; padding:6px 18px;
  background:var(--sxc-bg2); border-bottom:1px solid var(--sxc-line); }
.sxc-filters-title{ font-size:17px; font-weight:600; }
.sxc-filters-close{ width:48px; height:48px; border-radius:999px; background:var(--sxc-panel);
  border:1px solid var(--sxc-line); color:var(--sxc-txt); font-size:17px; cursor:pointer; }
.sxc-filters-foot{ display:flex; flex-wrap:wrap; gap:10px; padding-top:18px;
  border-top:1px solid var(--sxc-line); margin-top:6px; }
.sxc-filters-foot .sxc-btn-ghost, .sxc-filters-foot .sxc-btn-primary{ flex:1 1 150px; }

.sxc-fgroup{ padding:16px 0; border-bottom:1px solid var(--sxc-line); min-width:0; }
.sxc-fgroup-part{ padding-top:14px; }
.sxc-fgroup-toggles{ display:grid; gap:6px; }
.sxc-flabel{ display:block; font-size:11px; letter-spacing:.18em; text-transform:uppercase;
  color:var(--sxc-dim); font-weight:600; margin-bottom:10px; }
.sxc-fhint{ color:var(--sxc-dim); font-size:13px; line-height:1.5; margin:8px 0 0; }

/* Checkboxes / chips — 48px tap targets */
.sxc-checks{ display:grid; gap:4px; }
.sxc-check{ display:flex; align-items:center; gap:10px; min-height:48px; padding:8px 10px;
  border-radius:8px; cursor:pointer; font-size:15.5px; }
.sxc-check:hover{ background:var(--sxc-panel); }
.sxc-check input{ width:20px; height:20px; flex:0 0 auto; accent-color:var(--sxc-orange); cursor:pointer; }
.sxc-check .sxc-check-n{ margin-left:auto; color:var(--sxc-dim); font-size:13px; }
.sxc-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.sxc-chip{ position:relative; display:inline-flex; }
.sxc-chip input{ position:absolute; opacity:0; width:1px; height:1px; }
.sxc-chip span{ display:inline-flex; align-items:center; min-height:48px; padding:10px 16px;
  border:1px solid var(--sxc-line); border-radius:999px; background:var(--sxc-panel);
  font-size:14.5px; cursor:pointer; }
.sxc-chip input:checked + span{ border-color:var(--sxc-orange); color:#fff;
  background:rgba(255,84,0,.16); }
.sxc-chip input:focus-visible + span{ outline:2px solid var(--sxc-orange); outline-offset:2px; }

/* Brand list — scrollable multi-select */
.sxc-brand-list{ max-height:264px; overflow-y:auto; margin-top:8px; padding-right:4px;
  border:1px solid var(--sxc-line); border-radius:10px; background:var(--sxc-bg); }
.sxc-brand-list .sxc-check{ padding-left:12px; }
.sxc-brand-none{ color:var(--sxc-dim); font-size:14px; padding:14px 12px; margin:0; }

/* Price row */
.sxc-price-row{ display:flex; align-items:center; gap:8px; min-width:0; }
.sxc-price-input{ min-width:0; }
.sxc-price-dash{ color:var(--sxc-dim); flex:0 0 auto; }

/* Toggles (switch style, 48px rows) */
.sxc-toggle{ display:flex; align-items:center; gap:12px; min-height:48px; padding:6px 2px;
  cursor:pointer; font-size:15.5px; }
.sxc-toggle input{ position:absolute; opacity:0; width:1px; height:1px; }
.sxc-toggle-track{ flex:0 0 auto; width:48px; height:28px; border-radius:999px;
  background:var(--sxc-panel); border:1px solid var(--sxc-line); position:relative; transition:background .15s; }
.sxc-toggle-track::after{ content:""; position:absolute; top:3px; left:3px; width:20px; height:20px;
  border-radius:50%; background:var(--sxc-dim); transition:left .15s, background .15s; }
.sxc-toggle input:checked + .sxc-toggle-track{ background:rgba(255,84,0,.25); border-color:var(--sxc-orange); }
.sxc-toggle input:checked + .sxc-toggle-track::after{ left:23px; background:var(--sxc-orange); }
.sxc-toggle input:focus-visible + .sxc-toggle-track{ outline:2px solid var(--sxc-orange); outline-offset:2px; }

/* Result cards */
.sxc-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr));
  gap:14px; min-width:0; }
.sxc-card{ background:var(--sxc-panel); border:1px solid var(--sxc-line); border-radius:12px;
  overflow:hidden; display:flex; flex-direction:column; min-width:0; }
.sxc-card.sxc-oos{ opacity:.55; }
.sxc-card-img{ aspect-ratio:4/3; background:var(--sxc-imgbg); display:flex;
  align-items:center; justify-content:center; overflow:hidden; }
.sxc-card-img img{ width:100%; height:100%; object-fit:contain; display:block; }
.sxc-card-noimg{ aspect-ratio:4/3; background:#1a1a20; color:var(--sxc-dim);
  display:flex; align-items:center; justify-content:center; font-size:13px;
  letter-spacing:.14em; text-transform:uppercase; }
.sxc-card-body{ padding:14px 16px 16px; display:flex; flex-direction:column; gap:7px;
  flex:1 1 auto; min-width:0; }
.sxc-card-brand{ font-size:11px; letter-spacing:.18em; text-transform:uppercase;
  color:var(--sxc-dim); font-weight:600; margin:0; overflow-wrap:anywhere; }
.sxc-card-name{ font-size:16.5px; font-weight:600; line-height:1.3; margin:0; overflow-wrap:anywhere; }
.sxc-card-specs{ color:var(--sxc-dim); font-size:14px; line-height:1.5; margin:0; overflow-wrap:anywhere; }
.sxc-card-badges{ display:flex; flex-wrap:wrap; gap:6px; }
.sxc-badge{ display:inline-block; font-size:10.5px; letter-spacing:.12em; text-transform:uppercase;
  font-weight:700; padding:4px 9px; border-radius:999px; border:1px solid var(--sxc-line);
  color:var(--sxc-txt); }
.sxc-badge-season{ border-color:var(--sxc-orange); color:var(--sxc-orange2); }
.sxc-badge-ev{ border-color:var(--sxc-ok); color:var(--sxc-ok); }
.sxc-card-stock{ font-size:14px; margin:0; color:var(--sxc-ok); font-weight:600; }
.sxc-card-stock.sxc-stock-low{ color:var(--sxc-orange2); }
.sxc-card-stock.sxc-stock-out{ color:var(--sxc-bad); }
.sxc-card-price{ margin-top:auto; padding-top:6px; }
.sxc-price-unit{ font-size:21px; font-weight:700; color:var(--sxc-txt); white-space:nowrap; }
.sxc-price-unit small{ font-size:13px; font-weight:500; color:var(--sxc-dim); }
.sxc-price-set{ color:var(--sxc-dim); font-size:14px; margin:2px 0 0; }
.sxc-price-set strong{ color:var(--sxc-txt); font-weight:600; }
.sxc-card-part{ color:var(--sxc-dim); font-size:12.5px; margin:0; overflow-wrap:anywhere; }

.sxc-empty, .sxc-error{ color:var(--sxc-dim); font-size:15.5px; line-height:1.6;
  padding:28px 0; margin:0; }
.sxc-error{ color:var(--sxc-bad); }
.sxc-more-wrap{ display:flex; flex-direction:column; align-items:center; gap:8px; padding:26px 0 4px; }
.sxc-shown-note{ color:var(--sxc-dim); font-size:13.5px; margin:0; }

/* Desktop: left sidebar, always visible */
@media (min-width:1024px){
  .sxc-layout{ display:grid; grid-template-columns:288px minmax(0,1fr); gap:28px; align-items:start; }
  .sxc-filters-btn{ display:none; }
  .sxc-filters{ position:sticky; top:12px; inset:auto; z-index:auto; transform:none;
    visibility:visible; background:transparent; padding:0 4px 8px 0;
    max-height:calc(100vh - 24px); overflow-y:auto; transition:none; }
  .sxc-filters-head{ display:none; }
  .sxc-apply-btn{ display:none; }
  .sxc-filters-foot .sxc-btn-ghost{ flex:1 1 auto; }
  .sxc-backdrop{ display:none !important; }
}
@media (max-width:1023.98px){
  .sxc-sort-wrap{ margin-left:0; }
  .sxc-count{ flex:1 1 100%; order:3; }
}
/* Host site header is fixed (73px tall, 77px at <=900px per --header-h in the
   host stylesheet) — the sticky toolbar must dock BELOW it, not slide under. */
@media (max-width:900px){
  .sxc-toolbar{ top:77px; }
}
