/* Engine Smart Product Compare - storefront. Everything is namespaced with wsc- to avoid conflicts with other modules. */
.wsc, .wsc-tray, .wsc-dialog, .wsc-compare-btn { --wsc-fg:#1f2933; --wsc-muted:#6b7785; --wsc-line:#d9dee3; --wsc-bg:#fff; --wsc-soft:#f4f6f8; --wsc-accent:var(--bs-primary, #0b5ed7); --wsc-warn:#fff4d6; --wsc-diff:#fff9e0; box-sizing:border-box; }
.wsc *, .wsc-tray *, .wsc-dialog * { box-sizing:border-box; }
.wsc-sr { position:absolute !important; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.wsc-muted { color:var(--wsc-muted); }

/* button */
.wsc-compare-btn { display:inline-flex; align-items:center; gap:6px; margin:6px 0; padding:6px 12px; font:inherit; font-size:.875rem; color:var(--wsc-fg); background:var(--wsc-bg); border:1px solid var(--wsc-line); border-radius:4px; cursor:pointer; }
.wsc-compare-btn:hover { border-color:var(--wsc-accent); }
.wsc-compare-btn:focus-visible, .wsc a:focus-visible, .wsc button:focus-visible, .wsc-tray button:focus-visible, .wsc-tray a:focus-visible, .wsc-dialog :focus-visible { outline:2px solid var(--wsc-accent); outline-offset:2px; }
.wsc-compare-btn__icon { width:14px; height:14px; border:2px solid currentColor; border-radius:3px; position:relative; }
.wsc-compare-btn.is-on { background:var(--wsc-accent); border-color:var(--wsc-accent); color:#fff; }
.wsc-compare-btn.is-on .wsc-compare-btn__icon::after { content:''; position:absolute; left:2px; top:-1px; width:4px; height:8px; border:solid currentColor; border-width:0 2px 2px 0; transform:rotate(45deg); }

/* generic buttons */
.wsc-btn { display:inline-block; padding:8px 16px; font:inherit; font-size:.9rem; color:#fff; background:var(--wsc-accent); border:1px solid var(--wsc-accent); border-radius:4px; text-decoration:none; cursor:pointer; }
.wsc-btn--ghost { color:var(--wsc-accent); background:transparent; }
.wsc-link { background:none; border:0; padding:0; color:var(--wsc-accent); text-decoration:underline; cursor:pointer; font:inherit; font-size:.85rem; }
.wsc-chip { display:inline-block; padding:5px 12px; font:inherit; font-size:.85rem; color:var(--wsc-fg); background:var(--wsc-bg); border:1px solid var(--wsc-line); border-radius:16px; text-decoration:none; cursor:pointer; }
.wsc-chip.is-on { color:#fff; background:var(--wsc-accent); border-color:var(--wsc-accent); }

/* tray */
.wsc-tray { position:fixed; left:0; right:0; bottom:0; z-index:1040; background:var(--wsc-bg); border-top:2px solid var(--wsc-accent); box-shadow:0 -4px 16px rgba(0,0,0,.12); font-size:.9rem; }
.wsc-tray[hidden] { display:none; }
.wsc-tray__bar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 16px; }
.wsc-tray__toggle { display:flex; gap:10px; align-items:center; background:none; border:0; font:inherit; font-weight:600; cursor:pointer; color:var(--wsc-fg); }
.wsc-tray__count { font-weight:400; color:var(--wsc-muted); }
.wsc-tray__actions { display:flex; gap:10px; align-items:center; }
.wsc-tray__go { padding:7px 16px; color:#fff; background:var(--wsc-accent); border-radius:4px; text-decoration:none; }
.wsc-tray__go.is-disabled { background:#aab3bd; pointer-events:none; }
.wsc-tray__clear { background:none; border:0; color:var(--wsc-muted); text-decoration:underline; cursor:pointer; font:inherit; }
.wsc-tray__items { display:flex; gap:12px; margin:0; padding:0 16px 10px; list-style:none; overflow-x:auto; }
.wsc-tray.is-collapsed .wsc-tray__items { display:none; }
.wsc-tray__item { display:flex; align-items:center; gap:8px; min-width:220px; padding:6px 8px; border:1px solid var(--wsc-line); border-radius:4px; }
.wsc-tray__item img { object-fit:contain; }
.wsc-tray__name { flex:1; min-width:0; display:flex; flex-direction:column; } .wsc-tray__name a { color:var(--wsc-fg); text-decoration:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .wsc-tray__name small { color:var(--wsc-muted); }
.wsc-tray__rm { background:none; border:0; font-size:1.2rem; line-height:1; cursor:pointer; color:var(--wsc-muted); }
body.wsc-has-tray { padding-bottom:110px; }

/* dialog */
.wsc-dialog { position:fixed; inset:0; z-index:1060; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.45); }
.wsc-dialog[hidden] { display:none; }
.wsc-dialog__box { width:min(520px, calc(100% - 32px)); padding:24px; background:var(--wsc-bg); border-radius:6px; }
.wsc-dialog__box h2 { margin:0 0 10px; font-size:1.1rem; } .wsc-dialog__actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }

/* center */
.wsc-center .wsc-steps { display:flex; gap:16px; padding:0; margin:0 0 20px; list-style:none; color:var(--wsc-muted); } .wsc-steps .is-current { color:var(--wsc-fg); font-weight:600; }
.wsc-family h2 { font-size:1.15rem; margin:20px 0 8px; } .wsc-count { color:var(--wsc-muted); font-weight:400; font-size:.9rem; }
.wsc-groups { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px,1fr)); gap:10px; padding:0; list-style:none; }
.wsc-group { display:flex; flex-direction:column; padding:12px 14px; color:var(--wsc-fg); border:1px solid var(--wsc-line); border-radius:4px; text-decoration:none; } .wsc-group:hover { border-color:var(--wsc-accent); } .wsc-group__count { color:var(--wsc-muted); font-size:.85rem; }
.wsc-workspace { display:grid; grid-template-columns:260px 1fr; gap:24px; }
.wsc-filters label, .wsc-filters fieldset { display:block; margin-bottom:12px; font-size:.85rem; } .wsc-filters input, .wsc-filters select { width:100%; }
.wsc-filters fieldset input { width:48%; } .wsc-filters .wsc-check { display:flex; gap:6px; align-items:center; }
.wsc-toolbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:12px; } .wsc-spacer { flex:1; }
.wsc-list { display:grid; grid-template-columns:repeat(auto-fill, minmax(230px,1fr)); gap:14px; }
.wsc-card { display:flex; flex-direction:column; border:1px solid var(--wsc-line); border-radius:4px; background:var(--wsc-bg); } .wsc-card > img, .wsc-card__noimg { width:100%; height:150px; object-fit:contain; padding:8px; background:#fff; }
.wsc-card__body { display:flex; flex-direction:column; gap:4px; padding:10px 12px 12px; flex:1; } .wsc-card__name { color:var(--wsc-fg); font-weight:600; text-decoration:none; } .wsc-card__man, .wsc-card__ref, .wsc-card__avail { font-size:.8rem; color:var(--wsc-muted); }
.wsc-card__price { font-weight:600; } .wsc-card__specs { padding:0; margin:4px 0; list-style:none; font-size:.8rem; } .wsc-card__specs span { color:var(--wsc-muted); } .wsc-card__actions { display:flex; justify-content:space-between; align-items:center; margin-top:auto; }
.wsc-ind { display:flex; flex-direction:column; gap:2px; font-size:.78rem; padding:6px; background:var(--wsc-soft); border-radius:4px; }
.wsc-guided { margin-bottom:16px; padding:10px 14px; border:1px solid var(--wsc-line); border-radius:4px; } .wsc-guided__form { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:10px; margin-top:10px; align-items:end; }
.wsc-suggest { margin-bottom:20px; padding:12px; background:var(--wsc-soft); border-radius:4px; }
.wsc-alert { padding:10px 14px; margin:10px 0; border-radius:4px; background:var(--wsc-soft); } .wsc-alert--warn { background:var(--wsc-warn); } .wsc-alert--error { background:#fde8e8; }

/* compare table */
.wsc-compare__head { display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; align-items:center; } .wsc-compare__head h2 { margin:0; font-size:1.3rem; }
.wsc-table-wrap { overflow-x:auto; border:1px solid var(--wsc-line); border-radius:4px; margin:14px 0; }
.wsc-table { width:100%; border-collapse:collapse; font-size:.9rem; background:var(--wsc-bg); }
.wsc-table th, .wsc-table td { padding:10px 12px; vertical-align:top; border-bottom:1px solid var(--wsc-line); text-align:left; }
.wsc-table .wsc-stick { position:sticky; left:0; z-index:1; min-width:170px; max-width:220px; background:var(--wsc-soft); font-weight:600; }
.wsc-table .wsc-prod { min-width:210px; background:var(--wsc-bg); vertical-align:top; } .wsc-prod__img { display:block; margin:0 auto 8px; object-fit:contain; } .wsc-prod__man { color:var(--wsc-muted); font-size:.8rem; } .wsc-prod__name { color:var(--wsc-fg); font-weight:600; } .wsc-prod__ref { color:var(--wsc-muted); font-size:.8rem; }
.wsc-section th { background:#e9edf1; font-size:.8rem; text-transform:uppercase; letter-spacing:.04em; }
.wsc-row.is-diff td, .wsc-row.is-diff th { background:var(--wsc-diff); } .wsc-nohl .wsc-row.is-diff td { background:inherit; } .wsc-nohl .wsc-row.is-diff th { background:var(--wsc-soft); }
.wsc-row.is-diff th::before { content:''; display:inline-block; width:6px; height:6px; margin-right:6px; border-radius:50%; background:#d99a00; }
.wsc-nohl .wsc-row.is-diff th::before { display:none; }
.wsc-raw { display:block; font-size:.75rem; color:var(--wsc-muted); } .wsc-tag { display:inline-block; margin-top:2px; padding:0 6px; font-size:.7rem; border:1px dashed var(--wsc-muted); border-radius:8px; color:var(--wsc-muted); } .wsc-tag--warn { border-color:#d99a00; color:#8a6100; }
.wsc-actions form.wsc-inline { display:inline; } .wsc-actions .wsc-btn, .wsc-actions .wsc-link { display:inline-block; margin:2px 6px 2px 0; }
.wsc-insights ul { padding-left:18px; } .wsc-ins { margin:6px 0; } .wsc-ins--warning::marker { color:#d99a00; } .wsc-disclaimer { font-size:.8rem; }

/* mobile */
@media (max-width: 900px) { .wsc-workspace { grid-template-columns:1fr; } }
@media (max-width: 640px) {
  .wsc-table .wsc-stick { min-width:110px; max-width:130px; font-size:.8rem; padding:8px; } .wsc-table .wsc-prod { min-width:170px; }
  .wsc-tray__item { min-width:180px; } .wsc-tray__actions { flex-wrap:wrap; }
}
@media (max-width: 480px) {
  .wsc-table-wrap { overflow:visible; border:0; } .wsc-table, .wsc-table tbody, .wsc-table tr, .wsc-table th, .wsc-table td { display:block; width:100%; }
  .wsc-table thead { display:flex; gap:8px; overflow-x:auto; } .wsc-table thead th { min-width:150px; } .wsc-table thead .wsc-stick { display:none; }
  .wsc-table .wsc-stick { position:static; max-width:none; } .wsc-table td[data-label]::before { content:attr(data-label); display:block; font-size:.72rem; color:var(--wsc-muted); }
  .wsc-row { margin-bottom:8px; border:1px solid var(--wsc-line); }
}

/* print / PDF-from-browser */
@media print {
  .wsc-noprint, .wsc-tray, .wsc-dialog, .wsc-compare-btn, header, footer, nav, .breadcrumb { display:none !important; }
  .wsc-table-wrap { overflow:visible; border:0; } .wsc-table { font-size:10pt; } .wsc-table .wsc-stick { position:static; }
  .wsc-row.is-diff td { background:#fff !important; font-weight:600; } body.wsc-has-tray { padding-bottom:0; }
  @page { size:landscape; margin:12mm; }
}
