/*
 * Product pages and the Products page.
 * Values copied from design/HydroGuard.html, PowerGuardPlus.html, PowerGuardUltra.html,
 * LevelMaster.html, ProductDetail.html and Products.html.
 */

/* ---------- Shared bits ---------- */
.tag { display: inline-block; align-self: flex-start; font: 500 11px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; padding: 6px 10px; border-radius: 3px; background: var(--accent-soft); color: var(--accent); }
.model { font: 500 13px/1.3 var(--font-mono); color: var(--accent); }
.dev { font-family: "Noto Sans Devanagari", "Mangal", sans-serif; font-size: 15px; color: var(--muted); }
.dev.p-tagline { color: var(--accent); font-size: 17px; }
.shot { aspect-ratio: 4 / 3; background: radial-gradient(ellipse at 50% 45%, #1A2740 0%, #0D1626 72%); display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-card); }
.shot img { width: 100%; height: 100%; object-fit: contain; }
.seg { display: inline-flex; align-items: center; justify-content: center; min-width: 92px; padding: 8px 12px; background: #140605; border: 1px solid #3A1512; border-radius: 4px; font: 700 26px/1 var(--font-heading); letter-spacing: .08em; color: var(--display-red); text-shadow: 0 0 10px rgba(255, 77, 61, .55); }
.seg-fit { min-width: 0; }
.seg-sm { font-size: 20px; min-width: 0; margin-right: 10px; }
.seg-lg { min-width: 0; padding: 10px 16px; font-size: 44px; letter-spacing: .1em; text-shadow: 0 0 12px rgba(255, 77, 61, .55); }
b.dcode { font-family: var(--font-heading); color: var(--display-red); letter-spacing: .08em; }

.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: start; }
.g2-20 { gap: 20px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.g5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }

.t-lead { font-size: 17px; line-height: 1.7; }
.t-note { font-size: 14px; }
.t-fine { font-size: 13px; }
.t-accent { color: var(--accent); font-size: 17px; }
.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.scroll-x { overflow-x: auto; }

/* ---------- Product hero ---------- */
.p-hero { padding-top: 36px; padding-bottom: 72px; }
.p-hero .crumb { margin-bottom: 32px; }
.p-media { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.p-info { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.p-info-dev { gap: 20px; }
.p-info h1 { font-size: 56px; font-weight: 700; }
.model-hero { font-size: 15px; }
.model-line { font-size: 14px; color: var(--soft-text); }
.p-summary { font-size: 18px; }
.p-media .thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.p-media .thumbs img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius-card); display: block; cursor: pointer; }
.p-media .thumbs img.sel { border-color: var(--accent); }
.p-media .thumbs img:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.p-diagram { aspect-ratio: 4 / 3; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.p-diagram svg { flex: 1; display: block; }

.kv-panel { padding: 4px 20px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--panel-line); font: 400 14px/1.5 var(--font-mono); }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--label); letter-spacing: .08em; }
.kv span:last-child { text-align: right; }
.kv-panel-dev { padding: 6px 20px; font-family: var(--font-mono); font-size: 14px; }
.kv-panel-dev .kv { font: inherit; }
.kv-panel-dev .kv span:first-child { letter-spacing: normal; }

/* ---------- On this page ---------- */
.onpage { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.onpage nav { display: flex; gap: 28px; flex-wrap: wrap; font-size: 14px; font-weight: 500; }
.onpage a { padding: 16px 0; text-decoration: none; color: var(--muted); }
.onpage a:hover { color: var(--ink); }
.onpage a.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------- Sections and columns ---------- */
.sec { padding-top: 80px; padding-bottom: 80px; border-top: 1px solid var(--line); }
.sec-plain { padding-top: 80px; padding-bottom: 80px; }
.sec h2, .sec-plain h2 { font-size: 32px; font-weight: 600; }
.sec .h-36 { font-size: 36px; }
.head-row { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.head-row-20 { gap: 20px; }
.col-panel { padding: 28px; gap: 14px; }

/* ---------- Lists ---------- */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.checks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; font-size: 16px; line-height: 1.5; }
.checks li::before { content: ""; width: 10px; height: 10px; margin-top: 7px; border: 2px solid var(--icon); border-radius: 2px; }
.checks-mr { font-size: 16px; color: var(--soft-text-2); }
.parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.parts li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.parts li span { font: 500 13px/1.6 var(--font-mono); color: var(--accent); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps li { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 16px; }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps .step-n { padding-top: 3px; }
.steps .step-first { color: var(--accent); }

/* ---------- Tables ---------- */
.spec { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 15px; }
.spec th, .spec td { padding: 14px 20px; border-bottom: 1px solid var(--panel-line); text-align: left; vertical-align: top; }
.spec th { width: 38%; font: 500 12px/1.6 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--label); }
.spec-34 th { width: 34%; }
.spec th.w-auto { width: auto; }
.spec td.code { font-family: var(--font-heading); font-weight: 700; color: var(--display-red); width: 90px; letter-spacing: .08em; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }

.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { padding: 12px 18px; border-bottom: 1px solid var(--panel-line); text-align: left; vertical-align: top; }
.tbl thead th { font: 500 11px/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--label); }
.tbl tbody { font-variant-numeric: tabular-nums; }
.tbl td.code { font: 700 17px/1.2 var(--font-heading); color: var(--display-red); letter-spacing: .08em; }
.tbl tr:last-child td, .tbl tr:last-child th { border-bottom: 0; }

