/* ==========================================================================
   SensorCenter — public site styles
   1. Fonts and tokens     4. Header and mega-menu   7. Product page
   2. Base elements        5. Home page              8. Inquiry form
   3. Buttons and helpers  6. Catalog and listings   9. Footer and misc
   ========================================================================== */

/* 1. Fonts and tokens ------------------------------------------------------ */

@font-face {
    font-family: "IBM Plex Sans";
    src: url("/fonts/ibm-plex-sans-latin.woff2") format("woff2");
    font-weight: 100 700; font-stretch: 75% 100%; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "IBM Plex Sans";
    src: url("/fonts/ibm-plex-sans-latin-ext.woff2") format("woff2");
    font-weight: 100 700; font-stretch: 75% 100%; font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "IBM Plex Sans";
    src: url("/fonts/ibm-plex-sans-cyrillic.woff2") format("woff2");
    font-weight: 100 700; font-stretch: 75% 100%; font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "IBM Plex Sans";
    src: url("/fonts/ibm-plex-sans-cyrillic-ext.woff2") format("woff2");
    font-weight: 100 700; font-stretch: 75% 100%; font-display: swap;
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
    font-family: "IBM Plex Mono";
    src: url("/fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
    font-weight: 400; font-display: swap;
}
@font-face {
    font-family: "IBM Plex Mono";
    src: url("/fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
    font-weight: 500; font-display: swap;
}

:root {
    --ink: #15191e;          /* text, dark surfaces */
    --ink-2: #3d4651;        /* secondary text */
    --muted: #66707c;        /* labels, counts */
    --line: #d9dde2;         /* hairlines */
    --line-strong: #b4bcc5;  /* input borders */
    --surface: #f3f4f6;      /* tinted bands, table headers */
    --paper: #ffffff;
    --accent: #ffc20e;       /* signal yellow: the one action colour */
    --accent-dark: #efb300;
    --whatsapp: #15803d;
    --error: #b42318;

    --radius: 3px;
    --container: 1440px;
    --gutter: 24px;

    --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", "Noto Sans", "Hiragino Sans", "Microsoft YaHei", "Leelawadee UI", sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
}

/* 2. Base elements --------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--paper);
}

h1, h2, h3 { font-weight: 600; font-stretch: 88%; line-height: 1.2; margin: 0; }
h1 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.01em; }
h2 { font-size: 22px; }
h3 { font-size: 16px; }
p { margin: 0 0 1em; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img, svg { max-width: 100%; }
img { height: auto; display: block; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.page { padding-top: 20px; padding-bottom: 64px; }
.page > h1 { margin-top: 6px; }
.lead { font-size: 17px; color: var(--ink-2); max-width: 72ch; margin: 10px 0 0; }
.page-subhead { margin: 40px 0 18px; }
.prose { max-width: 72ch; }
.prose h1 { margin: 6px 0 14px; }
.prose p { margin-bottom: 1em; }
.prose .lead { margin-bottom: 1em; }

.partno { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0; margin: 0; overflow-wrap: anywhere; }
.count { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius); }
.skip-link:focus { top: 8px; }

/* 3. Buttons and helpers --------------------------------------------------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 40px; padding: 8px 18px;
    border: 1px solid transparent; border-radius: var(--radius);
    font: inherit; font-weight: 600; line-height: 1.2; text-align: center;
    cursor: pointer; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent-dark); color: var(--ink); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--paper); border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #116a32; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13.5px; }
.btn-lg { min-height: 48px; padding: 10px 24px; font-size: 16px; }

.breadcrumbs ol { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 13.5px; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.breadcrumbs a { color: var(--ink-2); }
.breadcrumbs [aria-current] { color: var(--muted); }

.section { padding: 48px 0; }
.section-tinted { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head a { font-weight: 500; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

.empty-state { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 40px 24px; text-align: center; }
.empty-state h1, .empty-state h2 { font-size: 20px; max-width: 46ch; margin: 0 auto 8px; }
.empty-state p { color: var(--ink-2); max-width: 56ch; margin: 0 auto; }
.empty-state-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }
.empty-state-page { margin: 40px auto; max-width: 720px; padding: 56px 24px; }
.empty-state-page h1 { font-size: 26px; }
.empty-state-code { font-family: var(--mono); color: var(--muted); margin-bottom: 6px; }

/* 4. Header and mega-menu -------------------------------------------------- */

.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); }

