/* ============================================================
   TRIBO — Design System CSS
   ============================================================ */

/* === Fonts (path relative to this CSS file: ../fonts/) === */
@font-face {
    font-family: 'Temac';
    src: url('../fonts/Temac-Regular.woff2?v=20261118-lt3') format('woff2'), url('../fonts/Temac-Regular.otf?v=20261118-lt3') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Temac';
    src: url('../fonts/Temac-Bold.woff2?v=20261118-lt3') format('woff2'), url('../fonts/Temac-Bold.otf?v=20261118-lt3') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Temac';
    src: url('../fonts/Temac-Italic.woff2?v=20261118-lt3') format('woff2'), url('../fonts/Temac-Italic.otf?v=20261118-lt3') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Temac';
    src: url('../fonts/Temac-BoldItalic.woff2?v=20261118-lt3') format('woff2'), url('../fonts/Temac-BoldItalic.otf?v=20261118-lt3') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* IBM Plex Mono: original Google Fonts subsets, self-hosted under OFL. */
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono/ibm-plex-mono-1.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono/ibm-plex-mono-2.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono/ibm-plex-mono-3.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono/ibm-plex-mono-4.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono/ibm-plex-mono-5.woff2) format('woff2');
  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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono/ibm-plex-mono-6.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono/ibm-plex-mono-7.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono/ibm-plex-mono-8.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono/ibm-plex-mono-9.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono/ibm-plex-mono-10.woff2) format('woff2');
  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;
}

/* === Variables === */
:root {
  --bg:           #0b0b0c;
  --surface:      #141418;
  --surface-2:    #1c1c22;
  --glass:        rgba(24,24,27,.3);
  --glass-border: rgba(39,39,42,.8);
  --glass-hover:  rgba(39,39,42,.5);
  --text:         #FFFFFF;
  /* Muted/subtle greys carry a slight cool (zinc) tint so body text reads
     neutral-cool rather than warm/brownish on the near-black bg. Kept as
     translucent so they still blend correctly over cards of varying darkness. */
  --text-muted:   rgba(210,214,228,.58);
  --text-subtle:  rgba(200,206,230,.16);
  --border:       rgba(255,255,255,.08);

  --font: 'Temac', system-ui, sans-serif;

  --fs-display: clamp(2.75rem, 7.5vw, 8.5rem);
  --fs-h1:      clamp(2rem, 4vw, 4.5rem);
  --fs-h2:      clamp(1.5rem, 2.5vw, 2.75rem);
  --fs-h3:      clamp(1.125rem, 1.5vw, 1.5rem);
  --fs-body:    1rem;
  --fs-sm:      0.875rem;
  --fs-label:   0.6875rem;

  --space-1:  0.5rem;
  --space-2:  1rem;
  --space-3:  1.5rem;
  --space-4:  2rem;
  --space-6:  3rem;
  --space-8:  4rem;
  --space-12: 6rem;
  --space-16: 8rem;

  --section-py: clamp(5rem, 10vw, 9rem);
  --max-w:      1400px;
  --gutter:     clamp(1.25rem, 4vw, 2.5rem);
  --header-h:   88px;

  --radius-card:    16px;
  --radius-card-lg: 24px;

  --t-fast:    120ms ease;
  --t-base:    220ms ease;
  --t-premium: 700ms cubic-bezier(.16,1,.3,1);
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:where(a, button, [tabindex]):focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
ul, ol { list-style: none; }
button { font-family: var(--font); }

/* === Layout === */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* === Typography === */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.label {
  display: block;
  font-size: var(--fs-label);
  font-weight: 100;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

/* Shared home captions follow the production process typography. */
.section-eyebrow {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.btn.home-section-cta {
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  padding: 0.625rem 1.125rem;
  font-size: 0.75rem;
  line-height: 1.35;
  white-space: normal;
  text-align: center;
  justify-content: center;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}

/* Public action states: primary/ghost are compatibility names, not inversions. */
:is(.btn, .btn-catalog, .contacts-requisites__btn, .series-cta) {
  background: transparent;
  color: var(--text);
  border-color: rgba(255,255,255,.3);
}
:is(.btn, .btn-catalog, .contacts-requisites__btn, .series-cta):not(:disabled):not([aria-disabled="true"]):is(:hover, :active) {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
:is(.btn, .btn-catalog, .contacts-requisites__btn, .series-cta):focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}
:is(.btn, .btn-catalog, .contacts-requisites__btn, .series-cta):is(:disabled, [aria-disabled="true"]) {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
  opacity: .5;
  cursor: not-allowed;
}

/* Reuse for standalone text actions; cards and selected navigation keep their roles. */
.text-link, .page-note a, .page-prose a, .blog-post__body a,
.rail-noise a, .rail-note a, .sidebar-reset, .language-banner__actions button {
  color: rgba(216,219,231,.72);
  text-decoration: none;
  transition: color var(--t-fast);
}
:is(.text-link, .page-note a, .page-prose a, .blog-post__body a,
.rail-noise a, .rail-note a, .sidebar-reset, .language-banner__actions button):is(:hover, :active) { color: var(--text); }
:is(.text-link, .page-note a, .page-prose a, .blog-post__body a,
.rail-noise a, .rail-note a, .sidebar-reset, .language-banner__actions button):focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

/* === Header === */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: transparent;
  transition: border-color var(--t-base);
  border-bottom: 1px solid transparent;
}
.site-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11,11,12,.94);
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-base);
}
.site-header.is-scrolled::after {
  opacity: 1;
}
.site-header.is-scrolled {
  border-bottom-color: var(--glass-border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: 100%;
  padding-inline: var(--gutter);
  max-width: var(--max-w);
  margin-inline: auto;
}

.logo { flex-shrink: 0; display: flex; align-items: center; }
.logo img { height: 48px; width: auto; }

.main-nav { flex: 1; display: flex; justify-content: center; }
.main-nav ul { display: flex; gap: var(--space-4); }
.main-nav a {
  font-size: var(--fs-sm);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  /* Brighter + cool-tinted (was rgba(255,255,255,.58)) so the labels read
     crisp instead of low-contrast/muddy. */
  color: rgba(216,219,231,.72);
  transition: color var(--t-premium);
  position: relative;
  padding-bottom: 3px;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-premium);
}
.main-nav a:hover { color: var(--text); }
.main-nav a[aria-current="page"] {
  color: var(--text);
}
.main-nav a[aria-current="page"]::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }

