/* ==========================================================================
   KERAF — keraf.vn
   Design tokens → light theme default, dark theme via media query + [data-theme]
   ========================================================================== */

:root {
  /* Brand — KERAF red and ink, from the logo */
  --brand: #e4100a;
  --brand-strong: #bf0d08;
  --brand-text: #c40e09;
  --on-brand: #ffffff;
  --ink: #0b0b0c;

  /* Surfaces — warm paper neutrals, like a printed catalog */
  --bg: #ffffff;
  --bg-sunken: #f5f4f1;
  --bg-raised: #ffffff;
  --bg-ink: #0d0d0e;
  --surface-hover: #efeee9;
  --photo-bg: #eeede9;
  --overlay: rgba(10, 10, 11, .62);

  /* Text */
  --text: #141414;
  --text-muted: #5c5a55;
  --text-faint: #8a8782;

  /* Lines */
  --line: #e6e4de;
  --line-strong: #d2cfc7;

  --accent: var(--brand-text);
  --accent-soft: rgba(228, 16, 10, .08);
  --selected: var(--ink);

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(20, 18, 14, .06), 0 1px 3px rgba(20, 18, 14, .04);
  --shadow-md: 0 8px 20px rgba(20, 18, 14, .08), 0 2px 5px rgba(20, 18, 14, .04);
  --shadow-lg: 0 24px 56px rgba(20, 18, 14, .16), 0 6px 14px rgba(20, 18, 14, .06);

  /* Geometry */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-full: 999px;
  --gutter: 16px;
  --maxw: 1280px;
  --header-h: 64px;
  --topbar-h: 36px;
  --sticky-h: calc(var(--topbar-h) + var(--header-h));   /* top bar + header, both stay on screen */

  --font-sans: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "Noto Sans", "Noto Sans KR", "Malgun Gothic", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e0f;
    --bg-sunken: #09090a;
    --bg-raised: #171718;
    --bg-ink: #050506;
    --surface-hover: #212122;
    --photo-bg: #1d1d1e;
    --overlay: rgba(3, 3, 4, .78);
    --text: #ecebe8;
    --text-muted: #a6a39c;
    --text-faint: #75726c;
    --line: #262524;
    --line-strong: #363431;
    --accent: #ff5c52;
    --accent-soft: rgba(255, 70, 60, .13);
    --selected: var(--brand);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, .45);
    --shadow-lg: 0 24px 56px rgba(0, 0, 0, .6);
  }
}

:root[data-theme="dark"] {
  --bg: #0e0e0f;
  --bg-sunken: #09090a;
  --bg-raised: #171718;
  --bg-ink: #050506;
  --surface-hover: #212122;
  --photo-bg: #1d1d1e;
  --overlay: rgba(3, 3, 4, .78);
  --text: #ecebe8;
  --text-muted: #a6a39c;
  --text-faint: #75726c;
  --line: #262524;
  --line-strong: #363431;
  --accent: #ff5c52;
  --accent-soft: rgba(255, 70, 60, .13);
  --selected: var(--brand);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, .6);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--sticky-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
html.no-scroll { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: opacity .18s ease;
}

/* First visit: hidden for a moment while the language is chosen from the visitor's country */
html.lang-wait body { opacity: 0; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.018em; font-weight: 700; text-wrap: balance; }
p { margin: 0; }
.mono { font-family: var(--font-mono); font-size: .94em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand); color: var(--on-brand); }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 28px; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--brand); color: var(--on-brand);
  padding: 10px 16px; border-radius: var(--r-sm);
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; }

/* Placeholder for a missing photo: a faint hatch */
.ph, .card__noimg, .gallery__empty {
  background: repeating-linear-gradient(135deg, var(--photo-bg) 0 9px,
    color-mix(in srgb, var(--text) 5%, var(--photo-bg)) 9px 18px);
}
.ph { display: block; }

/* --------------------------------------------------------------------------
   Buttons, chips
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-size: 14.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn--sm { padding: 8px 14px; font-size: 13.5px; }
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-strong); box-shadow: var(--shadow-sm); }
.btn--ghost { background: var(--bg-raised); border-color: var(--line-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--text-faint); background: var(--surface-hover); }
.btn--light { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .24); color: #fff; }
.btn--light:hover { background: rgba(255, 255, 255, .14); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line); background: var(--bg-raised);
  border-radius: var(--r-sm); cursor: pointer; color: var(--text-muted);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-hover); }
.icon-btn svg { width: 17px; height: 17px; }

.chip-static {
  display: inline-flex; padding: 3px 10px; border: 1px solid var(--line); border-radius: var(--r-full);
  background: var(--bg-raised); font-size: 12.5px; font-weight: 500; color: var(--text-muted); white-space: nowrap;
}
a.chip-static:hover { color: var(--text); border-color: var(--text-faint); }

.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.quick__chip {
  padding: 4px 11px; border-radius: var(--r-full); border: 1px solid var(--line);
  font-size: 13px; font-weight: 500; color: var(--text-muted); background: var(--bg-raised);
  transition: color .15s ease, border-color .15s ease;
}
.quick__chip:hover { color: var(--accent); border-color: var(--accent); }

.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 14.5px; font-weight: 600; }
.text-link svg { width: 16px; height: 16px; transition: transform .2s ease; }
.text-link:hover svg { transform: translateX(3px); }
.text-link--back { margin-top: 30px; }
.text-link--back:hover svg { transform: translateX(-3px); }

.badge {
  display: inline-flex; align-items: center;
  padding: 2px 7px; border-radius: var(--r-sm);
  background: var(--accent-soft); color: var(--accent);
  font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Top bar + header
   -------------------------------------------------------------------------- */