.mtx, .wtbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.mtx th { text-align: left; padding: 12px 16px; font: 500 11px/1.4 var(--font-mono); letter-spacing: .1em; color: var(--label); border-bottom: 1px solid var(--panel-line); }
.mtx tbody { font-variant-numeric: tabular-nums; }
.mtx td { padding: 10px 16px; border-bottom: 1px solid var(--panel-line); text-align: left; }
.mtx-mono td:first-child { font-family: var(--font-mono); }
.wtbl th { text-align: left; padding: 12px 18px; font: 500 11px/1.4 var(--font-mono); letter-spacing: .12em; color: var(--label); border-bottom: 1px solid var(--panel-line); }
.wtbl td { padding: 12px 18px; border-bottom: 1px solid var(--panel-line); text-align: left; }
.mtx tr:last-child td, .wtbl tr:last-child td { border-bottom: 0; }
td.accent { color: var(--accent); }

/* ---------- Display messages, indicators, front panel ---------- */
.msgs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--panel-line); border: 1px solid var(--panel-line); border-radius: var(--radius-form); overflow: hidden; }
.msgs-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.msg { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px 18px; background: var(--panel); }
.msg p { font-size: 15px; color: var(--soft-text-2); line-height: 1.5; }

.ind { padding: 18px; display: flex; gap: 12px; align-items: center; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot-green { background: var(--run-green); box-shadow: 0 0 8px var(--run-green); }
.dot-red { background: var(--display-red); box-shadow: 0 0 8px var(--display-red); }
.dot-red_blink { border: 2px solid var(--display-red); }
.ind-text { font-size: 14px; }

.single-product .leds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--panel-line); border: 1px solid var(--panel-line); border-radius: var(--radius-form); overflow: hidden; }
.led { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; background: var(--panel); }
.led i { width: 12px; height: 12px; border-radius: 50%; flex: none; margin-top: 5px; background: #24324A; }
.led i.lit-green { background: var(--run-green); box-shadow: 0 0 8px var(--run-green); }
.led i.lit-red { background: var(--display-red); box-shadow: 0 0 8px var(--display-red); }
.led i.lit-blue { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.led b { display: block; font: 500 13px/1.4 var(--font-mono); letter-spacing: .1em; }
.led span { font-size: 14px; color: var(--muted); }

/* ---------- Wiring ---------- */
.wiring { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.wire { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--panel-line); border: 1px solid var(--panel-line); border-radius: var(--radius-form); overflow: hidden; }
.wire > div { background: var(--panel); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.wire .sw { display: inline-flex; align-items: center; justify-content: center; font: 700 14px/1 var(--font-mono); padding: 6px 10px; border-radius: 3px; align-self: flex-start; }
.sw-red { background: #D92D20; color: #FFFFFF; }
.sw-green { background: #1E874A; color: #FFFFFF; }
.sw-yellow { background: #F5D90A; color: #111111; }
.sw-black { background: #111111; color: #FFFFFF; border: 1px solid var(--ghost-border); }
.sw-blue { background: #1D4ED8; color: #FFFFFF; }
.sw-white { background: #FFFFFF; color: #111111; }

/* ---------- Modes ---------- */
.mode { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.mode-head { display: flex; align-items: center; gap: 14px; }
.mode-head h3 { font-size: 22px; font-weight: 600; }
.mode-label { padding: 24px; gap: 10px; }
.mode-code, .modes b { font: 700 18px/1 var(--font-heading); letter-spacing: .06em; color: var(--accent); }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--panel-line); border: 1px solid var(--panel-line); border-radius: var(--radius-form); overflow: hidden; }
.modes > div { background: var(--panel); padding: 20px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- Panels ---------- */
.note-panel { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.docs-soon { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.warranty { padding: 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.warranty-text { display: flex; flex-direction: column; gap: 6px; }

.tanks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--panel-line); overflow: hidden; min-width: 0; }
.tank { display: flex; flex-direction: column; gap: 12px; padding: 24px; background: var(--panel); }
.probe { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; }
.probe b { font: 700 16px/1 var(--font-mono); color: var(--accent); padding: 8px 0; text-align: center; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-alt); }

.fault { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.fault-code { font: 500 13px var(--font-mono); letter-spacing: .1em; color: var(--accent); }
.fault-text { font-size: 14px; color: var(--muted); line-height: 1.5; }

.chips-block { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; }
.single-product .chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--input-border); font-size: 14px; }

/* Development-status cards (design: ProductDetail.html .card). */
.status-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.status-card h3 { font-size: 20px; font-weight: 600; }
.status-card p { color: var(--muted); font-size: 15px; }
.state-done { color: var(--run-green); }
.state-progress { color: var(--accent); }

/* ---------- Related product cards ---------- */
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; display: flex; flex-direction: column; min-width: 0; text-decoration: none; color: var(--ink); }
a.pcard:hover { border-color: var(--ghost-border); color: var(--ink); }
.pcard .shot { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.pcard .body { padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.pcard h3 { font-size: 20px; font-weight: 600; }
.pcard-now .body { gap: 8px; }
.pcard-img { aspect-ratio: 4 / 3; background: var(--surface-alt); border-bottom: 1px solid var(--line); }
.pcard-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.link { font-weight: 600; font-size: 15px; text-decoration: none; }
.pcard-now .link { margin-top: 6px; }

/* ---------- Breakpoints (product pages) ---------- */
@media (max-width: 1080px) {
	.g4, .single-product .leds, .msgs-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
	.g2, .g3, .msgs:not(.msgs-3), .parts, .wire, .modes { grid-template-columns: minmax(0, 1fr); }
	.g2 { gap: 40px; }
	.g2.g2-20 { gap: 20px; }
	.sec { padding-top: 56px; padding-bottom: 56px; }
}
@media (max-width: 560px) {
	.single-product .leds, .msgs-3 { grid-template-columns: minmax(0, 1fr); }
	.g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.spec { min-width: 0; font-size: 14px; }
	.spec th, .spec td { padding: 12px 12px; }
	.spec th { width: 40%; }
	.spec td.code { width: 56px; }
	table[style*="min-width"] { min-width: 0 !important; }
	.single-product table th, .single-product table td { padding-left: 12px !important; padding-right: 12px !important; }
}

/* ---------- Products page (design: Products.html) ---------- */
.post-type-archive-product .dev { font-size: 14px; }
.post-type-archive-product .g2 { gap: 20px; align-items: stretch; }
.p-search { position: relative; max-width: 520px; margin-top: 8px; }
.p-search svg { position: absolute; left: 14px; top: 15px; pointer-events: none; }
.p-search .sr-only, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.p-search input::-webkit-search-cancel-button { filter: invert(.7); }
.p-search input { padding-left: 42px; }
.chips-bar { border-bottom: 1px solid var(--line); }
.chips-bar .wrap { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
.post-type-archive-product .chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--input-border); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; }
.post-type-archive-product .chip:hover { color: var(--ink); border-color: var(--ink); }
.post-type-archive-product .chip.on { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.cat { padding-top: 72px; }
.cathead { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.cathead h2 { font-size: 30px; font-weight: 600; }
.cathead .head { gap: 8px; }
.prod { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-width: 0; }
.prod.solo { grid-column: 1 / -1; }
.prod.stacked { grid-template-columns: minmax(0, 1fr); }
.prod.stacked .gal { border-right: 0; border-bottom: 1px solid var(--line); }
.prod.highlight { border-color: #16405E; }
.gal { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-width: 0; }
.gal-art { justify-content: center; background: var(--panel); }
.prod .shot { border: 0; border-radius: 0; }
.prod .shot img { transition: transform .4s ease; }
.prod:hover .shot img { transform: scale(1.03); }
.prod .thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.prod .thumbs img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: var(--surface-alt); display: block; }
.info { padding: 28px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.info h3 { font-size: 26px; font-weight: 600; }
.info p { color: var(--muted); font-size: 15px; }
.feat { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.feat li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; color: var(--soft-text-2); }
.feat li::before { content: ""; width: 9px; height: 9px; margin-top: 6px; border: 2px solid var(--icon); border-radius: 2px; }
.prod .leds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.prod .leds span { font: 500 11px/1 var(--font-mono); letter-spacing: .1em; padding: 6px 8px; border: 1px solid var(--input-border); border-radius: 3px; color: var(--soft-text); }
.acts { display: flex; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 14px; }
.help { padding: 36px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; border-color: #16405E; }
.help-text { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.help-text h2 { font-size: 28px; font-weight: 600; }
.no-results { padding-top: 72px; }

@media (max-width: 1080px) {
	.post-type-archive-product .g2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
	.prod { grid-template-columns: minmax(0, 1fr); }
	.gal { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
	.prod .shot img { transition: none; }
}

/* Spacing utilities must beat component margins such as .checks { margin: 0 }. */
.checks.mt-6, .mt-6.mt-6 { margin-top: 6px; }
.checks.mt-8, .mt-8.mt-8 { margin-top: 8px; }

/* Heading above a wiring table (owner review 19 Nov 2026). */
.wiring-h { font-size: 20px; font-weight: 600; margin-top: 12px; }

/* Seven-segment display codes (inc/seg7.php). */
.seg .seg7 { display: block; height: 1em; overflow: visible; fill: currentColor; filter: drop-shadow(0 0 4px rgba(255, 77, 61, .55)); }
.seg .seg7 .off { opacity: .07; filter: none; }
.seg-inline { min-width: 0; padding: 4px 7px; font-size: 18px; vertical-align: middle; margin: 0 2px; }
.led i.key { width: 24px; height: 24px; background: none; border-radius: 0; margin-top: 0; }
.led i.key svg { display: block; }
.led i.key-2 { width: 52px; display: flex; gap: 4px; }