.lang-switcher { position: relative; }

.lang-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0;
  transition: color var(--t-fast);
  white-space: nowrap;
}
.lang-toggle:hover { color: var(--text); }

.lang-switcher::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 0.75rem;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  z-index: 200;
  list-style: none;
  padding: 0.25rem 0;
}
.lang-switcher.is-open .lang-dropdown,
.lang-switcher:not(.is-enhanced):hover .lang-dropdown,
.lang-switcher:not(.is-enhanced):focus-within .lang-dropdown { display: block; }
.lang-toggle:focus-visible,
.lang-option:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.lang-option {
  display: block;
  padding: 0.5rem 0.875rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  transition: color var(--t-fast);
}
.lang-option:hover,
.lang-option.is-active { color: var(--text); }

.btn-catalog {
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(255,255,255,.25);
  color: var(--text);
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
  transition: background var(--t-premium), color var(--t-premium), border-color var(--t-premium);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  z-index: 101;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.burger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-active span:nth-child(2) { opacity: 0; }
.burger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(11,11,12,.97);
  padding-top: var(--header-h);
  padding-inline: var(--gutter);
  padding-bottom: var(--space-12);
  overflow-y: auto;
}
.mobile-nav.is-open {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.mobile-nav ul { list-style: none; margin-top: auto; flex-shrink: 0; }
.mobile-nav li { border-top: 1px solid var(--glass-border); }
.mobile-nav li:last-child { border-bottom: 1px solid var(--glass-border); }
.mobile-nav li a {
  text-align: center;
  display: block;
  font-size: clamp(1.25rem, 6vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: var(--space-3) 0;
  transition: color var(--t-premium);
}
.mobile-nav li a:hover,
.mobile-nav li a[aria-current="page"] { color: var(--text); }
.mobile-nav__catalog {
  align-self: center;
  flex-shrink: 0;
  margin-top: var(--space-4);
  max-width: 100%;
}
.mobile-nav__catalog:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }

body.menu-open { overflow: hidden; }

/* === Footer === */
.site-footer {
  padding-block: var(--space-8);
  border-top: 1px solid var(--glass-border);
  margin-top: auto;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-8);
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.footer-brand img { height: 28px; width: auto; }
.footer-tagline { margin-top: var(--space-2); font-size: var(--fs-sm); color: var(--text-muted); }

.footer-nav ul { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.footer-nav a { font-size: var(--fs-sm); color: var(--text-muted); transition: color var(--t-fast); }
.footer-nav a:hover { color: var(--text); }

@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    justify-items: center;
    text-align: center;
  }
  .footer-brand img { margin-inline: auto; }
  .footer-nav ul {
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
  }
}

/* === 404 === */
.error-404 {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  text-align: center;
  padding: var(--space-16) var(--gutter);
}
.error-404 h1 { font-size: var(--fs-h1); }

/* ============================================================
   HOME PAGE
   ============================================================ */

/* --- Hero --- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  padding-bottom: var(--space-12);
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-video video {
  visibility: hidden;
  /* Dim the video itself so compositor changes cannot expose a dark overlay. */
  filter: brightness(0.5);
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-video video.is-active { visibility: visible; }
/* Train layer — kept for reference, not used */
.hero-train { display: none; }
.train-track {
  position: absolute;
  bottom: 18%;
  left: 0;
  width: 200%;
  height: 2px;
  background: var(--border);
}
.train-wrapper {
  display: flex;
  align-items: flex-end;
  position: absolute;
  bottom: 20%;
  left: 0;
  will-change: transform;
}
.wagon {
  height: 220px;
  width: auto;
  flex-shrink: 0;
  display: block;
  user-select: none;
  pointer-events: none;
}

.hero .container { position: relative; z-index: 4; }

.hero-content { max-width: 900px; }

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,.65);
  margin-bottom: var(--space-3);
}
.hero-eyebrow::before {
  content: '';
  display: block;
  flex-shrink: 0;
  width: 3px;
  height: 1.2em;
  background: rgba(255,255,255,.45);
  border-radius: 2px;
}