/* The top bar (contact, language) and the header both stay on screen while scrolling. */
.topbar {
  position: sticky; top: 0; z-index: 61;
  background: var(--bg-ink); color: rgba(255, 255, 255, .66); font-size: 12.5px;
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--topbar-h); }
.topbar__co { font-weight: 600; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__links { display: flex; align-items: center; gap: 18px; }
.topbar__links a { display: inline-flex; align-items: center; gap: 6px; transition: color .15s ease; }
.topbar__links a:hover { color: #fff; }
.topbar__links svg { width: 13px; height: 13px; }
.topbar .lang-switch { border-color: rgba(255, 255, 255, .14); background: transparent; }
.topbar .lang-switch button { color: rgba(255, 255, 255, .5); }
.topbar .lang-switch button:hover { color: #fff; }
.topbar .lang-switch button[aria-pressed="true"] { background: var(--brand); color: #fff; }
/* Phones and tablets: a slimmer bar with the phone, Zalo and the language switch. */
@media (max-width: 960px) {
  .topbar__inner { gap: 14px; }
  .topbar__links { flex: 1; gap: 14px; }
  .topbar__links a[href^="mailto:"] { display: none; }
  .topbar .lang-switch { margin-inline-start: auto; }
}
@media (max-width: 640px) {
  .topbar__co, .topbar__links a[href*="zalo.me"] { display: none; }   /* Zalo stays in the bottom action bar */
  .topbar .lang-switch button { padding: 3px 8px; }
}

.site-header {
  position: sticky; top: var(--topbar-h); z-index: 60;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 18px; }

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand__mark { height: 26px; width: auto; }
.brand__mark--dark { display: none; }
:root[data-theme="dark"] .brand__mark--light { display: none; }
:root[data-theme="dark"] .brand__mark--dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand__mark--light { display: none; }
  :root:not([data-theme="light"]) .brand__mark--dark { display: block; }
}

.icon-sun { display: none; }
.icon-moon { display: contents; }
:root[data-theme="dark"] .icon-sun { display: contents; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: contents; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}

.site-nav { display: flex; align-items: center; gap: 2px; margin-inline-start: 10px; }
.site-nav a, .site-nav__mega {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 11px; border-radius: var(--r-sm); border: 0; background: transparent; cursor: pointer;
  font-size: 14.5px; font-weight: 500; color: var(--text-muted); white-space: nowrap;
  transition: color .15s ease, background .15s ease;
}
.site-nav a:hover, .site-nav__mega:hover, .site-nav__mega[aria-expanded="true"] { color: var(--text); background: var(--surface-hover); }
.site-nav__mega { font-weight: 600; color: var(--text); }
.site-nav__mega svg { width: 15px; height: 15px; transition: transform .2s ease; }
.site-nav__mega[aria-expanded="true"] svg { transform: rotate(180deg); }

.header-tools { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }

.lang-switch {
  display: flex; align-items: center; gap: 2px; padding: 2px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-raised);
}
.lang-switch button {
  border: 0; background: transparent; cursor: pointer;
  padding: 3px 7px; border-radius: 3px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--text-faint);
  transition: color .14s ease, background .14s ease;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] { background: var(--selected); color: #fff; }

/* Header search with instant results */
.hsearch { position: relative; flex: 1 1 320px; max-width: 440px; margin-inline-start: auto; }
.hsearch > svg {
  position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-faint); pointer-events: none;
}
.hsearch input {
  width: 100%; height: 40px; padding: 0 14px 0 38px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-sunken);
  font-size: 14px; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.hsearch input::placeholder { color: var(--text-faint); }
.hsearch input:focus { outline: none; background: var(--bg-raised); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hsearch + .header-tools { margin-inline-start: 0; }

.hsearch__panel {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 70;
  width: max(100%, 400px); max-height: min(70vh, 560px); overflow-y: auto;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); padding: 6px;
}
.hs-item {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center;
  padding: 8px; border-radius: var(--r-sm);
}
.hs-item:hover, .hs-item.is-active { background: var(--surface-hover); }
.hs-item img, .hs-item .ph { width: 48px; height: 48px; border-radius: var(--r-sm); object-fit: cover; background-color: var(--photo-bg); }
.hs-item__body { display: grid; min-width: 0; line-height: 1.35; }
.hs-item__code { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.hs-item strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-item small { font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-all {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 4px; padding: 10px 10px; border-top: 1px solid var(--line);
  font-size: 13.5px; font-weight: 600; color: var(--accent);
}
.hs-all svg { width: 15px; height: 15px; }
.hs-none { padding: 14px 10px; font-size: 14px; color: var(--text-muted); }

.search-btn, .menu-btn { display: none; }

@media (max-width: 1180px) { .header-cta { display: none; } }
@media (max-width: 960px) {
  .site-nav { display: none; }
  .search-btn, .menu-btn { display: inline-grid; }
  .hsearch {
    display: none; position: absolute; top: 100%; left: 0; right: 0; max-width: none; margin: 0;
    padding: 10px var(--gutter) 12px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  }
  .hsearch > svg { inset-inline-start: calc(var(--gutter) + 12px); top: 30px; }
  .site-header.search-open .hsearch { display: block; }
  .hsearch__panel { position: static; width: 100%; margin-top: 8px; box-shadow: none; max-height: 60vh; }
}
@media (max-width: 640px) { .brand__mark { height: 22px; } .header-inner { gap: 10px; } }

/* Products menu */
.mega {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.mega__inner { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; padding-block: 26px 30px; }
.mega__title {
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 12px;
}
.mega__lines { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; }
.mega__line {
  display: flex; align-items: center; gap: 14px; padding: 9px; border-radius: var(--r-md);
  transition: background .15s ease;
}
.mega__line:hover { background: var(--bg-sunken); }
.mega__line[aria-current="page"] { background: var(--accent-soft); }
.mega__img { width: 56px; height: 56px; flex-shrink: 0; border-radius: var(--r-sm); object-fit: cover; background-color: var(--photo-bg); }
.mega__text { display: grid; line-height: 1.35; min-width: 0; }
.mega__text strong { font-size: 14.5px; }
.mega__text small { font-size: 12.5px; color: var(--text-faint); }
.mega__side { border-inline-start: 1px solid var(--line); padding-inline-start: 30px; }
.mega__all {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; margin-bottom: 22px; border-radius: var(--r-md);
  background: var(--bg-ink); color: #fff; transition: background .15s ease;
}
.mega__all:hover { background: var(--brand); }
.mega__all span { display: grid; line-height: 1.35; }
.mega__all small { color: rgba(255, 255, 255, .62); font-size: 12.5px; }
.mega__all svg { width: 18px; height: 18px; }
@media (max-width: 960px) { .mega { display: none !important; } }

/* Mobile menu */
.mobile-menu {
  border-top: 1px solid var(--line); background: var(--bg); box-shadow: var(--shadow-md);
  max-height: calc(100vh - var(--sticky-h)); overflow-y: auto;
}
.mobile-menu nav { display: grid; padding-block: 8px 20px; }
.mobile-menu__title {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint);
  padding: 12px 2px 4px;
}
.mobile-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 2px; font-size: 15.5px; font-weight: 600; border-bottom: 1px solid var(--line);
}
.mobile-menu a small { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); font-weight: 500; }
.mobile-menu__all { color: var(--accent); }
.mobile-menu a:active { color: var(--accent); }
.mobile-menu .lang-switch { margin-top: 16px; justify-self: start; }
.mobile-menu .lang-switch button { padding: 8px 15px; font-size: 13px; }
@media (min-width: 961px) { .mobile-menu { display: none !important; } }

/* --------------------------------------------------------------------------
   Home hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative; background: var(--bg-ink); color: #f5f4f1;
  overflow: hidden; isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 25% 20%, #000 15%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 25% 20%, #000 15%, transparent 75%);
}
/* The red triangle of the K, oversized in the corner. */
.hero::after {
  content: ""; position: absolute; top: 0; right: 0; z-index: -1;
  width: min(44vw, 560px); aspect-ratio: 1;
  background: linear-gradient(135deg, var(--brand) 0%, #b80c07 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.hero__inner {
  display: grid; gap: 56px; align-items: center;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  padding-block: 72px 48px;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 5px 13px 5px 6px; border-radius: var(--r-full);
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05);
  font-size: 12.5px; font-weight: 500; color: rgba(255, 255, 255, .84);
}
.eyebrow b {
  background: var(--brand); color: var(--on-brand); border-radius: var(--r-full);
  padding: 2px 10px; font-size: 11px; font-weight: 800; letter-spacing: .1em;
}

.hero h1 {
  margin-block: 22px 18px;
  font-size: clamp(2.1rem, 4.8vw, 3.35rem); font-weight: 800; letter-spacing: -.034em; line-height: 1.06;
}
.hero h1 .accent { color: #ff4a3f; }
.hero__lead { font-size: clamp(1rem, 1.6vw, 1.1rem); color: rgba(255, 255, 255, .7); max-width: 58ch; }

.hero-search {
  position: relative; display: flex; gap: 6px; margin-top: 30px; max-width: 600px;
  padding: 6px; border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow-lg);
}
.hero-search > svg {
  position: absolute; inset-inline-start: 20px; top: 50%; transform: translateY(-50%);
  width: 19px; height: 19px; color: #8a8782; pointer-events: none;
}
.hero-search input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: #141414;
  padding: 12px 12px 12px 44px; font-size: 16.5px;
}
.hero-search input::placeholder { color: #8a8782; }
.hero-search input:focus { outline: none; }
.hero-search:focus-within { box-shadow: 0 0 0 3px rgba(255, 74, 63, .45), var(--shadow-lg); }
.hero-search .btn { padding-inline: 24px; }

.quick--hero { margin-top: 16px; font-size: 13px; color: rgba(255, 255, 255, .5); }
.quick--hero > span { margin-inline-end: 4px; }
.quick--hero .quick__chip { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .8); }
.quick--hero .quick__chip:hover { color: #fff; border-color: #ff4a3f; }

/* Board: one photo tile per product line */
.board { display: grid; gap: 12px; }
.board--1 { grid-template-columns: 1fr; }
.board--2 { grid-template-columns: 1fr 1fr; }
.board--2 .board__tile { aspect-ratio: 3 / 4; }
.board--3 { grid-template-columns: 1.2fr 1fr; grid-template-rows: 1fr 1fr; }
.board--3 .board__tile:first-child { grid-row: span 2; aspect-ratio: auto; }
.board--4 { grid-template-columns: 1fr 1fr; }
.board__tile {
  position: relative; display: block; overflow: hidden; aspect-ratio: 1;
  border-radius: var(--r-lg); background: #e9e8e4; border: 1px solid rgba(255, 255, 255, .14);
}
.board__tile img, .board__tile .ph { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.22, 1, .36, 1); }
.board__tile:hover img { transform: scale(1.05); }
.board__label {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: grid; gap: 0; padding: 40px 16px 14px;
  background: linear-gradient(transparent, rgba(8, 8, 9, .82));
  color: #fff; line-height: 1.3;
}
.board__idx { font-family: var(--font-mono); font-size: 11.5px; color: #ff6a61; margin-bottom: 2px; }
.board__label strong { font-size: 1.02rem; }
.board__label small { font-size: 12.5px; color: rgba(255, 255, 255, .7); }
.board__tile--more .board__more {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(8, 8, 9, .72); color: #fff; font-size: 1.15rem;
}

.hero__stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0; padding-block: 22px 30px; border-top: 1px solid rgba(255, 255, 255, .1);
}
.hero__stats div { padding-inline-end: 16px; }
.hero__stats div + div { padding-inline-start: 20px; border-inline-start: 1px solid rgba(255, 255, 255, .1); }
.hero__stats dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .48); font-weight: 600; }
.hero__stats dd { margin: 4px 0 0; font-size: clamp(1.3rem, 2.6vw, 1.75rem); font-weight: 700; letter-spacing: -.02em; }