.topbar { background: var(--ink); color: #c8ced6; font-size: 13px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 34px; }
.topbar-contacts { display: flex; gap: 22px; white-space: nowrap; overflow: hidden; }
.topbar a:hover { color: #fff; }
.topbar :focus-visible { outline-color: var(--accent); }

/* Dropdown menu (language switcher, sort order): a <details> with a list of links. */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; white-space: nowrap; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown[open] > summary .chevron { transform: rotate(180deg); }
.dropdown > ul { position: absolute; right: 0; top: calc(100% + 4px); z-index: 70; margin: 0; padding: 6px; list-style: none; min-width: 180px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 24px rgba(21, 25, 30, .14); }
.dropdown li a { display: block; padding: 7px 10px; border-radius: 2px; font-size: 14px; white-space: nowrap; }
.dropdown li a:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
.dropdown li a[aria-current] { font-weight: 600; background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }

.lang > summary { height: 24px; padding: 0 8px; color: #fff; border: 1px solid #47505b; border-radius: var(--radius); }
.lang > summary:hover, .lang[open] > summary { border-color: #8a939e; }

.mainbar { border-bottom: 1px solid var(--line); }
.mainbar-inner { position: relative; display: flex; align-items: center; gap: 20px; height: 68px; }

.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; font-stretch: 88%; letter-spacing: -0.01em; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo svg { flex: none; }
.logo-mark { display: block; }

.nav-toggle { display: none; }
.mainnav-mobile-extra { display: none; }

.mainnav-list { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.mainnav-list > li > a { display: flex; align-items: center; gap: 6px; padding: 8px 10px; font-weight: 500; white-space: nowrap; border-radius: var(--radius); }
.mainnav-list > li > a:hover { text-decoration: none; background: var(--surface); }
.mainnav-list > li > a.is-current { box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }

.search { position: relative; flex: 1 1 220px; max-width: 400px; margin-left: auto; }
.search input { width: 100%; height: 40px; padding: 0 42px 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); font: inherit; color: inherit; background: var(--paper); appearance: none; }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.search button { position: absolute; right: 1px; top: 1px; width: 40px; height: 38px; border: 0; background: none; color: var(--ink); cursor: pointer; display: grid; place-items: center; }

.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 24px rgba(21, 25, 30, .14); padding: 4px; }
.suggest a { display: block; padding: 8px 10px; border-radius: 2px; }
.suggest a:hover, .suggest a.is-active { background: var(--surface); text-decoration: none; }
.suggest-name { display: block; font-weight: 500; font-size: 14px; }
.suggest-meta { display: block; font-size: 12.5px; color: var(--muted); }
.suggest-meta b { font-family: var(--mono); font-weight: 500; color: var(--ink-2); }

.header-cta { white-space: nowrap; }

/* Mega-menu, desktop: categories on the left, the product groups of the pointed one on the right. */
.has-mega { position: static; }
.mega { display: none; }

@media (min-width: 1160px) {
    .has-mega.is-open .mega { display: block; }
    .has-mega.is-open .mega-toggle { background: var(--surface); }
    .mega { position: absolute; left: 0; right: 0; top: 100%; z-index: 55; background: var(--paper); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 16px 32px rgba(21, 25, 30, .14); }
    .mega-inner { position: relative; padding: 16px 20px; }
    .mega-cats { list-style: none; margin: 0; padding: 0; width: 47%; columns: 2; column-gap: 8px; }
    .mega-cat { break-inside: avoid; }
    .mega-cat-link { display: block; padding: 5px 10px; font-size: 14.5px; line-height: 1.35; border-radius: 2px; }
    .mega-cat-link:hover { text-decoration: none; }
    .mega-cat.is-active > .mega-cat-link { background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); font-weight: 600; }
    .mega-expand { display: none; }
    .mega-pane { display: none; position: absolute; top: 16px; bottom: 16px; left: calc(47% + 36px); right: 20px; padding-left: 28px; border-left: 1px solid var(--line); overflow: auto; }
    .mega-cat.is-active > .mega-pane { display: block; }
    .mega-pane-title { font-size: 20px; font-weight: 600; font-stretch: 88%; margin: 2px 0 12px; }
    .mega-subs { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 24px; }
    .mega-subs li { break-inside: avoid; }
    .mega-subs a { display: block; padding: 5px 0; font-size: 14.5px; color: var(--ink-2); }
    .mega-subs a:hover { color: var(--ink); }
    .mega-pane-all { display: inline-block; margin-top: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
    .mega-all { display: inline-block; margin: 12px 0 0 10px; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
}

/* Header on tablets and phones: logo + menu button, search on its own row, menu as a panel. */
@media (max-width: 1159.98px) {
    .site-header { top: 0; }
    .topbar { display: none; }
    .mainbar-inner { height: auto; display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; padding-top: 10px; padding-bottom: 10px; }
    .logo { font-size: 18px; }
    .header-cta { display: none; }
    .search { grid-column: 1 / -1; max-width: none; margin: 0; }
    .search input { height: 44px; font-size: 16px; }   /* 16px stops iOS from zooming in */
    .search button { height: 42px; width: 44px; }

    .nav-toggle { display: grid; gap: 5px; align-content: center; width: 44px; height: 44px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); cursor: pointer; }
    .nav-toggle span { display: block; height: 2px; background: var(--ink); }
    .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
    .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .mainnav { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 55; max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); overflow-y: auto; overscroll-behavior: contain; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 16px 32px rgba(21, 25, 30, .14); padding: 0 var(--gutter) 20px; }
    .nav-open .mainnav { display: block; }
    .mainnav-list { display: block; }
    .mainnav-list > li { border-bottom: 1px solid var(--line); }
    .mainnav-list > li > a { padding: 14px 0; font-size: 16px; justify-content: space-between; border-radius: 0; }
    .mainnav-list > li > a:hover { background: none; }
    .mainnav-list > li > a.is-current { box-shadow: none; }
    .has-mega.is-open .mega-toggle svg { transform: rotate(180deg); }

    .has-mega.is-open .mega { display: block; }
    .mega { padding-bottom: 10px; }
    .mega-cats { list-style: none; margin: 0; padding: 0; }
    .mega-cat { display: grid; grid-template-columns: 1fr 44px; align-items: center; border-top: 1px solid var(--line); }
    .mega-cat-link { padding: 11px 0 11px 12px; }
    .mega-expand { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: var(--ink); cursor: pointer; }
    .mega-cat.is-expanded .mega-expand svg { transform: rotate(180deg); }
    .mega-pane { display: none; grid-column: 1 / -1; padding: 0 0 12px 24px; }
    .mega-cat.is-expanded > .mega-pane { display: block; }
    .mega-pane-title { display: none; }
    .mega-subs { list-style: none; margin: 0; padding: 0; }
    .mega-subs a, .mega-pane-all { display: block; padding: 9px 0; color: var(--ink-2); }
    .mega-pane-all { font-weight: 600; color: var(--ink); }
    .mega-all { display: block; padding: 12px; border-top: 1px solid var(--line); font-weight: 600; }

    .mainnav-mobile-extra { display: grid; gap: 12px; padding-top: 18px; }
    .mainnav-mobile-extra a:not(.btn) { color: var(--ink-2); }
}

/* 5. Home page ------------------------------------------------------------- */

.hero { border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(32px, 4.4vw, 54px); font-stretch: 82%; line-height: 1.04; letter-spacing: -0.015em; max-width: 14em; }
.hero-lead { font-size: 18px; color: var(--ink-2); max-width: 52ch; margin: 18px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-drawing { border-radius: var(--radius); box-shadow: 0 1px 2px rgba(21, 25, 30, .06), 0 8px 24px rgba(21, 25, 30, .07); }
.hero-drawing svg { display: block; width: 100%; height: auto; }

.category-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.category-grid li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.category-grid a { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 64px; padding: 10px 14px; }
.category-grid a:hover { background: var(--surface); text-decoration: none; box-shadow: inset 3px 0 0 var(--accent); }
.category-name { font-weight: 600; line-height: 1.3; }
.category-meta { font-size: 12.5px; color: var(--muted); }

.brand-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.brand-grid li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.brand-grid a { display: grid; place-items: center; height: 76px; padding: 10px 14px; text-align: center; }
.brand-grid a:hover { background: var(--surface); text-decoration: none; }
.brand-grid span { font-size: 17px; font-weight: 600; font-stretch: 88%; color: var(--ink-2); }
.brand-grid img { max-height: 44px; width: auto; }

.why-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 32px; }
.why-grid li { border-top: 2px solid var(--ink); padding-top: 12px; }
.why-grid p { margin: 6px 0 0; color: var(--ink-2); font-size: 14.5px; }

.inquiry-band { background: var(--ink); color: #fff; }
.inquiry-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 40px; padding-bottom: 40px; }
.inquiry-band h2 { font-size: 26px; }
.inquiry-band p { margin: 8px 0 0; color: #c8ced6; font-size: 16px; }
.inquiry-band .btn { flex: none; }
.inquiry-band :focus-visible { outline-color: var(--accent); }

/* 6. Catalog and listings -------------------------------------------------- */

.directory { columns: 4 250px; column-gap: 32px; margin-top: 28px; }
.directory-group { break-inside: avoid; padding-bottom: 22px; }
.directory-group h2 { font-size: 16px; padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
.directory-group ul { list-style: none; margin: 8px 0 0; padding: 0; }
.directory-group li a { display: block; padding: 3px 0; font-size: 14px; color: var(--ink-2); }
.directory-group li a:hover { color: var(--ink); }

.listing-head { margin-bottom: 24px; }
.listing { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 32px; align-items: start; }

.side-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 16px; }
.side-block h2 { font-size: 15px; margin-bottom: 8px; }
.side-back, .side-more { display: inline-block; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.side-back { margin-bottom: 8px; }
.side-more { margin-top: 8px; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 5px 8px; margin: 0 -8px; font-size: 14px; border-radius: 2px; }
.side-list a:hover { background: var(--surface); text-decoration: none; }
.side-block .is-current { font-weight: 600; }
.side-list .is-current { background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }

.filters summary { font-weight: 600; font-stretch: 88%; cursor: pointer; list-style: none; }
.filters summary::-webkit-details-marker { display: none; }
.filters fieldset { border: 0; margin: 14px 0 0; padding: 0; min-width: 0; }
.filters legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.check { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; font-size: 14px; cursor: pointer; }
.check input { flex: none; width: 15px; height: 15px; margin: 0; accent-color: var(--ink); position: relative; top: 2px; }
.check span:first-of-type { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.filters-actions { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.filters-actions a { font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
.js .filters-actions .btn { display: none; }   /* with JavaScript the form submits as soon as a box is ticked */

.listing-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; margin-bottom: 14px; }
.listing-count { margin: 0; color: var(--ink-2); }
.sort { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.sort .dropdown > summary { justify-content: space-between; min-width: 150px; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); color: var(--ink); font-weight: 500; }
.sort .dropdown > summary:hover, .sort .dropdown[open] > summary { border-color: var(--ink); }
.sort .dropdown > ul { min-width: 100%; }

/* Five products in a row on wide screens, fewer as the screen narrows (see Responsive below). */
.product-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }

.product-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.product-card:hover { border-color: var(--line-strong); }
.product-card-image { display: block; aspect-ratio: 4 / 3; background: #f7f8f9; border-bottom: 1px solid var(--line); padding: 14px; }
.product-card-image img { width: 100%; height: 100%; object-fit: contain; }
.product-card-body { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 10px; }
.product-card-brand { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.product-card-name { font-size: 14.5px; line-height: 1.3; font-stretch: 100%; }
.product-card-specs { margin: 6px 0 0; font-size: 12.5px; }
.product-card-specs div { display: flex; flex-wrap: wrap; gap: 0 8px; justify-content: space-between; padding: 3px 0; border-top: 1px solid var(--surface); }
.product-card-specs dt { color: var(--muted); }
.product-card-specs dd { margin: 0 0 0 auto; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.product-card-category { margin: auto 0 0; padding-top: 8px; font-size: 12.5px; color: var(--muted); }
.product-card-actions { display: grid; gap: 6px; padding: 0 12px 12px; }
.product-card-actions .btn { padding-inline: 8px; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 28px; }
.pagination ol { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; align-items: center; }
.pagination ol a { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 6px; border: 1px solid var(--line); border-radius: var(--radius); font-variant-numeric: tabular-nums; }
.pagination ol a:hover { border-color: var(--ink); text-decoration: none; }
.pagination ol a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }

.brand-list { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.brand-list a { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 14px 8px; border-bottom: 1px solid var(--line); }
.brand-list a:hover { background: var(--surface); text-decoration: none; }
.brand-list-logo span { font-size: 18px; font-weight: 600; font-stretch: 88%; }
.brand-list-logo img { max-height: 40px; width: auto; }
.brand-list-text strong { display: none; }
.brand-list-text span { color: var(--ink-2); font-size: 14.5px; }

/* 7. Product page ---------------------------------------------------------- */

.product-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: start; }
.gallery-main { aspect-ratio: 4 / 3; background: #f7f8f9; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; }
.gallery-thumbs button { width: 76px; height: 58px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius); background: #f7f8f9; cursor: pointer; }
.gallery-thumbs button[aria-current] { border-color: var(--ink); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }

.product-brand { font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.product-summary h1 { font-size: clamp(24px, 2.6vw, 32px); margin-top: 6px; }
.product-ids { margin: 18px 0 0; border-top: 1px solid var(--line); }
.product-ids div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.product-ids dt { color: var(--muted); font-size: 14px; }
.product-ids dd { margin: 0; }
.product-ids dd.partno { font-size: 14.5px; }
.product-ids dd a { text-decoration: underline; text-underline-offset: 3px; }
.product-short { margin: 18px 0 0; font-size: 16px; color: var(--ink-2); max-width: 60ch; }
.product-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.product-note { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }

.product-body { margin-top: 8px; max-width: 880px; }
.product-sections section { margin-top: 36px; }
.product-sections h2, .product-related h2 { font-size: 20px; margin-bottom: 12px; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.spec-table th, .spec-table td { padding: 9px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-table th { width: 38%; background: var(--surface); font-weight: 500; color: var(--ink-2); }

.plain-list { margin: 0; padding-left: 18px; max-width: 72ch; }
.plain-list li { padding: 2px 0; }

.doc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.doc-list li a { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 14px; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.doc-list li a:hover { background: var(--surface); text-decoration: none; }
.doc-type { font-weight: 600; }
.doc-ext { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.doc-list-inline { display: flex; flex-wrap: wrap; gap: 6px 18px; border: 0; margin-top: 16px; }
.doc-list-inline li a { display: inline; padding: 0; border: 0; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.doc-list-inline li a:hover { background: none; }

.product-inquiry { margin-top: 48px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.product-inquiry > .lead { margin-bottom: 22px; font-size: 16px; }
.product-related { margin-top: 48px; }

.mobile-cta { display: none; }

/* 8. Inquiry form ---------------------------------------------------------- */

.inquiry-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; margin-top: 24px; }
.product-inquiry .inquiry-layout { margin-top: 0; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 13.5px; font-weight: 600; }
.field label small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.field input, .field textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); color: inherit; font: inherit; padding: 0 12px; }
.field input { height: 42px; }

/* File picker: the real input covers the box invisibly, so click, keyboard and drag-and-drop all work. */
.file-field { position: relative; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px 0 4px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--paper); }
.file-field:hover { border-color: var(--ink); }
.file-field:focus-within { outline: 2px solid var(--ink); outline-offset: -1px; }
.file-field input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.file-field-button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--surface); font-size: 13.5px; font-weight: 600; }
.file-field-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: var(--muted); }
.file-field.has-file .file-field-name { color: var(--ink); }
.field input[readonly] { background: var(--surface); color: var(--ink-2); }
.field textarea { padding: 10px 12px; resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.field .input-validation-error { border-color: var(--error); }
.field-error { color: var(--error); font-size: 13px; }
.field-error:empty { display: none; }
.field-hint { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.form-errors { color: var(--error); margin-bottom: 12px; }
.form-errors ul { margin: 0; padding-left: 18px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-options { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 18px; }
.contact-options h2 { font-size: 16px; margin-bottom: 8px; }
.contact-options dl { margin: 0; }
.contact-options dl div { padding: 9px 0; border-top: 1px solid var(--line); }
.contact-options dt { font-size: 12.5px; color: var(--muted); }
.contact-options dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.contact-options dd a { text-decoration: underline; text-underline-offset: 3px; }
.contact-options-note { margin: 10px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

.inquiry-product { display: inline-flex; align-items: center; gap: 14px; margin-top: 20px; padding: 10px 16px 10px 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.inquiry-product:hover { border-color: var(--line-strong); text-decoration: none; }
.inquiry-product img { width: 96px; height: 72px; object-fit: contain; background: #f7f8f9; }
.inquiry-product > span { display: flex; flex-direction: column; gap: 2px; }

/* 9. Footer and misc ------------------------------------------------------- */

.site-footer { background: var(--surface); border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.inquiry-band + .site-footer { border-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.1fr; gap: 32px; padding-top: 40px; padding-bottom: 32px; }
.footer-brand { font-size: 18px; font-weight: 600; font-stretch: 88%; color: var(--ink); margin-bottom: 8px; }
.footer-grid p { max-width: 38ch; }
.site-footer h2 { font-size: 14px; font-stretch: 100%; color: var(--ink); margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 3px 0; overflow-wrap: anywhere; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-top: 16px; padding-bottom: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer-bottom p { margin: 0; }

.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #1fa855; color: #fff; box-shadow: 0 4px 14px rgba(21, 25, 30, .28); }
.wa-float:hover { background: var(--whatsapp); }
.wa-float .wa-icon { width: 28px; height: 28px; }

/* Responsive --------------------------------------------------------------- */

@media (max-width: 1399.98px) {
    .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1199.98px) {
    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
    .hero-inner { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; padding-bottom: 36px; }
    .hero-drawing { max-width: 640px; }

    .listing { grid-template-columns: 1fr; gap: 16px; }
    .listing-side { display: grid; gap: 12px; }
    .side-block { margin: 0; }
    .listing-side nav.side-block { max-height: 220px; overflow: auto; }
    .filters:not([open]) summary::after, .filters[open] summary::after { content: ""; }
    .filters summary { display: flex; justify-content: space-between; }
    .filters summary::after { content: "+"; font-weight: 400; }
    .filters[open] summary::after { content: "–"; }

    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-top { grid-template-columns: 1fr; gap: 24px; }
    .gallery { max-width: 520px; }
    .inquiry-layout { grid-template-columns: 1fr; }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .inquiry-band-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
    :root { --gutter: 16px; }
    .section { padding: 36px 0; }
    .page { padding-bottom: 48px; }
    .hero-lead { font-size: 16px; }
    .hero-actions .btn { flex: 1 1 100%; }

    .category-grid { grid-template-columns: 1fr 1fr; }
    .category-grid a { min-height: 58px; padding: 9px 10px; }
    .category-name { font-size: 14px; }
    .brand-grid { grid-template-columns: 1fr 1fr; }
    .why-grid { grid-template-columns: 1fr; gap: 20px; }

    /* product cards become rows: image left, text right, full-width actions */
    .product-grid { grid-template-columns: 1fr; gap: 12px; }
    .product-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); }
    .product-card-image { aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line); padding: 8px; }
    .product-card-actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
    .product-card-actions .btn { min-height: 44px; }

    .listing-toolbar { flex-wrap: wrap; }
    .brand-list a { grid-template-columns: 1fr auto; gap: 4px 12px; }
    .brand-list-text { grid-column: 1 / -1; grid-row: 2; }

    .product-ids div { grid-template-columns: 120px minmax(0, 1fr); }
    .spec-table th { width: 44%; }
    .spec-table th, .spec-table td { padding: 8px 10px; }
    .doc-list li a { grid-template-columns: minmax(0, 1fr) auto; }
    .doc-list .doc-type { grid-column: 1 / -1; }
    .product-inquiry { padding: 18px 14px; margin-inline: -8px; }

    .form-grid { grid-template-columns: 1fr; }
    .field input { height: 46px; font-size: 16px; }
    .file-field { height: 46px; }
    .field textarea { font-size: 16px; }
    .form-actions .btn { flex: 1 1 100%; min-height: 48px; }

    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .pagination .btn { display: none; }

    /* product page: the two actions stay on screen */
    .product-cta { display: none; }
    .mobile-cta { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(21, 25, 30, .08); }
    .mobile-cta .btn { flex: 1 1 0; min-height: 46px; }
    body:has(.mobile-cta) { padding-bottom: 66px; }
}

/* Preloader: the logo mark sends out its signal (dot, first arc, second arc) until the page is ready.
   site.js adds .is-done; the last rule hides it after 4 s even if JavaScript never runs. */
.preloader { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--paper); animation: preloader-timeout 0s linear 4s forwards; }
.preloader.is-done { opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility 0s linear .25s; }
.no-preloader .preloader { display: none; }
.preloader .logo-arc { animation: logo-signal 1.1s ease-in-out infinite; }
.preloader .logo-arc-1 { animation-delay: .15s; }
.preloader .logo-arc-2 { animation-delay: .3s; }
.preloader .logo-dot { animation: logo-signal 1.1s ease-in-out infinite; }
@keyframes logo-signal {
    0%, 100% { opacity: .2; }
    40%, 60% { opacity: 1; }
}
@keyframes preloader-timeout { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
    .preloader .logo-arc, .preloader .logo-dot { animation: none; }
}

/* Home page drawing: a metal part passes the sensing face; while it is in range the LED is on.
   One 6-second cycle: part arrives (0–20%), is detected (20–60%), leaves (60–80%), pause. */
@keyframes hd-pass {
    0% { transform: translateY(-170px); }
    20%, 60% { transform: translateY(0); }
    80%, 100% { transform: translateY(170px); }
}
@keyframes hd-detect {
    0%, 19% { opacity: 0; }
    21%, 60% { opacity: 1; }
    62%, 100% { opacity: 0; }
}
@keyframes hd-led {
    0%, 19% { fill: #fff; }
    21%, 60% { fill: #ffc20e; }
    62%, 100% { fill: #fff; }
}
@keyframes hd-playhead {
    from { transform: translateX(0); }
    to { transform: translateX(300px); }
}
@keyframes hd-wave {
    0%, 100% { opacity: .25; }
    50% { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
    .hd-target { animation: hd-pass 6s cubic-bezier(.45, 0, .25, 1) infinite; }
    .hd-sn, .hd-glow-wrap { animation: hd-detect 6s linear infinite; }
    .hd-led { animation: hd-led 6s linear infinite; }
    .hd-wave { animation: hd-wave 1.8s ease-in-out infinite; }
    .hd-playhead { animation: hd-playhead 6s linear infinite; }
    .hd-wave:nth-child(2) { animation-delay: .2s; }
    .hd-wave:nth-child(3) { animation-delay: .4s; }
    .dropdown .chevron { transition: transform .15s ease; }
    .nav-toggle span, .mega-expand svg, .mega-toggle svg { transition: transform .15s ease, opacity .15s ease; }
}

@media print {
    .site-header, .site-footer, .wa-float, .mobile-cta, .inquiry-band, .product-inquiry, .listing-side { display: none !important; }
}