.hero-title {
  font-size: clamp(1.75rem, 3.2vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-3);
  /* non-interactive text is muted; hover-words are white */
  color: rgba(255,255,255,.72);
}

/* Hover word: always white → solid underline on hover */
.hero-hover-word {
  display: inline-block;
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: inherit;
  vertical-align: baseline;
  cursor: pointer;
  color: #fff;
}
.hero-hover-word::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width 0.4s ease;
}
.hero-hover-word.is-selected::after { width: 100%; }
.hero-hover-word.is-loading::after { background: none; border-bottom: 2px dotted currentColor; }
.hero-hover-word:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }

/* Tagline "Ми створюємо безпеку!" */
.hero-tagline {
  font-size: clamp(1.25rem, 2vw, 2rem);
  font-weight: 700;
  font-style: italic;
  color: rgba(255,255,255,.65);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-6);
}

.hero-sub {
  font-size: var(--fs-h3);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.hero-ctas {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.hero-certs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.hero-certs span {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,.35);
  border: 1px solid rgba(255,255,255,.12);
  padding: 0.25rem 0.625rem;
}

.hero-scroll {
  position: absolute;
  bottom: var(--space-4);
  right: var(--gutter);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  z-index: 4;
}
.hero-scroll::after {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: currentColor;
  opacity: 0.4;
}

/* --- Stats --- */
.stats {
  background: var(--surface);
  padding-block: var(--space-12);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
}
.stat {
  background: var(--surface);
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.stat-number {
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  gap: 0.1em;
}
.stat-suffix {
  font-size: 0.5em;
  color: var(--text-muted);
}
.stat-label {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

/* --- Clients / "Нам довіряють найкращі" --- */
.clients {
  padding-block: var(--section-py);
  border-top: 1px solid var(--border);
}
.clients-header {
  text-align: center;
  margin-bottom: var(--space-8);
}
.clients-header h2 {
  font-size: var(--fs-h2);
  line-height: 1.15;
}
.clients-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2.25rem, 5.5vw, 5.5rem);
  flex-wrap: wrap;
}
.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  /* revealed by the JS stagger; keep visible if JS is off */
}
.client-logo img {
  height: clamp(26px, 3.6vw, 44px);
  width: auto;
  max-width: 160px;
  object-fit: contain;
  /* Logos ship pre-coloured for dark bg — no filter; just a resting dim
     that lifts to full on hover, matching the site's restrained feel. */
  opacity: 0.6;
  transition: opacity var(--t-base), transform var(--t-base);
}
.client-logo:hover img { opacity: 1; }
a.client-logo:hover img { transform: translateY(-2px); }

/* --- Products teaser --- */
.products-teaser {
  padding-block: var(--section-py);
}
.products-teaser .container > h2 {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-8);
  text-align: center;
}
.products-teaser .container > .section-eyebrow { text-align: center; }
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.category-card {
  background: rgba(28,28,32,.45);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card-lg);
  padding: 2.5rem 3rem;
  min-height: 420px;
  transition: border-color var(--t-premium), background var(--t-premium);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

/* Spotlight effect */
.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255,255,255,.04),
    transparent 40%
  );
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s ease;
}
.category-card:hover::before { opacity: 1; }
.category-card:hover {
  border-color: var(--glass-hover);
}

/* Decorative outline number — top-right */
.category-card-num {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: clamp(4rem, 7vw, 6rem);
  font-weight: 700;
  -webkit-text-stroke: 1px rgba(255,255,255,.08);
  color: transparent;
  letter-spacing: -0.04em;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  transition: transform var(--t-premium);
  transform-origin: right center;
}
.category-card:hover .category-card-num { transform: scale(1.05); }

.category-card__top { position: relative; z-index: 2; max-width: 55%; }
.category-card h3 {
  font-size: clamp(1.375rem, 2vw, 1.875rem);
  line-height: 1.2;
  margin-bottom: 1rem;
  transition: color var(--t-premium);
}
.category-card:hover h3 { color: #fff; }
.category-card p {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.6;
  transition: color var(--t-premium);
}
.category-card:hover p { color: rgba(255,255,255,.6); }

/* Arrow button — bottom-left */
.category-card__bottom { position: relative; z-index: 2; margin-top: 2rem; }
.category-card-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(11,11,12,.4);
  color: var(--text-muted);
  font-size: 1rem;
  transition: background var(--t-premium), border-color var(--t-premium), color var(--t-premium);
}
.category-card:hover .category-card-arrow {
  background: #fff;
  border-color: #fff;
  color: #000;
}

/* Product image — bottom-right */
.category-card-img {
  position: absolute;
  bottom: 0; right: 0;
  width: 66%;
  height: 60%;
  object-fit: contain;
  object-position: bottom right;
  pointer-events: none;
  filter: grayscale(1) contrast(1.15) brightness(.75);
  transition: filter var(--t-premium), transform var(--t-premium);
  transform: translateY(4px);
}
.category-card:hover .category-card-img {
  filter: grayscale(0) contrast(1) brightness(1);
  transform: translateY(0);
}