@media (max-width: 1020px) {
  .hero__inner { grid-template-columns: 1fr; gap: 36px; padding-block: 52px 36px; }
  .board { max-width: 560px; }
  .hero::after { width: 58vw; }
}
@media (max-width: 560px) {
  .hero h1 { margin-top: 18px; }
  .hero-search { flex-wrap: wrap; }
  .hero-search > svg { top: 30px; }
  .hero-search .btn { flex: 1 1 100%; }
  .board--2 .board__tile { aspect-ratio: 4 / 5; }
  .board__label { padding: 30px 12px 11px; }
  .board__label strong { font-size: .94rem; }
  .hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .hero__stats div:nth-child(3) { padding-inline-start: 0; border-inline-start: 0; }
  .hero::after { width: 46vw; }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding-block: 80px; }
.section--sunken { background: var(--bg-sunken); }
.section--tight { padding-block: 24px 72px; }
.section--catalog { padding-block: 28px 64px; }
.section--ink { background: var(--bg-ink); color: #f5f4f1; }

.section__head { max-width: 66ch; margin-bottom: 36px; }
.section__kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-text); margin-bottom: 12px;
}
.section__kicker::before {
  content: ""; width: 10px; height: 10px;
  background: var(--brand); clip-path: polygon(0 0, 100% 0, 100% 100%);
}
:root[data-theme="dark"] .section__kicker { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .section__kicker { color: var(--accent); } }
.section--ink .section__kicker { color: #ff5c52; }
.section__head h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: -.028em; }
.section__head p { margin-top: 12px; color: var(--text-muted); font-size: 1.02rem; }
.section--ink .section__head p { color: rgba(255, 255, 255, .64); }
.section__head .text-link { margin-top: 16px; }

