/* Power Station Finder: every rule is scoped under .psf so the theme is untouched.
   Colours and fonts follow WoodMart's variables when present. */
.psf {
  --psf-accent: var(--wd-primary-color, #d9621f);
  --psf-accent-soft: color-mix(in srgb, var(--psf-accent) 12%, #fff);
  --psf-accent-ink: #fff;
  --psf-ink: #1d2125;
  --psf-muted: #5b646c;
  --psf-line: #dfe3e6;
  --psf-bg: #f4f5f6;
  --psf-surface: #fff;
  --psf-ok: #1f8a4c; --psf-ok-soft: #e1f3e8;
  --psf-warn: #a86a10; --psf-warn-soft: #fbf0dc;
  --psf-bad: #c0392b; --psf-bad-soft: #fbe4e1;
  --psf-cell-off: #e3e7ea;
  --psf-display: var(--wd-title-font, inherit);
  --psf-sticky-top: 100px; /* clears the sticky site header */

  display: grid;
  gap: 28px;
  color: var(--psf-ink);
  font-size: 15px;
  line-height: 1.5;
}
.psf *, .psf *::before, .psf *::after { box-sizing: border-box; }
.psf h2, .psf h3, .psf h4, .psf p { margin: 0; }
.psf h2, .psf h3, .psf h4 { font-family: var(--psf-display); font-weight: 700; line-height: 1.1; color: var(--psf-ink); text-wrap: balance; }
.psf a { color: inherit; text-decoration: none; }
.psf button {
  font: inherit; line-height: 1.2; letter-spacing: normal; text-transform: none;
  min-height: 0; box-shadow: none; margin: 0; cursor: pointer;
}
.psf :focus-visible { outline: 2px solid var(--psf-accent); outline-offset: 2px; }

.psf-h1 { font-size: clamp(28px, 4vw, 40px); text-transform: uppercase; }
.psf-h2 { font-size: 22px; text-transform: uppercase; }
.psf-lede { color: var(--psf-muted); max-width: 60ch; margin-top: 8px; }

.psf-main { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 960px) { .psf-main { grid-template-columns: minmax(0, 1fr); } }

/* Panel */
.psf-panel {
  background: var(--psf-surface); border: 1px solid var(--psf-line); border-radius: 14px;
  padding: 20px; display: grid; gap: 20px; position: sticky; top: var(--psf-sticky-top);
}
@media (max-width: 960px) { .psf-panel { position: static; } }
.psf-step, .psf-hrs { display: grid; gap: 10px; }
.psf-step-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.psf-step-h h3 { font-size: 16px; text-transform: uppercase; }
.psf-step-h small { color: var(--psf-muted); font-size: 12px; }
.psf-step-h b { font-family: var(--psf-display); font-size: 22px; }
.psf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.psf .psf-chip {
  font-size: 13px; font-weight: 700; border: 1px solid var(--psf-line); background: transparent;
  color: var(--psf-ink); padding: 7px 12px; border-radius: 999px;
}
.psf .psf-chip:hover { border-color: var(--psf-accent); }
.psf .psf-chip[aria-pressed="true"] { background: var(--psf-accent); border-color: var(--psf-accent); color: var(--psf-accent-ink); }
.psf-apps { display: grid; gap: 2px; max-height: 420px; overflow: auto; margin: 0 -6px; padding: 0 6px; }
@media (max-width: 960px) { .psf-apps { max-height: none; } }
.psf-app { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; }
.psf-app.is-on { background: var(--psf-accent-soft); }
.psf-app-nm { font-weight: 700; font-size: 14px; line-height: 1.25; }
.psf-app-w { font-size: 12px; color: var(--psf-muted); }
.psf-app-w.is-big { color: var(--psf-warn); font-weight: 700; }
.psf-watts { font-family: var(--psf-display); font-size: 14px; color: var(--psf-muted); min-width: 56px; text-align: right; font-variant-numeric: tabular-nums; }
.psf-stepper { display: flex; align-items: center; border: 1px solid var(--psf-line); border-radius: 8px; overflow: hidden; background: var(--psf-surface); }
.psf .psf-stepper button { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--psf-ink); font-size: 18px; }
.psf .psf-stepper button:hover { background: var(--psf-accent-soft); }
.psf-stepper output { width: 24px; text-align: center; font-family: var(--psf-display); font-size: 16px; }
.psf-load { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.psf-load > div { background: var(--psf-bg); border-radius: 10px; padding: 10px 12px; }
.psf-load span { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--psf-muted); font-weight: 700; }
.psf-load b { font-family: var(--psf-display); font-size: 26px; font-variant-numeric: tabular-nums; }
.psf input[type="range"] { width: 100%; accent-color: var(--psf-accent); padding: 0; border: 0; height: auto; background: none; }
.psf-fine { font-size: 12px; color: var(--psf-muted); }

/* Results */
.psf-results, .psf-cards { display: grid; gap: 14px; min-width: 0; }
.psf-res-h { display: flex; justify-content: space-between; align-items: end; gap: 6px 12px; flex-wrap: wrap; }
.psf-res-h p { color: var(--psf-muted); font-size: 14px; }
.psf-card {
  background: var(--psf-surface); border: 1px solid var(--psf-line); border-radius: 14px;
  display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 18px; padding: 14px; align-items: center;
}
.psf-card.is-best { border: 2px solid var(--psf-accent); padding: 13px; }
.psf-card.is-over { opacity: .62; }
@media (max-width: 640px) {
  .psf-card { grid-template-columns: 96px minmax(0, 1fr); }
  .psf-buy { grid-column: 1 / -1; flex-direction: row !important; flex-wrap: wrap; justify-content: space-between; align-items: center !important; text-align: left !important; }
}
.psf-plate { background: #fff; border-radius: 10px; aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 8px; max-width: 100%; }
.psf-plate img { max-height: 100%; width: auto; object-fit: contain; }
.psf-info { display: grid; gap: 6px; min-width: 0; }
.psf-title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.psf-title h4 { font-size: 20px; }
.psf-title h4 a:hover { color: var(--psf-accent); }
.psf-tag { font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.psf-tag.is-best { background: var(--psf-accent); color: var(--psf-accent-ink); }
.psf-tag.is-ok { background: var(--psf-ok-soft); color: var(--psf-ok); }
.psf-tag.is-warn { background: var(--psf-warn-soft); color: var(--psf-warn); }
.psf-tag.is-bad { background: var(--psf-bad-soft); color: var(--psf-bad); }
.psf-specs { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--psf-muted); }
.psf-specs b { color: var(--psf-ink); font-family: var(--psf-display); font-size: 15px; }
.psf-gauge { display: flex; align-items: center; gap: 14px; }
.psf-cells { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; flex: 1; max-width: 340px; position: relative; padding: 3px; border: 2px solid var(--psf-line); border-radius: 6px; }
.psf-cells::after { content: ""; position: absolute; right: -6px; top: 30%; height: 40%; width: 4px; background: var(--psf-line); border-radius: 0 2px 2px 0; }
.psf-cells i { height: 16px; border-radius: 2px; background: var(--psf-cell-off); transition: background .25s; }
.psf-cells.is-ok i.f { background: var(--psf-ok); }
.psf-cells.is-warn i.f { background: var(--psf-warn); }
.psf-cells.is-bad i { background: repeating-linear-gradient(45deg, var(--psf-bad-soft) 0 4px, transparent 4px 8px); }
.psf-rt { font-family: var(--psf-display); font-size: 24px; font-weight: 700; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.psf-rt small { font-size: 13px; color: var(--psf-muted); font-weight: 500; }
.psf-why { font-size: 13px; color: var(--psf-muted); }
.psf-why.is-bad { color: var(--psf-bad); }
.psf-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.psf-price { font-family: var(--psf-display); font-size: 22px; font-weight: 700; line-height: 1.1; }
.psf-price del { font-size: 14px; color: var(--psf-muted); font-weight: 500; }
.psf-ppw { font-size: 12px; color: var(--psf-muted); }
.psf-cmp { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--psf-muted); cursor: pointer; margin: 0; }
.psf-cmp input { accent-color: var(--psf-accent); width: 16px; height: 16px; margin: 0; }
.psf .psf-btn {
  display: inline-block; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em;
  background: var(--psf-accent); color: var(--psf-accent-ink); padding: 9px 14px; border-radius: 8px; white-space: nowrap;
}
.psf .psf-btn:hover { filter: brightness(1.07); color: var(--psf-accent-ink); }
.psf .psf-btn.loading { opacity: .6; pointer-events: none; }
.psf .added_to_cart { font-size: 13px; font-weight: 700; color: var(--psf-accent); }
.psf-oos { font-size: 13px; font-weight: 700; color: var(--psf-bad); }

/* Compare */
.psf-compare { display: grid; gap: 12px; }
.psf-tbl { overflow-x: auto; background: var(--psf-surface); border: 1px solid var(--psf-line); border-radius: 14px; }
.psf-tbl table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14px; margin: 0; border: 0; }
.psf-tbl th, .psf-tbl td { padding: 12px 14px; border: 0; border-bottom: 1px solid var(--psf-line); text-align: center; vertical-align: middle; background: none; }
.psf-tbl tr:last-child th, .psf-tbl tr:last-child td { border-bottom: 0; }
.psf-tbl th[scope="row"] { text-align: left; font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--psf-muted); width: 150px; }
.psf-tbl thead th { font-family: var(--psf-display); font-size: 17px; text-transform: uppercase; }
.psf-tbl thead .psf-plate { width: 110px; margin: 0 auto 8px; }
.psf-tbl td.is-win { color: var(--psf-ok); font-weight: 900; }
.psf-tbl td.is-win::after { content: " ▲"; font-size: 10px; }
.psf-note { font-size: 13px; color: var(--psf-muted); }
.psf-pill { background: var(--psf-accent-soft); color: var(--psf-ink); padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; margin-right: 6px; }
.psf-empty { padding: 24px; text-align: center; color: var(--psf-muted); }

@media (prefers-reduced-motion: reduce) { .psf * { transition: none !important; } }