/* --- Products teaser compact 4-column variant --- */
.categories-grid--4col {
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.categories-grid--4col .category-card {
  padding: 1.5rem;
}
.categories-grid--4col .category-card__top {
  max-width: 100%;
}
.categories-grid--4col .category-card h3 {
  font-size: clamp(0.95rem, 1.4vw, 1.2rem);
}
.categories-grid--4col .category-card-num {
  font-size: clamp(3rem, 5vw, 4rem);
  top: 1rem;
  right: 1.25rem;
}
.categories-grid--4col .category-card-img {
  width: 75%;
  height: 55%;
}
.categories-grid--4col .category-card__bottom {
  margin-top: 1.25rem;
}

/* --- Laboratory section --- */
.lab-section {
  position: relative;
  overflow: hidden;
  padding-block: calc(var(--section-py) * 1.5);
}
.lab-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.lab-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6) saturate(0.8);
}
.lab-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(9,9,10,.6) 0%, transparent 60%),
    linear-gradient(to bottom, rgba(9,9,10,.5) 0%, transparent 30%, rgba(9,9,10,.7) 100%);
}
.lab-content {
  position: relative;
  z-index: 1;
}
.lab-heading {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--space-3);
  max-width: 560px;
}
.lab-description {
  font-size: var(--fs-body);
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: var(--space-6);
}

.lab-brand-link {
  margin-top: var(--space-3);
  max-width: 560px;
  font-size: var(--fs-sm);
}
.lab-brand-link a {
  display: inline-block;
  padding-block: 10px;
}

/* --- Export map --- */
.export-section {
  /* The product teaser already supplies the spacing above this section. */
  padding-bottom: var(--section-py);
  overflow: hidden;
}
.export-header {
  display: grid;
  grid-template-columns: 1fr;
  margin-bottom: var(--space-6);
}
.export-text { text-align: center; }
.export-text h2 { font-size: var(--fs-h2); margin-bottom: var(--space-2); }
.export-description {
  font-size: var(--fs-body);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 540px;
  margin-inline: auto;
  margin-bottom: var(--space-3);
}
.export-certs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.export-cert-badge {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 0.2rem 0.625rem;
}

.map-wrap {
  position: relative;
  width: 100%;
  padding-inline: var(--gutter);
  max-width: var(--max-w);
  margin-inline: auto;
}
.world-map-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Keep the entire export story in view on wide desktop screens. */
@media (min-width: 1101px) {
  .export-section {
    display: grid;
    grid-template-columns: minmax(0, 440px) minmax(0, 832px);
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    padding-inline: var(--gutter);
  }
  .export-header,
  .export-section .map-wrap {
    min-width: 0;
    width: 100%;
    padding: 0;
    margin: 0;
  }
  .export-text { text-align: left; }
  .export-description { margin-inline: 0; }
  .export-certs { justify-content: flex-start; }
}
.map-bg-image {
  opacity: 0.18;
  filter: brightness(0.8);
}
.world-map-svg .country-dot {
  opacity: 0;
}
.world-map-svg .country-dot circle {
  transform-origin: center;
  transition: fill 0.15s ease, stroke 0.15s ease;
}

/* Map tooltip */
.map-tooltip {
  position: absolute;
  pointer-events: none;
  transform: translateX(-50%);
  background: rgba(9, 9, 10, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 5px 10px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.12s ease;
  z-index: 10;
}
.map-tooltip.is-visible {
  opacity: 1;
}

/* --- Blog preview --- */
.blog-preview {
  padding-block: var(--section-py);
}
.blog-preview-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}
.blog-preview-header h2 { font-size: var(--fs-h2); }
.blog-preview-header a {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--t-premium);
}
.blog-preview-header a:hover { color: var(--text); }

/* Homepage blog grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  background: transparent;
}
.blog-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: background var(--t-premium), border-color var(--t-premium);
}
.blog-card:hover {
  background: rgba(24,24,27,.5);
  border-color: var(--glass-hover);
}
.blog-card-tag {
  display: inline-block;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  border-radius: 999px;
  align-self: flex-start;
}
.blog-card h3 {
  font-size: var(--fs-h3);
  line-height: 1.3;
}
.blog-card p { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.6; }
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  color: var(--text-subtle);
}
.blog-card-footer .read-more {
  color: var(--text-muted);
  transition: color var(--t-premium);
}
.blog-card:hover .blog-card-footer .read-more { color: var(--text); }

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }

  /* Switch header nav to burger earlier than the general mobile
     breakpoint below — at narrower widths (~940px and down) the UA nav
     labels + lang switcher + catalog button no longer fit the header
     and start wrapping/overflowing past the logo. */
  .main-nav { display: none; }
  .header-actions .btn-catalog { display: none; }
  .header-actions { margin-left: auto; }
  .burger {
    display: flex;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  .header-inner { position: relative; }
}