/* --------------------------------------------------------------------------
   Product line tiles (home)
   -------------------------------------------------------------------------- */

.tiles { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 18px; }
.tile {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .2s ease, border-color .2s ease;
}
.tile::after {
  content: ""; position: absolute; top: 0; right: 0; width: 0; height: 0;
  background: var(--brand); clip-path: polygon(0 0, 100% 0, 100% 100%);
  transition: width .25s ease, height .25s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.tile:hover::after { width: 34px; height: 34px; }
.tile__media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--photo-bg); overflow: hidden; }
.tile__media img, .tile__media .ph { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.22, 1, .36, 1); }
.tile:hover .tile__media img { transform: scale(1.04); }
.tile__idx {
  position: absolute; top: 12px; inset-inline-start: 12px;
  padding: 3px 8px; border-radius: var(--r-sm); background: var(--ink); color: #fff;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
}
.tile__body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 20px 22px 18px; }
.tile__body h3 { font-size: 1.18rem; }
.tile__body p {
  color: var(--text-muted); font-size: 14.5px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tile__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tile__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px;
}
.tile__go {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--text-muted);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.tile__go svg { width: 16px; height: 16px; }
.tile:hover .tile__go { background: var(--brand); border-color: var(--brand); color: #fff; }
.tile--custom { background: var(--bg-sunken); border-style: dashed; border-width: 1.5px; }
.tile--custom .tile__body { padding-top: 28px; }
.tile--custom .tile__body > svg {
  width: 44px; height: 44px; padding: 11px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 6px;
}

@media (max-width: 1020px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Phones: compact rows (photo left) so seven or more lines stay a short scroll */
@media (max-width: 560px) {
  .tiles { grid-template-columns: 1fr; gap: 10px; }
  .tile { flex-direction: row; }
  .tile:hover { transform: none; }
  .tile__media { aspect-ratio: auto; width: 112px; flex-shrink: 0; }
  .tile__idx { top: 8px; inset-inline-start: 8px; font-size: 11px; padding: 2px 6px; }
  .tile__body { gap: 5px; padding: 13px 14px 12px; }
  .tile__body h3 { font-size: 1rem; }
  .tile__body p { font-size: 13.5px; -webkit-line-clamp: 2; }
  .tile__chips { display: none; }
  .tile__foot { padding-top: 6px; border-top: 0; font-size: 13px; }
  .tile__go { width: 28px; height: 28px; }
  .tile--custom .tile__body { padding-top: 13px; }
  .tile--custom .tile__body > svg { display: none; }
}

/* --------------------------------------------------------------------------
   Tabs (featured products)
   -------------------------------------------------------------------------- */

.tabs {
  display: flex; gap: 6px; margin-bottom: 22px; overflow-x: auto; scrollbar-width: none;
  padding-bottom: 2px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding: 9px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-full);
  background: var(--bg-raised); font-size: 14px; font-weight: 600; color: var(--text-muted); cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.tab:hover { color: var(--text); border-color: var(--text-faint); }
.tab small { font-family: var(--font-mono); font-size: 11.5px; opacity: .6; }
.tab[aria-selected="true"] { background: var(--selected); border-color: var(--selected); color: #fff; }
.tabpanel__foot { display: flex; justify-content: center; margin-top: 26px; }

/* --------------------------------------------------------------------------
   Product cards
   -------------------------------------------------------------------------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 18px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1020px) { .grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-md);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.card::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card:hover::after { transform: scaleX(1); }
.card:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.card__media { position: relative; aspect-ratio: 1 / 1; background: var(--photo-bg); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s cubic-bezier(.22, 1, .36, 1); }
.card:hover .card__media img { transform: scale(1.04); }
.card__noimg {
  display: grid; place-items: center; width: 100%; height: 100%; padding: 16px; text-align: center;
  font-size: 12.5px; font-weight: 500; color: var(--text-faint);
}
.card__tag {
  position: absolute; top: 10px; inset-inline-start: 10px;
  padding: 3px 8px; border-radius: var(--r-sm);
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  background: rgba(11, 11, 12, .86); color: #fff;
}
.card__tag--brand { background: var(--brand); color: var(--on-brand); }
.card__pics {
  position: absolute; bottom: 10px; inset-inline-end: 10px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: var(--r-full); background: rgba(11, 11, 12, .7); color: #fff;
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.card__pics svg { width: 12px; height: 12px; }

.card__body { position: relative; display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 13px 14px 16px; }
.card__code {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .03em; color: var(--text-faint);
  padding-inline-end: 28px;
}
.card__title { font-size: 15px; font-weight: 700; line-height: 1.34; letter-spacing: -.01em; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__sub { font-size: 13px; color: var(--text-muted); }
.card__badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.card__go {
  position: absolute; top: 10px; inset-inline-end: 10px; display: inline-grid; place-items: center;
  width: 24px; height: 24px; color: var(--text-faint); transition: transform .2s ease, color .2s ease;
}
.card__go svg { width: 15px; height: 15px; }
.card:hover .card__go { transform: translateX(3px); color: var(--accent); }

@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card__body { padding: 10px 11px 13px; }
  .card__title { font-size: 13.8px; }
  .card__sub { font-size: 12px; }
  .card__go { display: none; }
  .card__code { padding-inline-end: 0; font-size: 10.5px; }
  .card__tag { font-size: 9.5px; padding: 2px 6px; top: 7px; inset-inline-start: 7px; }
}

/* --------------------------------------------------------------------------
   Line page hero
   -------------------------------------------------------------------------- */

.lhero { background: var(--bg-sunken); border-bottom: 1px solid var(--line); padding-block: 4px 48px; }
.lhero--all { padding-bottom: 36px; }
.lhero__inner {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 52px; align-items: center;
  margin-top: 18px;
}
.lhero__inner--solo { grid-template-columns: minmax(0, 1fr); }
.lhero__idx {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--accent);
}
.lhero__idx small { color: var(--text-faint); font-size: 12px; }
.lhero h1 { margin-top: 10px; font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 800; letter-spacing: -.032em; line-height: 1.08; }
.lhero--all h1 { margin-top: 18px; }
.lhero__lead { margin-top: 16px; color: var(--text-muted); font-size: 1.05rem; max-width: 62ch; }
.lhero__facts { display: flex; flex-wrap: wrap; list-style: none; margin: 26px 0 0; padding: 0; }
.lhero__facts li { display: grid; padding-inline: 20px; border-inline-start: 1px solid var(--line-strong); }
.lhero__facts li:first-child { padding-inline-start: 0; border: 0; }
.lhero__facts b { font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.lhero__facts span { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); }
.lhero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.lhero__media { display: grid; gap: 10px; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.lhero__media--1 { grid-template-columns: 1fr; grid-template-rows: none; max-width: 420px; }
.lhero__media--2 { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
.lhero__img { display: block; overflow: hidden; border-radius: var(--r-lg); background: var(--photo-bg); border: 1px solid var(--line); aspect-ratio: 1; }
.lhero__media--3 .lhero__img:first-child { grid-row: span 2; aspect-ratio: auto; }
.lhero__img img, .lhero__img .ph { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 900px) {
  .lhero__inner { grid-template-columns: 1fr; gap: 28px; }
  .lhero__media { max-width: 520px; }
}
@media (max-width: 480px) {
  .lhero__facts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .lhero__facts li { padding-inline: 10px; }
  .lhero__facts b { font-size: 1.25rem; }
  .lhero__facts span { font-size: 10.5px; }
}

.breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-block: 18px 0; font-size: 13.5px; color: var(--text-faint);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb svg { width: 13px; height: 13px; opacity: .6; }

/* --------------------------------------------------------------------------
   Catalog: filters sidebar + grid
   -------------------------------------------------------------------------- */

.catalog { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; align-items: start; }
.catalog--plain { grid-template-columns: minmax(0, 1fr); }

.filters {
  position: sticky; top: calc(var(--sticky-h) + 20px);
  max-height: calc(100vh - var(--sticky-h) - 40px); overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin;
}
.filters__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.filters__head h2 { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); }
.filters__close, .filters__foot { display: none; }

.fgroup { border: 0; margin: 0 0 18px; padding: 0 0 16px; border-bottom: 1px solid var(--line); min-width: 0; }
.fgroup:last-child { border-bottom: 0; }
.fgroup legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.fopt {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 8px; margin-inline: -8px; width: calc(100% + 16px);
  border: 0; border-radius: var(--r-sm); background: transparent; cursor: pointer; text-align: start;
  font-size: 14px; color: var(--text); transition: background .12s ease;
}
.fopt:hover:not(:disabled) { background: var(--surface-hover); }
.fopt__box {
  position: relative; flex-shrink: 0; width: 17px; height: 17px;
  border: 1.5px solid var(--line-strong); border-radius: 4px; background: var(--bg-raised);
  transition: background .12s ease, border-color .12s ease;
}
.fopt[aria-pressed="true"] .fopt__box { background: var(--brand); border-color: var(--brand); }
.fopt[aria-pressed="true"] .fopt__box::after {
  content: ""; position: absolute; left: 4.5px; top: 1px; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.fopt[aria-pressed="true"] { font-weight: 600; }
.fopt__label { flex: 1; min-width: 0; }
.fopt__n { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.fopt:disabled { opacity: .42; cursor: default; }

.catalog__bar { display: flex; align-items: center; gap: 10px; }
.search { position: relative; flex: 1 1 240px; min-width: 0; }
.search svg {
  position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--text-faint); pointer-events: none;
}
.search input {
  width: 100%; height: 44px; padding: 0 14px 0 40px;
  border: 1px solid var(--line-strong); background: var(--bg-raised); border-radius: var(--r-sm);
  font-size: 15px; transition: border-color .15s ease, box-shadow .15s ease;
}
.search input::placeholder { color: var(--text-faint); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.select { position: relative; flex: 0 0 auto; min-width: 0; }
.select select {
  appearance: none; -webkit-appearance: none;
  height: 44px; padding: 0 36px 0 14px; max-width: 100%;
  border: 1px solid var(--line-strong); background: var(--bg-raised); border-radius: var(--r-sm);
  font-size: 14px; cursor: pointer;
}
.select::after {
  content: ""; position: absolute; inset-inline-end: 14px; top: 50%;
  width: 7px; height: 7px;
  border-right: 1.6px solid var(--text-faint); border-bottom: 1.6px solid var(--text-faint);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.select select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.filters-open { display: none; height: 44px; }
.filters-open__n {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: var(--r-full); background: var(--brand); color: #fff; font-size: 11.5px;
}

.catalog__meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  min-height: 34px; margin: 14px 0 16px; font-size: 13.5px; color: var(--text-muted);
}
.catalog__count b { color: var(--text); font-variant-numeric: tabular-nums; }
.active { display: contents; }
.active__chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 11px;
  border: 1px solid transparent; border-radius: var(--r-full); background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.active__chip:hover { border-color: var(--accent); }
.active__chip svg { width: 13px; height: 13px; }
.link-reset {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--text-muted); font-size: 13.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
.link-reset:hover { color: var(--accent); }
.line-link { margin-inline-start: auto; font-size: 13.5px; }

.grid--catalog { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
@media (max-width: 480px) { .grid--catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.more { display: flex; justify-content: center; padding-top: 30px; }
.more .btn { min-width: 240px; }

.empty { padding: 72px 20px; text-align: center; color: var(--text-muted); }
.empty strong { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: 6px; }

.filters-backdrop { position: fixed; inset: 0; z-index: 85; background: var(--overlay); }

@media (max-width: 960px) {
  .catalog { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .filters-open { display: inline-flex; }
  .filters {
    position: fixed; z-index: 90; top: 0; bottom: 0; left: 0; width: min(88vw, 360px); max-height: none;
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--bg); box-shadow: var(--shadow-lg);
    transform: translateX(-104%); transition: transform .28s cubic-bezier(.22, 1, .36, 1); visibility: hidden;
  }
  .filters.is-open { transform: none; visibility: visible; }
  .filters__head { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .filters__head h2 { font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--text); }
  .filters__close { display: inline-grid; }
  .filters__groups { flex: 1; overflow-y: auto; padding: 18px 16px 8px; }
  .filters__foot { display: block; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
  .filters__foot .btn { width: 100%; }
}
@media (max-width: 640px) {
  .catalog__bar { flex-wrap: wrap; }
  .search { flex-basis: 100%; }
  .filters-open, .catalog__bar .select { flex: 1 1 0; }
  .catalog__bar .select select { width: 100%; }
}

/* --------------------------------------------------------------------------
   Hole-type guide (hang tabs)
   -------------------------------------------------------------------------- */

.holes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hole {
  --tile-bg: var(--bg-raised);
  display: flex; flex-direction: column; gap: 16px;
  padding: 22px 20px 20px; background: var(--tile-bg);
  border: 1px solid var(--line); border-radius: var(--r-md);
  transition: border-color .15s ease, box-shadow .15s ease, transform .2s ease;
}
.hole:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.hole-ico { width: 68px; height: 85px; flex-shrink: 0; }
.hz-tab { fill: color-mix(in srgb, #8fbbe3 24%, var(--tile-bg)); stroke: var(--text-faint); stroke-width: 1.3; }
.hz-glue { fill: color-mix(in srgb, var(--text) 10%, var(--tile-bg)); }
.hz-cut { fill: var(--tile-bg); stroke: var(--text-faint); stroke-width: 1.3; }
.hz-hole { fill: var(--tile-bg); }
.hz-edge { fill: none; stroke: var(--text-faint); stroke-width: 1.3; stroke-linejoin: round; }
.hole__body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.hole h3 { font-size: 1.05rem; }
.hole p { color: var(--text-muted); font-size: 14px; }
.hole__count {
  margin-top: auto; padding-top: 8px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--accent);
}
.hole__count svg { width: 14px; height: 14px; transition: transform .2s ease; }
.hole:hover .hole__count svg { transform: translateX(3px); }
@media (max-width: 960px) { .holes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .holes { grid-template-columns: 1fr; }
  .hole { flex-direction: row; align-items: flex-start; }
}

/* --------------------------------------------------------------------------
   Application guide
   -------------------------------------------------------------------------- */

.guide { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.guide--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.guide--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.guide--1 { grid-template-columns: 1fr; max-width: 640px; }
.guide--4 .gstep { flex-direction: column; gap: 12px; }
.gstep {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px;
}
.gstep__n {
  flex-shrink: 0; padding: 3px 8px; border-radius: var(--r-sm);
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 600;
}
.gstep h3 { font-size: 1rem; margin-bottom: 4px; }
.gstep p { color: var(--text-muted); font-size: 14px; }
@media (max-width: 1020px) { .guide--3, .guide--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .guide, .guide--3, .guide--4 { grid-template-columns: 1fr; }
  .guide--4 .gstep { flex-direction: row; gap: 14px; }
}

.tip {
  display: flex; gap: 14px; margin-top: 22px; padding: 18px 20px;
  border-radius: var(--r-md); background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
}
.tip > svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.tip strong { display: block; margin-bottom: 2px; }
.tip p { font-size: 14.5px; }

/* Other product lines */
.mini-lines { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.mini-line {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-md);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.mini-line:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.mini-line img, .mini-line .ph { width: 64px; height: 64px; flex-shrink: 0; border-radius: var(--r-sm); object-fit: cover; background-color: var(--photo-bg); }
.mini-line__text { display: grid; flex: 1; min-width: 0; line-height: 1.35; }
.mini-line strong { font-size: 15px; }
.mini-line small { font-size: 12.5px; color: var(--text-faint); }
.mini-line > svg { width: 18px; height: 18px; color: var(--text-faint); transition: transform .2s ease, color .2s ease; }
.mini-line:hover > svg { color: var(--accent); transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Why KERAF, process
   -------------------------------------------------------------------------- */

.why { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.why .section__head { margin-bottom: 0; position: sticky; top: calc(var(--sticky-h) + 32px); }
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.feature { padding: 26px 24px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-md); }
.feature__icon {
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent); margin-bottom: 18px;
}
.feature__icon svg { width: 21px; height: 21px; }
.feature h3 { font-size: 1.06rem; margin-bottom: 8px; }
.feature p { color: var(--text-muted); font-size: 14.5px; }
@media (max-width: 960px) {
  .why { grid-template-columns: 1fr; gap: 32px; }
  .why .section__head { position: static; }
}
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.step { padding-top: 20px; border-top: 2px solid rgba(255, 255, 255, .16); }
.step__n { display: block; font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: #ff5c52; margin-bottom: 14px; }
.step h3 { font-size: 1.05rem; margin-bottom: 8px; color: #fff; }
.step p { font-size: 14.5px; color: rgba(255, 255, 255, .62); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.faq .section__head { margin-bottom: 0; }
.faq__lines-title {
  margin-top: 28px; padding-block: 14px 6px; border-top: 1px solid var(--line);
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint);
}
/* Home page: topics (general + one per line) on the left, their questions on the right. */
.faq__side { position: sticky; top: calc(var(--sticky-h) + 32px); }
.faq__tabs { display: grid; }
.faq__tab {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 12px 11px 14px; border: 0; border-bottom: 1px solid var(--line); border-inline-start: 3px solid transparent;
  background: transparent; cursor: pointer; text-align: start;
  font-size: 15px; font-weight: 600; color: var(--text-muted); transition: color .15s ease, background .15s ease;
}
.faq__tab:hover { color: var(--text); background: var(--surface-hover); }
.faq__tab[aria-selected="true"] { color: var(--text); background: var(--accent-soft); border-inline-start-color: var(--brand); }
.faq__tab small { font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--text-faint); }
.faq__more { margin-top: 18px; }
.faq__list { display: grid; gap: 10px; }
.faq__item { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-md); transition: border-color .15s ease; }
.faq__item[open] { border-color: var(--line-strong); }
.faq__item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 14px; padding: 17px 20px;
  font-weight: 600; font-size: 15.5px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__icon {
  position: relative; margin-left: auto; width: 24px; height: 24px; flex-shrink: 0;
  border-radius: 50%; background: var(--surface-hover);
}
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; left: 7px; right: 7px; top: 11px; height: 2px;
  border-radius: 1px; background: var(--text-muted); transition: transform .2s ease;
}
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon::after { transform: rotate(0deg); }
.faq__item p { padding: 0 20px 18px; color: var(--text-muted); line-height: 1.7; }
@media (max-width: 960px) {
  .faq { grid-template-columns: minmax(0, 1fr); gap: 28px; }   /* minmax: the chip row scrolls instead of widening the page */
  .faq__side { position: static; }
  /* Topics become a row of chips that scrolls sideways. */
  .faq__lines-title { display: none; }
  .faq__tabs {
    display: flex; gap: 8px; margin-top: 22px; padding-bottom: 4px;
    overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  }
  .faq__tabs::-webkit-scrollbar { display: none; }
  .faq__tab {
    flex: 0 0 auto; gap: 8px; padding: 8px 14px; white-space: nowrap;
    border: 1px solid var(--line-strong); border-radius: var(--r-full); font-size: 14px;
  }
  .faq__tab[aria-selected="true"] { background: var(--selected); border-color: var(--selected); color: #fff; }
  .faq__tab[aria-selected="true"] small { color: rgba(255, 255, 255, .7); }
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.contact .section__head { margin-bottom: 0; }
.contact__list {
  display: grid; gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
}
.contact__row { background: var(--bg-raised); padding: 16px 20px; display: flex; gap: 14px; align-items: flex-start; }
.contact__row svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; margin-top: 3px; }
.contact__row dl { margin: 0; min-width: 0; }
.contact__row dt { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-faint); }
.contact__row dd { margin: 3px 0 0; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.contact__row a:hover { color: var(--accent); }
/* With the map: details on the left, the map filling the right column to the same height. */
.contact--map { align-items: stretch; }
.contact__info { display: grid; gap: 28px; align-content: start; }
.map { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.map__frame {
  flex: 1; width: 100%; min-height: 340px; display: block;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--photo-bg);
}
.map__links { display: flex; flex-wrap: wrap; gap: 10px; }
.map__links .btn svg { width: 16px; height: 16px; }
@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; gap: 28px; }
  .map__frame { flex: none; height: 320px; min-height: 0; }
}

.cta-band {
  margin-top: 52px; position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  padding: 40px 44px; border-radius: var(--r-lg); background: var(--bg-ink); color: #f5f4f1;
}
.section--tight .cta-band { margin-top: 0; }
.cta-band::after {
  content: ""; position: absolute; top: 0; left: 0; width: 64px; height: 64px; z-index: -1;
  background: var(--brand); clip-path: polygon(0 0, 100% 0, 0 100%);
}
.cta-band h2 { font-size: clamp(1.35rem, 2.8vw, 1.9rem); letter-spacing: -.024em; }
.cta-band p { color: rgba(255, 255, 255, .64); margin-top: 8px; max-width: 52ch; }
.cta-band__actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
@media (max-width: 560px) {
  .cta-band { padding: 28px 20px; }
  .cta-band::after { width: 40px; height: 40px; }
  .cta-band__actions .btn { flex: 1 1 auto; }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--line); background: var(--bg-sunken); padding-block: 48px 28px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 36px; }
.footer-grid h4 {
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a, .footer-grid li { font-size: 14px; color: var(--text-muted); overflow-wrap: anywhere; }
.footer-grid a:hover { color: var(--text); }
.footer__about .brand__mark { height: 24px; }
.footer__company { margin-top: 16px; font-size: 13.5px; font-weight: 700; color: var(--text); }
.footer__about p:not(.footer__company) { font-size: 14px; color: var(--text-muted); margin-top: 6px; max-width: 42ch; }
.footer__bottom {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-faint);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer__about { grid-column: 1 / -1; }
}
@media (max-width: 420px) { .footer-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Product detail page
   -------------------------------------------------------------------------- */

.detail {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px; padding-block: 24px 64px; align-items: start;
}

.gallery { position: sticky; top: calc(var(--sticky-h) + 24px); }
.gallery__main {
  position: relative; aspect-ratio: 1 / 1; background: var(--photo-bg);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
}
.gallery__main img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.gallery__empty { display: grid; place-items: center; width: 100%; height: 100%; color: var(--text-faint); font-weight: 500; }
.gallery__hint {
  position: absolute; top: 12px; inset-inline-end: 12px;
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  border-radius: var(--r-full); background: rgba(11, 11, 12, .72); color: #fff;
  font-size: 11.5px; font-weight: 500; pointer-events: none;
}
.gallery__hint svg { width: 13px; height: 13px; }
.gallery__nav, .lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(11, 11, 12, .55); color: #fff; cursor: pointer; transition: background .15s ease;
}
.gallery__nav:hover, .lightbox__nav:hover { background: rgba(11, 11, 12, .82); }
.gallery__nav svg, .lightbox__nav svg { width: 18px; height: 18px; }
.gallery__nav--prev, .lightbox__nav--prev { inset-inline-start: 12px; }
.gallery__nav--next, .lightbox__nav--next { inset-inline-end: 12px; }

.gallery__thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.gallery__thumb {
  padding: 0; border: 2px solid transparent; border-radius: var(--r-sm); overflow: hidden;
  background: var(--photo-bg); cursor: pointer; aspect-ratio: 1; transition: border-color .15s ease;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .72; transition: opacity .15s ease; }
.gallery__thumb:hover img, .gallery__thumb[aria-pressed="true"] img { opacity: 1; }
.gallery__thumb[aria-pressed="true"] { border-color: var(--brand); }

.detail__head h1 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); letter-spacing: -.028em; margin-top: 12px; }
.detail__eyebrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px;
  border-radius: var(--r-full); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.pill:empty { display: none; }   /* lines without a tag (no filter) */
.pill--dark { background: var(--ink); color: #fff; }
:root[data-theme="dark"] .pill--dark { background: #2a2a2b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill--dark { background: #2a2a2b; } }
.pill--brand { background: var(--brand); color: var(--on-brand); }
.pill--code {
  font-family: var(--font-mono); background: var(--bg-sunken); border: 1px solid var(--line);
  color: var(--text-muted); letter-spacing: .05em;
}

.detail__lead { margin-top: 18px; font-size: 1.02rem; color: var(--text-muted); line-height: 1.7; }
.detail__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }

.spec { margin: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.spec__row { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.spec__row:last-child { border-bottom: 0; }
.spec__row dt { padding: 12px 16px; background: var(--bg-sunken); font-size: 13px; font-weight: 600; color: var(--text-muted); }
.spec__row dd { margin: 0; padding: 12px 16px; font-size: 14.5px; background: var(--bg-raised); overflow-wrap: anywhere; }

.block { margin-top: 30px; }
.block h2 { font-size: 1.02rem; letter-spacing: -.012em; margin-bottom: 10px; display: flex; align-items: center; gap: 9px; }
.block h2::before { content: ""; width: 3px; height: 15px; border-radius: 2px; background: var(--brand); }
.block p { color: var(--text-muted); line-height: 1.7; font-size: 15px; }

.size-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.size-chip {
  padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg-raised); font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  color: var(--text-muted); transition: border-color .15s ease, color .15s ease;
}
.size-chip small { margin-inline-start: 6px; font-size: 11px; opacity: .65; }
a.size-chip:hover { border-color: var(--accent); color: var(--accent); }
.size-chip.is-current { background: var(--selected); border-color: var(--selected); color: #fff; }

.pair {
  display: flex; align-items: center; gap: 14px; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-raised);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pair:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.pair img, .pair .ph { width: 72px; height: 72px; border-radius: var(--r-sm); object-fit: cover; background-color: var(--photo-bg); flex-shrink: 0; }
.pair__body { display: grid; gap: 2px; min-width: 0; }
.pair__type { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.pair__body strong { font-size: 15px; }
.pair__code { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.pair__arrow { margin-left: auto; color: var(--text-faint); display: inline-grid; }
.pair__arrow svg { width: 18px; height: 18px; }
.pair:hover .pair__arrow { color: var(--accent); }

.mini-guide { margin: 0; padding-left: 22px; display: grid; gap: 4px; color: var(--text-muted); font-size: 14.5px; }
.mini-guide li::marker { color: var(--accent); font-weight: 700; }
.block .text-link { margin-top: 12px; }

@media (max-width: 920px) {
  .detail { grid-template-columns: 1fr; gap: 28px; padding-block: 18px 48px; }
  .gallery { position: static; max-width: 540px; width: 100%; margin-inline: auto; }
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 24px;
  background: var(--overlay); backdrop-filter: blur(6px);
}
.lightbox.is-open { display: grid; }
.lightbox img {
  max-width: min(94vw, 960px); max-height: 86vh; width: auto;
  border-radius: var(--r-md); background: #eceef0; box-shadow: var(--shadow-lg);
}
.lightbox__close {
  position: absolute; top: 18px; inset-inline-end: 18px; z-index: 2;
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .24); background: rgba(255, 255, 255, .1); color: #fff;
  border-radius: 50%; cursor: pointer;
}
.lightbox__close svg { width: 18px; height: 18px; }
.lightbox__nav { z-index: 2; width: 46px; height: 46px; }
.lightbox__count {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  padding: 4px 12px; border-radius: var(--r-full); background: rgba(11, 11, 12, .7); color: #fff;
  font-family: var(--font-mono); font-size: 12.5px;
}

/* Related */
.related { border-top: 1px solid var(--line); background: var(--bg-sunken); padding-block: 52px 72px; }
.related h2 { font-size: 1.3rem; letter-spacing: -.02em; margin-bottom: 22px; }

/* --------------------------------------------------------------------------
   Phone action bar, back-to-top, 404
   -------------------------------------------------------------------------- */

.action-bar { display: none; }
@media (max-width: 640px) {
  .action-bar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .action-bar .btn { padding: 10px 8px; font-size: 13.5px; }
  body { padding-bottom: 72px; }
}

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 65;
  width: 44px; height: 44px; border-radius: 50%; box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
@media (max-width: 640px) { .to-top { display: none; } }

.notfound { padding-block: 96px 120px; text-align: center; }
.notfound .notfound__code {
  font-size: clamp(5rem, 16vw, 9rem); font-weight: 800; letter-spacing: -.05em; line-height: 1;
  color: var(--accent); margin-bottom: 8px;
}
.notfound h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 10px; }
.notfound p { color: var(--text-muted); margin: 0 auto 28px; max-width: 46ch; }
.notfound__lines { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 28px; }

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s cubic-bezier(.22, 1, .36, 1); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  .topbar, .site-header, .filters, .catalog__bar, .hero-search, .site-footer, .cta-band, .action-bar, .to-top,
  .mobile-menu, .mega, .lightbox, .icon-btn, .lang-switch, .detail__actions, .gallery__nav { display: none !important; }
  body { background: #fff; color: #000; }
  .catalog { grid-template-columns: 1fr; }
  .card, .spec, .feature { break-inside: avoid; border-color: #ccc; }
  .grid { grid-template-columns: repeat(3, 1fr); }
}
