html[data-theme="clinical-light"] {
    color-scheme: light;
    --theme-page: #ffffff;
    --theme-surface: #ffffff;
    --theme-soft: #f5f7fa;
    --theme-text: #22313f;
    --theme-muted: #52677b;
    --theme-ink: #14294b;
    --theme-accent: #0f6e6e;
    --theme-action-text: #ffffff;
    --theme-footer: #10213d;
    --theme-footer-text: #e5edf7;
    --theme-line: #dce4ed;
}
html[data-theme="midnight-clinical"] {
    color-scheme: dark;
    --theme-page: #0b1728;
    --theme-surface: #14243a;
    --theme-soft: #1b304a;
    --theme-text: #edf4fb;
    --theme-muted: #c0cfde;
    --theme-ink: #f4f8fc;
    --theme-accent: #69d2c1;
    --theme-action-text: #0b1728;
    --theme-footer: #07111f;
    --theme-footer-text: #edf4fb;
    --theme-line: #39516b;
}
html[data-theme="sage-slate"] {
    color-scheme: light;
    --ink: #203f34;
    --teal: #2c7661;
    --mist: #d3e4d8;
    --text: #243a31;
    --line: #bccfc1;
    --theme-page: #e2eee6;
    --theme-surface: #f2f7f2;
    --theme-soft: #d3e4d8;
    --theme-text: #243a31;
    --theme-muted: #4c6257;
    --theme-ink: #203f34;
    --theme-accent: #2c7661;
    --theme-action-text: #ffffff;
    --theme-footer: #173d32;
    --theme-footer-text: #eaf4ed;
    --theme-line: #bccfc1;
}
html[data-theme="warm-ivory"] {
    color-scheme: light;
    --ink: #43392a;
    --teal: #8f692e;
    --mist: #e8ddca;
    --text: #3a342b;
    --line: #d6c9b4;
    --theme-page: #f5ebdb;
    --theme-surface: #fff7eb;
    --theme-soft: #e8ddca;
    --theme-text: #3a342b;
    --theme-muted: #655d4f;
    --theme-ink: #43392a;
    --theme-accent: #8f692e;
    --theme-action-text: #ffffff;
    --theme-footer: #3c3021;
    --theme-footer-text: #f8f0e2;
    --theme-line: #d6c9b4;
}
html[data-theme="steel-blue"] {
    color-scheme: light;
    --ink: #103355;
    --teal: #1764ad;
    --mist: #c8dbf1;
    --text: #1b314a;
    --line: #a9c0d8;
    --theme-page: #d9e7f6;
    --theme-surface: #edf4fc;
    --theme-soft: #c8dbf1;
    --theme-text: #1b314a;
    --theme-muted: #3e5670;
    --theme-ink: #103355;
    --theme-accent: #1764ad;
    --theme-action-text: #ffffff;
    --theme-footer: #0a3158;
    --theme-footer-text: #ebf4ff;
    --theme-line: #a9c0d8;
}