@media (max-width: 768px) {
  /* Hero */
  .hero-title { font-size: clamp(1.75rem, 9vw, 3rem); }
  .hero-eyebrow { justify-content: center; }
  .wagon { height: 130px; }

  /* Category & blog grids */
  .categories-grid { grid-template-columns: 1fr; gap: 1rem; }
  .category-card { min-height: 320px; padding: 2rem; }
  .category-card-num { font-size: 3.5rem; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-preview-header { flex-direction: column; align-items: flex-start; gap: var(--space-3); }

}

@media (max-width: 480px) {
  .site-header .logo img { height: 36px; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { text-align: center; justify-content: center; }
  .mobile-nav li a { font-size: clamp(1.1rem, 7vw, 1.5rem); }
}

/* ============================================================
   UTILITIES
   ============================================================ */

/* Decorative outlined text (background headings) */
.text-stroke {
  -webkit-text-stroke: 1px rgba(255,255,255,.06);
  color: transparent;
}

/* Page hero heading with decorative bg text */
.page-hero {
  position: relative;
  padding-top: calc(var(--header-h) + var(--space-4));
  padding-bottom: var(--space-3);
  padding-inline: var(--gutter);
  max-width: var(--max-w);
  margin-inline: auto;
}
.page-hero__bg-text {
  font-size: clamp(4rem, 14vw, 12rem);
  font-weight: 700;
  -webkit-text-stroke: 1px rgba(255,255,255,.05);
  color: transparent;
  letter-spacing: -0.04em;
  line-height: 1;
  position: absolute;
  top: calc(var(--header-h) - 1.5rem);
  left: var(--gutter);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.page-hero__heading {
  position: relative;
  z-index: 1;
}
.page-hero__heading h1,
.page-hero__title {
  /* Tighter cap than global --fs-h1 (which grew to ~60–72px on wide screens);
     ~48px max matches the reference proportion for inner-page hero titles. */
  font-size: clamp(1.875rem, 3.2vw, 3rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 0;
}
.page-hero__heading h1 span,
.page-hero__title span {
  font-weight: 400;
  color: var(--text-muted);
}

/* Centered variant — /produktsiia, /blog, /kontakty hero (trial).
   Revert: remove class "page-hero--center" from those templates, or delete this block. */
.page-hero--center .page-hero__heading {
  text-align: center;
}
.page-hero--center .page-hero__bg-text {
  left: 50%;
  transform: translateX(-50%);
}

/* Generic glass card — no backdrop-filter here (keeps text CPU-rasterized on Windows) */
.glass-card {
  background: rgba(28,28,32,.45);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card-lg);
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-premium);
}
.glass-card:hover { border-color: var(--glass-hover); }

/* Spotlight pseudo for glass cards */
.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    500px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255,255,255,.035),
    transparent 40%
  );
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s ease;
}
.glass-card:hover::before { opacity: 1; }

/* Distributor small card */
.dist-card {
  background: rgba(24,24,27,.1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color var(--t-premium);
}
.dist-card:hover { border-color: var(--glass-hover); }

/* ============================================================
   CATALOG
   ============================================================ */

/* Category overview grid */
.catalog-overview { padding-block: var(--space-2) var(--section-py); }

/* Breadcrumb */
.breadcrumb {
  padding-top: calc(var(--header-h) + var(--space-2));
  padding-bottom: var(--space-3);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  display: flex;
  gap: var(--space-1);
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span { color: var(--text); }
.breadcrumb-sep { opacity: 0.3; }

/* Category header */
.catalog-cat-header {
  padding-block: var(--space-2) var(--space-6);
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
}
.catalog-cat-header h1 { font-size: var(--fs-h2); }
.catalog-count { font-size: var(--fs-sm); color: var(--text-muted); }

/* Catalog two-column layout */
.catalog-intro { margin-bottom: var(--space-4); }
.catalog-intro p { max-width: 75ch; color: var(--text-muted); line-height: 1.65; }

.catalog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-8);
  align-items: start;
  padding-bottom: var(--section-py);
}

/* ── Sidebar ── */
.catalog-sidebar {
  position: sticky;
  top: calc(var(--header-h) + var(--space-2));
  max-height: calc(100dvh - var(--header-h) - var(--space-2) * 2);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(24,24,27,.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  padding: var(--space-3) var(--space-3);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.12) transparent;
}
.catalog-sidebar::-webkit-scrollbar { width: 4px; }
.catalog-sidebar::-webkit-scrollbar-track { background: transparent; }
.catalog-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.12);
  border-radius: 2px;
}
.catalog-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.22); }
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(63,63,70,.6);
  font-size: var(--fs-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.sidebar-close {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  line-height: 1;
}
.sidebar-close:hover { color: var(--text); background: rgba(255,255,255,.06); }

.sidebar-reset {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  padding: 0;
}
.sidebar-reset:hover { color: var(--text); }

.filter-group {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(39,39,42,.5);
}
.filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.filter-group-label {
  display: block;
  font-size: var(--fs-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  padding-left: 0.625rem;
  border-left: 2px solid rgba(113,113,122,.5);
}
.filter-options { display: flex; flex-direction: column; gap: 0.625rem; }
.filter-opt {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--t-premium);
}
.filter-opt:hover { color: var(--text); }
.filter-opt input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border: 1px solid rgba(63,63,70,.8);
  border-radius: 3px;
  background: rgba(9,9,10,.9);
  cursor: pointer;
  position: relative;
  transition: background var(--t-premium), border-color var(--t-premium);
}
.filter-opt input[type="checkbox"]:checked {
  background: #fff;
  border-color: #fff;
}
.filter-opt input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.filter-opt:has(input:checked) { color: var(--text); }

.filter-wva-input {
  width: 100%;
  background: rgba(24,24,27,.4);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.5rem 0.75rem;
  font-size: var(--fs-sm);
  font-family: 'IBM Plex Mono', monospace;
  outline: none;
  transition: border-color var(--t-premium);
}
.filter-wva-input::placeholder { color: var(--text-muted); }
.filter-wva-input:focus { border-color: rgba(113,113,122,.6); }

/* ── Toolbar ── */
.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
  gap: var(--space-3);
  min-height: 2.5rem;
}
.filter-toggle-btn {
  display: none;
  background: rgba(24,24,27,.4);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.5rem 1rem;
  font-size: var(--fs-sm);
  cursor: pointer;
}
.catalog-total { display: none; font-size: var(--fs-sm); color: var(--text-muted); }

/* ── View switcher ── */
.catalog-view-switcher {
  display: flex;
  align-items: center;
  background: rgba(24,24,27,.4);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 3px;
  position: relative;
  margin-left: auto;
}
.view-switcher-bg {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: 34px;
  background: var(--surface-2);
  border-radius: 999px;
  transition: transform var(--t-premium);
}
.view-btn {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color var(--t-premium);
}
.view-btn.is-active { color: var(--text); }

/* ── Product grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  transition: grid-template-columns var(--t-premium);
}

/* ── Product card ── */
.product-card {
  display: flex;
  flex-direction: column;
  background: rgba(24,24,27,.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: border-color var(--t-premium);
}
.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    400px circle at var(--mouse-x, -999px) var(--mouse-y, -999px),
    rgba(255,255,255,.03),
    transparent 40%
  );
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.product-card:hover::before { opacity: 1; }
.product-card:hover { border-color: rgba(63,63,70,.6); }

.product-card-img {
  background: rgba(9,9,10,.3);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--space-2);
  border-bottom: 1px solid var(--glass-border);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  flex-shrink: 0;
}
.product-card-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform var(--t-premium);
}
.product-card:hover .product-card-img img { transform: scale(1.05); }

.product-card-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  position: relative;
  z-index: 2;
}
.product-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.product-card-wva {
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-card-wva--empty { color: var(--text-subtle); }

.product-card-article {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-top: 0.2rem;
}

.product-card-type {
  font-size: var(--fs-label);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.product-card-footer {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: calc(1rem + 1px);
}

/* Paint the separator as a filled strip to avoid border repaint artifacts.
   Keep the former border's 1px in the padding so card geometry stays intact. */
.product-card-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: rgba(39,39,42,.6);
  pointer-events: none;
}

.product-card-dims {
  display: block;
  min-width: 0;
  flex: 1;
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.product-card-dims-values {
  display: block;
  line-height: 1.5;
}
.product-card-dim-part {
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
  overflow-wrap: anywhere;
}
/* Keep adjacent grid cards aligned without clipping long free-text values. */
.product-grid:not(.is-list) .product-card-dims-values { min-height: 3em; }
.product-grid:not(.is-list) .product-card-footer { display: block; }
.product-grid:not(.is-list) .product-card-arrow {
  position: absolute;
  top: calc(1rem + 1px);
  right: 0;
}
.product-grid .product-card-footer.product-card-footer--plain {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.product-grid .product-card-footer.product-card-footer--plain .product-card-arrow { position: static; }

.product-card-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: background var(--t-premium), border-color var(--t-premium), color var(--t-premium);
}
.product-card:hover .product-card-arrow {
  background: #fff;
  border-color: #fff;
  color: #000;
}

/* ── List view ── */
.product-grid.is-list {
  grid-template-columns: 1fr;
  gap: var(--space-2);
}
.product-grid.is-list .product-card {
  flex-direction: row;
  align-items: stretch;
}
.product-grid.is-list .product-card-img {
  aspect-ratio: auto;
  width: 120px;
  min-width: 120px;
  height: auto;
  min-height: 96px;
  padding: 0.65rem;
  border-bottom: none;
  border-right: 1px solid var(--glass-border);
  border-radius: var(--radius-card) 0 0 var(--radius-card);
  flex-shrink: 0;
}
/* body is a 2-column grid: [info, flexible] [footer, sized to its content].
   Previously a 3rd fixed 44px track was reserved for the arrow, but the
   arrow actually lives inside .product-card-footer alongside dims (see
   below) — that track never held an item, so it (and its extra gap) was
   pure dead space stolen from the info column. minmax(120px,200px) on the
   dims track was also always resolving to the 200px ceiling since grid
   doesn't shrink a minmax floor/ceiling to fit — at narrow widths that
   left the info column just tens of pixels wide, so WVA/article/type
   truncated to nothing. auto lets the footer take only what its content
   (dims text + arrow, stacked) actually needs. */
.product-grid.is-list .product-card-body {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  flex: 1;
  min-width: 0;
}
/* Info stack: WVA + article + type vertically */
.product-grid.is-list .product-card-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.product-grid.is-list .product-card-wva {
  font-size: 0.625rem;
}
.product-grid.is-list .product-card-article {
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-grid.is-list .product-card-type {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.625rem;
}
/* Footer: dims + arrow in a column, no separator */
.product-grid.is-list .product-card-footer {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: 18rem;
}
.product-grid.is-list .product-card-footer::before { display: none; }
.product-grid.is-list .product-card-dims {
  font-size: 0.6875rem;
  text-align: right;
}

/* At narrow widths the footer (dims + arrow) still claims a fixed chunk of
   the row's width even after the 1fr/auto fix above, since dims text has
   its own minimum content width — competing with info for the same row
   leaves too little for WVA/article/type to stay readable. Below 560px,
   drop the two-column layout and stack the footer under info as its own
   full-width row instead, so info always gets the full card width. */
@media (max-width: 560px) {
  .product-grid.is-list .product-card-body {
    grid-template-columns: 1fr;
  }
  .product-grid.is-list .product-card-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    max-width: none;
  }
  .product-grid.is-list .product-card-dims {
    text-align: left;
  }
}

@media (max-width: 360px) {
  .product-grid.is-list .product-card-img { width: 92px; min-width: 92px; }
  .product-grid.is-list .product-card-body { padding: 0.75rem; }
}

/* With the desktop sidebar present, keep dimension previews readable. */
@media (min-width: 769px) and (max-width: 1200px) {
  .product-grid:not(.is-list) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 769px) and (max-width: 900px) {
  .product-grid:not(.is-list) .product-card-body { padding-left: 0.75rem; padding-right: 0.75rem; }
}

/* Pagination */
.catalog-pagination {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: var(--space-6);
  justify-content: center;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.page-btn:hover, .page-btn.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* Loading state */
.catalog-loading { opacity: 0.4; pointer-events: none; }
.catalog-empty {
  grid-column: 1 / -1;
  padding: var(--space-8);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* ============================================================
   PRODUCT DETAIL PAGE
   ============================================================ */

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-6);
  padding-block: var(--space-2) var(--section-py);
  align-items: start;
}

/* ── Gallery column ── */
.product-detail-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  position: sticky;
  top: calc(var(--header-h) + var(--space-2));
}
.product-gallery-main {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  overflow: hidden;
  border-radius: var(--radius-card-lg);
}
.product-gallery-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform var(--t-premium);
}
.product-gallery-main:hover img { transform: scale(1.04); }