html:not([data-theme]), html[data-theme="clinical-light"], html[data-theme="sage-slate"],
html[data-theme="warm-ivory"], html[data-theme="steel-blue"] { background: var(--theme-page); }
body:not(.cms-body) { background: var(--theme-page); color: var(--theme-text); }
body:not(.cms-body) main, body:not(.cms-body) .content-page { color: var(--theme-text); }
body:not(.cms-body) h1, body:not(.cms-body) h2, body:not(.cms-body) h3,
body:not(.cms-body) h4, body:not(.cms-body) .section-heading h2,
body:not(.cms-body) .catalogue h1, body:not(.cms-body) .product-detail h1 { color: var(--theme-ink); }
body:not(.cms-body) .cch-head, body:not(.cms-body) .head-wrap,
body:not(.cms-body) .cch-nav, body:not(.cms-body) .category-grid a,
body:not(.cms-body) .product-card, body:not(.cms-body) .quote-form-card,
body:not(.cms-body) .auth-card { background-color: var(--theme-surface); }
body:not(.cms-body) .head-wrap, body:not(.cms-body) .product-card,
body:not(.cms-body) .category-grid a, body:not(.cms-body) .product-detail-image img,
body:not(.cms-body) .quote-form-card, body:not(.cms-body) input,
body:not(.cms-body) select, body:not(.cms-body) textarea { border-color: var(--theme-line); }
body:not(.cms-body) .cch-head { background: color-mix(in srgb, var(--theme-surface) 88%, transparent); }
body:not(.cms-body) .cch-logo strong, body:not(.cms-body) .cch-logo em,
body:not(.cms-body) .cch-nav a, body:not(.cms-body) .price,
body:not(.cms-body) .proof b { color: var(--theme-ink); }
body:not(.cms-body) .cch-logo small, body:not(.cms-body) .product-category,
body:not(.cms-body) .category-grid span, body:not(.cms-body) .proof span,
body:not(.cms-body) .catalogue-heading p, body:not(.cms-body) .lead,
body:not(.cms-body) .product-description { color: var(--theme-muted); }
body:not(.cms-body) .cch-search-field, body:not(.cms-body) .product-card img,
body:not(.cms-body) .product-image-placeholder, body:not(.cms-body) .category-pills a,
body:not(.cms-body) .cart-summary { background-color: var(--theme-soft); }
body:not(.cms-body) .cch-search-field { border-color: var(--theme-line); }
body:not(.cms-body) .cch-search-field:focus-within { border-color: var(--theme-accent); background: var(--theme-surface); }
body:not(.cms-body) .cch-search button, body:not(.cms-body) .btn-ink { background: var(--theme-accent); color: var(--theme-action-text); }
body:not(.cms-body) .cch-search button svg { stroke: currentColor; }
body:not(.cms-body) .btn-ghost { background: var(--theme-surface); color: var(--theme-ink); border-color: var(--theme-line); }
body:not(.cms-body) .category-pills .active { background: var(--theme-accent); color: var(--theme-action-text); }
body:not(.cms-body) .hero { background: linear-gradient(120deg, var(--theme-soft), var(--theme-page)); }
body:not(.cms-body) .hero-panel { background: var(--theme-ink); color: var(--theme-page); }
body:not(.cms-body) .site-footer { background: var(--theme-footer); color: var(--theme-footer-text); }
body:not(.cms-body) .site-footer h2, body:not(.cms-body) .site-footer .footer-logo,
body:not(.cms-body) .site-footer .paybox > span, body:not(.cms-body) .site-footer .paybox strong { color: #fff; }
body:not(.cms-body) .mobile-drawer-panel { background: var(--theme-page); color: var(--theme-text); }
body:not(.cms-body) .mobile-drawer-heading, body:not(.cms-body) .mobile-drawer nav a { color: var(--theme-ink); border-color: var(--theme-line); }
body:not(.cms-body) .search-suggestions { background: var(--theme-surface); border-color: var(--theme-line); }
body:not(.cms-body) .search-result { color: var(--theme-ink); border-color: var(--theme-line); }
body:not(.cms-body) .search-result:hover { background: var(--theme-soft); }
body:not(.cms-body) .search-see-all { background: var(--theme-soft); color: var(--theme-accent); }
body:not(.cms-body) .search-result img, body:not(.cms-body) .search-result-placeholder { background: #f5f7fa; }
.theme-menu { position: relative; display: inline-flex; align-items: center; }
.theme-menu-toggle { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 32px; padding: .25rem .35rem; border: 0; border-radius: 0; background: transparent; color: inherit; box-shadow: none; font: inherit; font-size: .78rem; font-weight: 650; cursor: pointer; }
.theme-menu-toggle:hover { background: transparent; color: inherit; text-decoration: underline; text-underline-offset: .2em; }
.theme-menu-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.theme-menu-toggle svg { width: 1.1rem; height: 1.1rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-menu-popover { position: absolute; z-index: 80; top: calc(100% + .45rem); right: 0; display: grid; width: 205px; padding: .35rem; border: 1px solid var(--theme-line); border-radius: 8px; background: var(--theme-surface); color: var(--theme-text); box-shadow: 0 12px 30px rgba(11, 31, 51, .2); }
.theme-menu-popover[hidden] { display: none; }
.theme-menu-popover [role="menuitemradio"] { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 40px; padding: .5rem .65rem; border: 0; border-radius: 5px; background: transparent; color: var(--theme-text); font: inherit; font-size: .84rem; text-align: left; cursor: pointer; }
.theme-menu-popover [role="menuitemradio"]:hover,
.theme-menu-popover [role="menuitemradio"]:focus-visible { background: var(--theme-soft); outline: none; }
.theme-menu-popover [role="menuitemradio"][aria-checked="true"] { color: var(--theme-ink); font-weight: 750; }
.theme-menu-popover [role="menuitemradio"][aria-checked="true"]::after { content: "✓"; color: var(--theme-accent); font-size: 1rem; }
.mobile-drawer-actions .theme-menu { width: 100%; }
.mobile-drawer-actions .theme-menu-toggle { justify-content: flex-start; width: 100%; min-height: 42px; color: var(--theme-ink); font-size: .9rem; }
.mobile-drawer-actions .theme-menu-popover { right: auto; left: 0; width: 100%; }
body:not(.cms-body) .quote-help, body:not(.cms-body) .cart-document-note { background: var(--theme-soft); color: var(--theme-text); }
body:not(.cms-body) .product-detail-image img { background: #fff; }
body:not(.cms-body) .quote-page, body:not(.cms-body) .catalogue,
body:not(.cms-body) .content-page { color: var(--theme-text); }
body:not(.cms-body) .invoice-preview { background: #fff; color: #22313f; }

@media (max-width: 900px) {
    .top-contact .theme-menu { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
    body:not(.cms-body), body:not(.cms-body) .cch-head, body:not(.cms-body) .head-wrap,
    body:not(.cms-body) .product-card, body:not(.cms-body) .category-grid a {
        transition: background-color .18s ease, color .18s ease, border-color .18s ease;
    }
}