.product-gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.gallery-thumb {
  width: 64px;
  height: 64px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem;
  cursor: pointer;
  transition: border-color var(--t-premium);
  overflow: hidden;
}
.gallery-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery-thumb:hover,
.gallery-thumb.is-active { border-color: rgba(255,255,255,.4); }

.product-cert-strip {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.product-cert-badge {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 0.2rem 0.625rem;
}

/* ── Info column ── */
.product-detail-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-2);
}

/* Hero block: type → article → WVA */
.product-hero-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(39,39,42,.5);
}
/* Series badge — links to the curated /produktsiia/seriia/{slug} landing.
   Sans-serif + filled pill on purpose, so it reads as "collection" rather
   than a spec/identifier like the monospace WVA/OE badges below it. */
.product-line-badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  background: rgba(255,255,255,.08);
  border: 1px solid var(--glass-hover);
  border-radius: 999px;
  padding: 0.35rem 0.875rem;
  transition: background var(--t-premium), border-color var(--t-premium);
}
.product-line-badge:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); }
.product-line-badge-arrow { font-size: 0.9em; transition: transform var(--t-premium); }
.product-line-badge:hover .product-line-badge-arrow { transform: translate(2px, -2px); }
.product-type-label {
  font-size: var(--fs-label);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.product-article {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--text);
}
.product-wva-list {
  display: flex;
  gap: 0.25rem 0.75rem;
  flex-wrap: wrap;
  align-items: baseline;
}
.product-wva-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(200,206,230,.32);
  margin-right: 0.25rem;
}
.wva-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  transition: color var(--t-premium);
}
.wva-badge:hover { color: var(--text); }

/* Section label (above each block) */
.product-section-label {
  font-size: var(--fs-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-left: 0.625rem;
  border-left: 2px solid rgba(113,113,122,.5);
}

/* Description block */
.product-description-text {
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--text-muted);
}

/* Specs card */
.product-specs-card {
  background: rgba(24,24,27,.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem;
}
.product-specs {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.product-specs tr:last-child td { border-bottom: none; }
.product-specs td {
  padding: 0.625rem 0;
  border-bottom: 1px solid rgba(39,39,42,.5);
  vertical-align: middle;
}
.product-specs td:first-child {
  color: var(--text-muted);
  width: 50%;
}
.product-specs-val {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  color: var(--text);
}

/* Compatible vehicles */
.product-vehicles-group + .product-vehicles-group {
  margin-top: 0.5rem;
}
.product-vehicles-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.vehicle-tag {
  font-size: var(--fs-sm);
  background: rgba(24,24,27,.3);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 0.3rem 0.75rem;
  color: var(--text-muted);
  transition: border-color var(--t-premium), color var(--t-premium);
}
.vehicle-tag:hover { border-color: rgba(113,113,122,.5); color: var(--text); }

/* Downloads */
.product-files-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.product-file-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(24,24,27,.2);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--text);
  text-decoration: none;
  font-size: var(--fs-sm);
  transition: border-color var(--t-premium), background var(--t-premium);
}
.product-file-link:hover {
  border-color: rgba(113,113,122,.5);
  background: rgba(39,39,42,.3);
}
.product-file-icon { color: var(--text-muted); flex-shrink: 0; }
.product-file-label { flex: 1; font-weight: 500; }
.product-file-name {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 0.5rem;
}
.product-file-lang {
  font-size: var(--fs-label);
  color: var(--text-muted);
  margin-left: 0.375rem;
  font-weight: 400;
}
.product-file-arrow { color: var(--text-muted); flex-shrink: 0; margin-left: auto; }

/* Where to buy */
.product-distributors-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.product-dist-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(24,24,27,.2);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--text);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: border-color var(--t-premium), background var(--t-premium);
}
.product-dist-link:hover {
  border-color: rgba(255,255,255,.2);
  background: rgba(39,39,42,.3);
}
.product-dist-country {
  margin-left: auto;
  font-size: var(--fs-label);
  color: var(--text-muted);
  font-weight: 400;
}
.product-dist-arrow { color: var(--text-muted); flex-shrink: 0; }
.product-dist-link:hover .product-dist-arrow { color: var(--text); }

/* Mobile — home sections */
@media (max-width: 1100px) {
  .categories-grid--4col { grid-template-columns: repeat(2, 1fr); }
}
/* Match the production page's stacked content breakpoint. */
@media (max-width: 900px) {
  .hero-content { text-align: center; }
  .hero-eyebrow, .hero-ctas, .hero-certs { justify-content: center; }
  .products-teaser .container > h2 { text-align: center; }
  .lab-content, .export-text { text-align: center; }
  .lab-heading, .lab-description, .lab-brand-link, .export-description { margin-inline: auto; }
  .export-certs { justify-content: center; }
}
@media (max-width: 560px) {
  .categories-grid--4col { grid-template-columns: 1fr; }
}

/* Mobile catalog */
@media (max-width: 992px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-layout { grid-template-columns: 240px 1fr; gap: var(--space-4); }
}
@media (max-width: 768px) {
  .cat-overview-grid { grid-template-columns: 1fr; }
  .cat-overview-grid .category-card { min-height: 260px; }
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(320px, 100vw);
    z-index: 400;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-100%);
    /* transition is added by JS only on open/close, not on resize */
    background: var(--bg);
    border: none;
    border-right: 1px solid var(--glass-border);
    border-radius: 0;
    max-height: 100dvh;
    padding: var(--space-4) var(--space-3);
  }
  .catalog-sidebar.sidebar-animated { transition: transform 0.3s cubic-bezier(.4,0,.2,1); }
  .catalog-sidebar.is-open { transform: translateX(0); }
  .sidebar-close { display: flex !important; }
  .filter-toggle-btn { display: block; }
  .catalog-total { display: block; }

  /* Backdrop behind open sidebar */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 399;
  }
  .sidebar-backdrop.is-visible { display: block; }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  /* Gallery stacks above info at this width instead of sitting beside it —
     sticky positioning would pin it over the info text while scrolling. */
  .product-detail-gallery { position: static; top: auto; }
  .catalog-cat-header { flex-direction: column; gap: var(--space-1); }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   SEARCH BAR
   ============================================================ */

.search-bar-wrap {
  padding-top: var(--header-h);
  padding-bottom: var(--space-2);
  background: var(--bg);
}

/* Search bar following page-hero doesn't need to clear the sticky header again */
.page-hero + .search-bar-wrap {
  padding-top: 0;
}
/* Breadcrumb following search bar doesn't need to clear the header either */
.search-bar-wrap + .breadcrumb {
  padding-top: var(--space-2);
}

/* ── Input field ── */
.search-field {
  position: relative;
  max-width: 720px;
}
.search-input {
  width: 100%;
  background: #161616;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  padding: 0.9rem 1.5rem;
  font-size: var(--fs-body);
  color: var(--text);
  outline: none;
  appearance: none;
  transition: border-color var(--t-fast);
}
.search-input:focus { border-color: rgba(255,255,255,.28); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-input::placeholder { color: var(--text-muted); }
.search-field > .catalog-search-icon {
  position: absolute; left: 1.5rem; top: 50%; transform: translateY(-50%);
  z-index: 1; color: #8f8f98; pointer-events: none;
}
.search-field > .search-input { padding-inline-start: 3.5rem; }

/* ── Autocomplete dropdown ── */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #161616;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  overflow: hidden;
  z-index: 300;
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
}
.sd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  gap: var(--space-2);
  cursor: pointer;
  transition: background var(--t-fast);
  text-decoration: none;
  color: var(--text);
}
.sd-item:hover,
.sd-item.is-active  { background: rgba(255,255,255,.05); }
.sd-body   { display: flex; align-items: baseline; gap: 0.6rem; min-width: 0; }
.sd-article {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
.sd-type  { font-size: var(--fs-sm); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-dims  { font-size: var(--fs-sm); color: var(--text-muted); white-space: nowrap; }
.sd-wva   {
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.sd-more {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  cursor: pointer;
  border-top: 1px solid var(--border);
  transition: background var(--t-fast), color var(--t-fast);
}
.sd-more:hover,
.sd-more.is-active  { background: rgba(255,255,255,.05); color: var(--text); }
.sd-more-count {
  margin-left: auto;
  background: rgba(255,255,255,.07);
  padding: 0.1rem 0.5rem;
  border-radius: 99px;
  font-size: 0.75rem;
}

/* ── Search results page ── */
.search-query-label {
  color: var(--text-muted);
  margin-left: 0.5rem;
}
.catalog-count #result-count,
.search-query-value {
  color: var(--text);
  font-weight: 600;
}
.search-empty {
  padding-block: var(--space-8);
  color: var(--text-muted);
  line-height: 1.8;
}

/* Mobile */
@media (max-width: 768px) {
  .search-field { max-width: 100%; }
}
