/* TENGTA public site + customer chat widget */
/*
 * The one stylesheet of every public page (pages rendered by lib/render.js and lib/render-catalog.js),
 * including the catalog, the quote list and the chat widget injected by public/js/chat-widget.js.
 * Order: tokens and base, shared components, home page, product pages, catalog, chat widget, quote list.
 * The console has its own stylesheet (admin.css).
 */

/* ---------- design tokens: colours, radii, shadows, font stack, layout sizes ---------- */
:root {
  --brand: #1d5bd6;
  --brand-600: #1649b0;
  --brand-50: #eef3fd;
  --brand-100: #dce6fb;
  --navy: #0b1d40;
  --navy-2: #12295a;
  --ink: #0f182a;
  --text: #2b3446;
  --muted: #5c6678;
  --line: #e1e6ee;
  --soft: #f4f7fb;
  --white: #ffffff;
  --accent: #16a3c9;
  --danger: #c62f3b;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-md: 0 18px 40px -18px rgba(13, 35, 82, .35);
  --shadow-lg: 0 28px 60px -20px rgba(9, 25, 60, .45);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --container: 1180px;
  --header-h: 72px;
  /* sticky offsets: full header height (inner height + 1px bottom border) and the product sub-nav height */
  --nav-h: calc(var(--header-h) + 1px);
  --subnav-h: 53px;
  /* where sticky table headers stop: below the header, and below the sub-nav on pages that have one */
  --sticky-top: var(--nav-h);
  color-scheme: light;
}

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

/*
 * Elements toggled with the HTML hidden attribute must always be hidden. The UA [hidden] rule
 * loses to any author display rule (e.g. .quote-empty and .quote-grid on /quote set display:grid
 * and stayed visible while hidden), so force it here. Mirrors the same rule in admin.css.
 */
[hidden] { display: none !important; }

/* in-page anchors stop below the sticky header (and the product sub-nav when there is one) */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
html:has(.subnav) { scroll-padding-top: calc(var(--header-h) + 56px); --sticky-top: calc(var(--nav-h) + var(--subnav-h)); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
button { font: inherit; }
:focus-visible { outline: 3px solid rgba(29, 91, 214, .45); outline-offset: 2px; }

/* centred page width, screen-reader-only text, and the "skip to content" link (visible on focus) */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

.visually-hidden {
  position: absolute !important; 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: 16px; top: -48px; z-index: 200; background: var(--white); padding: 8px 14px; border-radius: 8px; box-shadow: var(--shadow-md); }
.skip-link:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--brand); color: var(--white); box-shadow: 0 8px 20px -10px rgba(29, 91, 214, .8); }
.btn-primary:hover { background: var(--brand-600); color: var(--white); transform: translateY(-1px); }
.btn-outline { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--brand-50); color: var(--navy); }
.btn-ghost-light { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .35); }
.btn-ghost-light:hover { border-color: var(--white); color: var(--white); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }

/* ---------- header ---------- */
/* thin contact bar above the header (hidden on phones), then the sticky translucent header */
.topbar { background: var(--navy); color: rgba(255, 255, 255, .78); font-size: 13px; }
.topbar .container { display: flex; justify-content: flex-end; gap: 22px; min-height: 36px; align-items: center; }
.topbar a { color: rgba(255, 255, 255, .85); display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: var(--white); }
.topbar svg { width: 14px; height: 14px; }
@media (max-width: 640px) { .topbar { display: none; } }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; flex-direction: column; gap: 4px; }
.brand img { height: 20px; width: auto; }
.brand-sub { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a { color: var(--text); font-weight: 600; font-size: 15px; padding: 8px 14px; border-radius: 999px; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-50); }
.main-nav .btn { margin-left: 10px; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; }

/* below 860px the menu becomes a drop-down panel, opened by the toggle button (site.js adds .is-open) */
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 16px 18px; background: var(--white);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px 14px; }
  .main-nav .btn { margin: 8px 0 0; }
}

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.section-soft { background: var(--soft); }
@media (max-width: 640px) { .section { padding: 64px 0; } }

.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 12px;
}
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- hero (home) ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 480px at 85% 30%, rgba(29, 91, 214, .12), transparent 70%),
    linear-gradient(180deg, #f6f9fe 0%, #eef3fb 100%);
}
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding: 72px 24px 56px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 56px); font-weight: 800; letter-spacing: -.02em; margin-bottom: 18px; }
.hero h1 span { color: var(--brand); }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 520px; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-visual { position: relative; }
.hero-visual::before {
  content: ""; position: absolute; inset: 8% 4% 4% 8%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, 0) 70%);
}
.hero-visual img { position: relative; width: 100%; max-width: 560px; margin-left: auto; mix-blend-mode: multiply; }

/* key-figures strip under the hero: 4 columns, 2 x 2 below 960px */
.hero-facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); margin-bottom: 64px; padding: 0;
}
.hero-facts > div { padding: 22px 26px; border-left: 1px solid var(--line); }
.hero-facts > div:first-child { border-left: 0; }
.hero-facts strong { display: block; font-size: 26px; color: var(--ink); font-weight: 800; letter-spacing: -.01em; }
.hero-facts span { color: var(--muted); font-size: 14px; }

/* 3 facts: the hose fact is left out while every hose category is hidden (lib/render.js homePage) */
.hero-facts-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 48px; gap: 24px; }
  .hero-visual img { margin: 0 auto; max-width: 440px; }
  .hero-facts { grid-template-columns: repeat(2, 1fr); }
  .hero-facts > div:nth-child(3) { border-left: 0; }
  .hero-facts > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  /* with 3 facts the last one takes the whole second row */
  .hero-facts-3 > div:nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .hero-inner { padding: 40px 16px 24px; }
  .hero-facts { margin: 0 16px 48px; width: auto; }
  .hero-facts > div { padding: 16px; }
  .hero-facts strong { font-size: 21px; }
}

/* ---------- product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-card {
  display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden; color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-100); color: inherit; }
.product-media {
  aspect-ratio: 4 / 3.4; background: linear-gradient(180deg, #f7f9fd, #edf2f9);
  display: flex; align-items: center; justify-content: center; padding: 28px;
}
.product-media img { max-height: 100%; width: auto; object-fit: contain; mix-blend-mode: multiply; transition: transform .35s; }
.product-card:hover .product-media img { transform: scale(1.04); }
.product-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-tag { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.product-body h3 { font-size: 21px; margin: 0; }
.product-models { color: var(--muted); font-size: 14px; }
.product-link { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand); }
.product-link svg { width: 18px; height: 18px; transition: transform .2s; }
.product-card:hover .product-link svg { transform: translateX(4px); }

@media (max-width: 960px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .product-grid { grid-template-columns: 1fr; } }

/* ---------- product categories (home) ---------- */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 36px; }
.cat-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white); color: var(--text); font-weight: 600; font-size: 15px;
  transition: border-color .15s, color .15s, background-color .15s;
}
.cat-tab span { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 1px 8px; }
.cat-tab:hover { border-color: var(--brand); color: var(--brand); }
.cat-tab[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: var(--white); }
.cat-tab[aria-current="true"] span { background: rgba(255, 255, 255, .2); color: var(--white); }
/* category groups; site.js hides all but the selected one with the hidden attribute */
.cat-group { scroll-margin-top: calc(var(--header-h) + 24px); }
.cat-group + .cat-group { margin-top: 56px; }
.cat-group[hidden] + .cat-group, .cat-group[hidden] { margin-top: 0; }
.cat-group[hidden] { display: none; }
.cat-group-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cat-group-head h3 { margin: 0; font-size: 22px; }
.cat-group-head span { color: var(--muted); font-size: 14px; }
@media (max-width: 640px) {
  /* one swipeable row of tabs instead of several wrapped lines */
  .cat-tabs { flex-wrap: nowrap; overflow-x: auto; margin: -8px -16px 28px; padding: 0 16px 4px; scrollbar-width: none; }
  .cat-tabs::-webkit-scrollbar { display: none; }
  .cat-tab { flex: none; }
}

/* ---------- applications ---------- */
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.app-card { margin: 0; background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.app-card .app-img { aspect-ratio: 16 / 10; background: var(--white); display: flex; align-items: center; justify-content: center; padding: 16px; }
.app-card img { max-height: 100%; width: auto; object-fit: contain; }
.app-card figcaption { padding: 14px 18px; font-weight: 600; color: var(--ink); border-top: 1px solid var(--line); }
@media (max-width: 860px) { .app-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .app-grid { grid-template-columns: 1fr; } }

/* ---------- about ---------- */
/* Tracks are minmax(0, 1fr), not plain 1fr (= minmax(auto, 1fr)): a plain 1fr track
   can never shrink below its content's min-content width, so the value cards below
   used to stretch the whole About grid to ~321px inside a 288px container at 320px
   and scroll the page sideways. */
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: start; }
.about-grid h2 { font-size: clamp(28px, 3.4vw, 40px); }
.about-copy p { font-size: 17px; }
.about-points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.about-points li { display: flex; gap: 12px; align-items: flex-start; }
.about-points svg { width: 22px; height: 22px; color: var(--brand); flex: none; margin-top: 2px; }
/* Same min-content issue: with 1fr 1fr the longest word ("Inclusiveness", ~119px at
   18px bold) plus 2x24px padding and borders forced a 169px minimum column. minmax(0, 1fr)
   keeps the two columns equal and inside the container; on phones too narrow for that
   word in a half-width card the cards stack instead (see the 384px query below). */
.values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.value { background: var(--soft); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); }
.value-num { font-size: 13px; font-weight: 800; color: var(--brand); letter-spacing: .1em; }
/* Safety net for wider fallback fonts or longer translations: break an over-long word
   inside the card instead of letting it spill past the card edge. */
.value h3 { font-size: 18px; margin: 10px 0 0; overflow-wrap: break-word; }
.values-title { grid-column: 1 / -1; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0; }
@media (max-width: 860px) { .about-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
/* Two cards need about 2 x 169px + 16px gap = 354px of content width (viewport >= ~386px with
   the 16px container padding); below that, use one column so no word has to be split. */
@media (max-width: 384px) { .values { grid-template-columns: minmax(0, 1fr); } }

/* ---------- contact band ---------- */
.contact-band { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #1a3b80 100%); color: rgba(255, 255, 255, .82); }
.contact-band h2 { color: var(--white); font-size: clamp(28px, 3.4vw, 40px); }
.contact-band .eyebrow { color: #8fb4ff; }
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.contact-grid p { font-size: 17px; max-width: 520px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.contact-list { list-style: none; padding: 28px; margin: 0; display: grid; gap: 18px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; }
.contact-list li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.contact-list .ic { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .1); display: flex; align-items: center; justify-content: center; color: #9ec0ff; }
.contact-list .ic svg { width: 20px; height: 20px; }
.contact-list small { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .55); font-weight: 700; }
.contact-list a, .contact-list span { color: var(--white); font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- footer ---------- */
.site-footer { background: #081633; color: rgba(255, 255, 255, .62); font-size: 14px; padding: 48px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-brand img { height: 18px; width: auto; filter: brightness(0) invert(1); opacity: .92; margin-bottom: 14px; }
.site-footer h4 { color: var(--white); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: rgba(255, 255, 255, .78); }
.site-footer a:hover { color: var(--white); }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- product detail pages ---------- */
/* breadcrumb trail with "/" separators */
.breadcrumb { font-size: 14px; color: var(--muted); padding: 18px 0 0; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
/* a long part number (no spaces) as the last item wraps inside the row instead of widening the page */
.breadcrumb li { min-width: 0; overflow-wrap: anywhere; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 6px; color: #a4adbd; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }

/* product hero: square image box beside name, models, highlights and call-to-action buttons */
.p-hero { background: linear-gradient(180deg, #f6f9fe 0%, #eef3fb 100%); padding-bottom: 64px; }
.p-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding-top: 32px; }
.p-hero-media { background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: 32px; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); }
.p-hero-media img { max-height: 100%; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.p-hero h1 { font-size: clamp(32px, 4vw, 48px); font-weight: 800; letter-spacing: -.02em; }
.p-hero .lead { font-size: 18px; color: var(--muted); }
.p-models { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.p-models li { font-size: 13px; font-weight: 700; color: var(--navy); background: var(--white); border: 1px solid var(--brand-100); border-radius: 999px; padding: 5px 12px; }
.p-highlights { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.p-highlights li { display: flex; gap: 10px; align-items: flex-start; }
.p-highlights svg { width: 20px; height: 20px; color: var(--brand); flex: none; margin-top: 3px; }
.p-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.p-note { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
@media (max-width: 900px) {
  .p-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .p-hero-media { max-width: 520px; width: 100%; margin: 0 auto; }
}

/* sticky in-page section menu under the header; scrolls sideways on small screens; .is-active set by site.js.
   Fixed line-height keeps its height at exactly --subnav-h (14 + 22 + 14 + 2px link border + 1px border). */
.subnav { position: sticky; top: var(--nav-h); z-index: 40; background: var(--white); border-bottom: 1px solid var(--line); }
.subnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a { display: block; padding: 14px 14px; font-size: 14px; line-height: 22px; font-weight: 600; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.subnav a:hover { color: var(--ink); }
.subnav a.is-active { color: var(--brand); border-bottom-color: var(--brand); }

/* product page sections, two-column text + image layout, and framed images (buttons open the lightbox) */
.p-section { padding: 80px 0; border-bottom: 1px solid var(--line); }
.p-section:last-of-type { border-bottom: 0; }
.p-section h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 12px; }
.p-section .section-intro { color: var(--muted); font-size: 17px; max-width: 720px; margin-bottom: 36px; }
@media (max-width: 640px) { .p-section { padding: 56px 0; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.top { align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }

.media-frame { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; justify-content: center; }
.media-frame img { max-height: 440px; width: auto; }
.media-frame.flush img { max-height: none; width: 100%; }
.media-frame.soft { background: var(--soft); }
.media-frame.soft img { mix-blend-mode: multiply; }
.media-frame.flush { padding: 0; overflow: hidden; }

button.media-frame { width: 100%; font: inherit; cursor: zoom-in; transition: border-color .15s, box-shadow .15s; }
button.media-frame:hover, .gallery .g-img:hover { box-shadow: var(--shadow-sm); border-color: var(--brand-100); }
.p-section.section-soft .media-frame:not(.soft) { background: var(--white); }

/* spec tables: the wrap scrolls sideways when the table is wider than the page */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); -webkit-overflow-scrolling: touch; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.spec-table th, .spec-table td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table thead th { background: var(--navy); color: var(--white); font-size: 14px; letter-spacing: .02em; position: sticky; top: 0; }
.spec-table tbody th { width: 240px; color: var(--ink); font-weight: 600; background: var(--soft); }
.spec-table tbody tr:hover td { background: #fafcff; }
.spec-table td.span { text-align: center; color: var(--text); }
.spec-table.models td, .spec-table.models thead th:not(:first-child) { text-align: center; }
.spec-table.simple { min-width: 0; }
.spec-table.models td:not(.span) { white-space: nowrap; }
@media (max-width: 760px) {
  .spec-table { font-size: 14px; }
  .spec-table th, .spec-table td { padding: 11px 12px; }
  .spec-table tbody th { width: auto; min-width: 140px; }
  /* keep the parameter names visible while the model columns scroll sideways */
  .spec-table.models tbody th, .spec-table.models thead th:first-child { position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 0 var(--line); }
  .spec-table.models thead th:first-child { z-index: 2; }
  .spec-table.models td.span { text-align: left; }
}
.table-note { font-size: 13px; color: var(--muted); margin-top: 12px; }
/*
 * Sticky spec-table header on desktop. A scrolling wrap (overflow-x: auto) is the sticky element's
 * scroll container, so thead would stick inside the wrap (i.e. never). site.js marks wraps whose
 * table fits with .is-fit; those clip instead of scroll (clip is not a scroll container, and still
 * rounds the corners), so thead sticks to the page just below the header / sub-nav. Wide tables,
 * phones and no-JS keep the sideways scroll (thead then stays at top: 0, its normal place).
 */
@media (min-width: 761px) {
  .table-wrap.is-fit { overflow-x: clip; }
  .table-wrap.is-fit .spec-table thead th { top: var(--sticky-top); z-index: 3; }
}

/* galleries */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery.cols-2 { grid-template-columns: repeat(2, 1fr); }
.gallery figure { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.gallery .g-img { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; background: var(--soft); padding: 12px; cursor: zoom-in; border: 0; width: 100%; }
.gallery .g-img img { max-height: 100%; width: auto; object-fit: contain; border-radius: 6px; }
.gallery figcaption { padding: 12px 16px; font-size: 14px; font-weight: 600; color: var(--ink); border-top: 1px solid var(--line); }
.gallery figcaption small { display: block; color: var(--muted); font-weight: 400; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery, .gallery.cols-2 { grid-template-columns: 1fr; } }

/* options */
.option-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.option { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.option .o-img { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; padding: 18px; background: var(--white); border-bottom: 1px solid var(--line); }
.option .o-img img { max-height: 100%; width: auto; object-fit: contain; }
.option .o-body { padding: 18px 20px 22px; }
.option h3 { font-size: 17px; margin-bottom: 6px; }
.option p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .option-grid { grid-template-columns: 1fr; max-width: 520px; } }

/* application rows on product pages */
.app-list { display: grid; gap: 18px; }
.app-row { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.app-row .a-img { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; background: var(--white); }
.app-row .a-img img { max-height: 100%; width: auto; object-fit: contain; }
.app-row h3 { font-size: 18px; margin-bottom: 6px; }
.app-row p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 640px) { .app-row { grid-template-columns: 1fr; } .app-row .a-img { max-width: 260px; } }

/* bottom CTA + related */
.p-cta-band { background: var(--soft); padding: 72px 0; }
.p-cta-box { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; background: linear-gradient(135deg, var(--navy), #1a3b80); color: rgba(255, 255, 255, .82); border-radius: 22px; padding: 44px; }
.p-cta-box h2 { color: var(--white); font-size: clamp(24px, 2.8vw, 32px); }
.p-cta-box p { margin: 0; }
.p-cta-box .p-cta { justify-content: flex-end; }
@media (max-width: 860px) { .p-cta-box { grid-template-columns: 1fr; padding: 32px 24px; } .p-cta-box .p-cta { justify-content: flex-start; } }

/* "related products" cards: thumbnail | name | arrow */
.related { margin-top: 48px; }
.related h3 { font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.related-card { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; color: var(--ink); font-weight: 700; transition: border-color .15s, box-shadow .15s; }
.related-card:hover { border-color: var(--brand-100); box-shadow: var(--shadow-sm); color: var(--brand); }
.related-card .r-img { width: 96px; height: 80px; display: flex; align-items: center; justify-content: center; background: var(--soft); border-radius: 10px; }
.related-card .r-img img { max-height: 70px; width: auto; mix-blend-mode: multiply; }
.related-card small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.related-card svg { width: 18px; height: 18px; }
@media (max-width: 700px) { .related-grid { grid-template-columns: 1fr; } }

/* content blocks (product pages are built from blocks edited in the admin console) */
.p-block + .p-block { margin-top: 72px; }
.sub-title { font-size: 22px; margin-bottom: 12px; }
.p-sub .section-intro { margin-bottom: 24px; }
.table-wrap.narrow { max-width: 760px; }

/* rendered block text: "- " bullets get a dot, "1. " lists become numbered step cards */
.prose { color: var(--text); }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h3 { font-size: 20px; margin: 28px 0 12px; }
.prose p { font-size: 16px; }
.prose ul, .prose ol { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 10px; }
.prose ul li { position: relative; padding-left: 28px; }
.prose ul li::before {
  content: ""; position: absolute; left: 4px; top: .6em; width: 9px; height: 9px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 4px var(--brand-50);
}
.prose ol { counter-reset: item; gap: 12px; }
.prose ol li {
  counter-increment: item; display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: center;
  background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px;
}
.prose ol li::before {
  content: counter(item); width: 34px; height: 34px; border-radius: 10px; background: var(--white);
  border: 1px solid var(--brand-100); color: var(--brand); font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.section-soft .prose ol li { background: var(--white); }
.prose li strong { display: block; color: var(--ink); }
.prose li span { color: var(--muted); font-size: 15px; }
.prose-wide { max-width: 860px; }
.prose-wide .prose ol { grid-template-columns: 1fr 1fr; }
.prose-wide:has(ol) { max-width: none; }
@media (max-width: 760px) { .prose-wide .prose ol { grid-template-columns: 1fr; } }

/* missing-image placeholder, empty-state text, and the banner on unpublished products previewed by staff */
.img-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #b4bdcc; }
.img-placeholder svg { width: 56px; height: 56px; }
.related-card .r-img .img-placeholder svg { width: 28px; height: 28px; }
.empty-note { color: var(--muted); font-size: 17px; }
.preview-banner { background: #fff7e6; color: #8a5300; border-bottom: 1px solid #f5d9a8; text-align: center; padding: 10px 16px; font-weight: 600; font-size: 14px; }

/* fixed-ratio image boxes: the image is contained inside the box whatever its own proportions */
.product-media, .app-card .app-img, .gallery .g-img, .option .o-img, .p-hero-media, .app-row .a-img { position: relative; overflow: hidden; }
.product-media > img, .app-card .app-img > img, .gallery .g-img > img, .option .o-img > img, .p-hero-media > img, .app-row .a-img > img,
.product-media > .img-placeholder, .p-hero-media > .img-placeholder {
  position: absolute; top: var(--pad); left: var(--pad);
  width: calc(100% - 2 * var(--pad)); height: calc(100% - 2 * var(--pad));
  max-height: none; object-fit: contain;
}
/* inner padding of each kind of box */
.product-media { --pad: 28px; }
.p-hero-media { --pad: 36px; }
.app-card .app-img, .option .o-img { --pad: 16px; }
.gallery .g-img { --pad: 12px; }
.app-row .a-img { --pad: 0px; }

/* lightbox (the <dialog> created by site.js) */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 92vh; }
.lightbox::backdrop { background: rgba(6, 14, 32, .82); }
.lightbox img { max-width: 100%; max-height: 82vh; width: auto; margin: 0 auto; border-radius: 10px; background: var(--white); }
.lightbox p { color: var(--white); text-align: center; margin: 12px 0 0; font-weight: 600; }
.lightbox-close { position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: var(--white); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox-close svg { width: 22px; height: 22px; }

/* 404 */
.notfound { min-height: 60vh; display: flex; align-items: center; text-align: center; }
.notfound h1 { font-size: 64px; color: var(--brand); margin: 0; }

/* =====================================================================
   Product catalog (/catalog, /series, /part, /search)
   ===================================================================== */
/* .js is set on <html> by site.js: hides controls only needed without JavaScript (e.g. "Apply" buttons) */
.js .js-hide { display: none; }
.link-btn { border: 0; background: none; padding: 0; color: var(--brand); font: inherit; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* header search + typeahead */
.site-search { position: relative; display: flex; align-items: center; margin-right: 6px; }
.site-search input {
  width: 210px; height: 38px; padding: 0 38px 0 14px; border: 1px solid var(--line); border-radius: 999px;
  font: inherit; font-size: 14px; color: var(--ink); background: var(--soft); -webkit-appearance: none; appearance: none;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.site-search input:focus { outline: none; border-color: var(--brand); background: var(--white); box-shadow: 0 0 0 3px rgba(29, 91, 214, .15); }
.site-search button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.site-search button:hover { color: var(--brand); }
.site-search button svg { width: 17px; height: 17px; }
.site-search input::-webkit-search-cancel-button { display: none; }
/* narrower search box between 861px and 1120px; full width inside the mobile menu */
@media (max-width: 1120px) and (min-width: 861px) {
  .site-search input { width: 150px; }
  .main-nav a { padding: 8px 10px; }
}
@media (max-width: 860px) {
  .site-search { margin: 0 0 8px; }
  .site-search input { width: 100%; height: 44px; font-size: 16px; }
}

/* typeahead dropdown built by site.js: group headings, options (highlighted via aria-selected), "see all" */
.ac-list {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: max(100%, 360px); max-width: calc(100vw - 32px);
  margin: 0; padding: 6px; list-style: none; background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-md); max-height: 70vh; overflow-y: auto; text-align: left;
}
.ac-list[hidden] { display: none; }
.ac-head { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ac-list a { display: flex; flex-direction: column; padding: 7px 10px; border-radius: 8px; color: var(--ink); font-size: 14px; line-height: 1.35; }
.ac-list a small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-list [aria-selected="true"] a, .ac-list a:hover { background: var(--brand-50); color: var(--brand); }
.ac-all a { font-weight: 600; color: var(--brand); border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; }

/* page head, search, sections */
.cat-hero { background: linear-gradient(180deg, #f6f9fe 0%, #eef3fb 100%); padding-bottom: 44px; }
.cat-hero-text { max-width: 760px; padding-top: 24px; }
.cat-hero h1 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; letter-spacing: -.02em; }
.cat-hero .lead { font-size: 18px; color: var(--muted); }
.cat-facts { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cat-facts a { display: inline-block; font-size: 14px; font-weight: 600; color: var(--navy); background: var(--white); border: 1px solid var(--brand-100); border-radius: 999px; padding: 5px 14px; }
.cat-facts a:hover { border-color: var(--brand); color: var(--brand); }
.p-hero .eyebrow a { color: inherit; }

/* large pill-shaped search form on catalog pages */
.catalog-search {
  position: relative; display: flex; align-items: center; gap: 10px; max-width: 640px; margin-top: 8px;
  padding: 6px 6px 6px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm);
}
.catalog-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 91, 214, .15); }
.catalog-search > svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.catalog-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 16px; color: var(--ink); -webkit-appearance: none; appearance: none; }
.catalog-search .ac-list { top: calc(100% + 8px); }

.cat-section { padding: 56px 0; }
.cat-section + .cat-section:not(.section-soft) { border-top: 1px solid var(--line); }
.cat-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 24px; }
.cat-section-head h2 { font-size: clamp(24px, 2.6vw, 30px); margin: 0; }
.cat-section-head p { margin: 0; color: var(--muted); }
@media (max-width: 640px) { .cat-section { padding: 40px 0; } }

/* category tiles */
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.cat-tile {
  position: relative; display: flex; flex-direction: column; background: var(--white); color: inherit;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand-100); color: inherit; }
.cat-tile-img { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(180deg, #f7f9fd, #edf2f9); }
.cat-tile-img > img, .cat-tile-img > .img-placeholder { position: absolute; inset: 20px; width: calc(100% - 40px); height: calc(100% - 40px); object-fit: contain; mix-blend-mode: multiply; }
.cat-tile-body { display: flex; flex-direction: column; gap: 4px; padding: 16px 48px 18px 18px; }
.cat-tile-body strong { color: var(--ink); font-size: 17px; line-height: 1.3; }
.cat-tile-body small { color: var(--muted); font-size: 13.5px; }
.cat-tile > svg { position: absolute; right: 18px; bottom: 22px; width: 18px; height: 18px; color: var(--brand); transition: transform .2s; }
.cat-tile:hover > svg { transform: translateX(4px); }

/* series cards */
.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.series-card {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; padding: 14px; color: inherit;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px; transition: box-shadow .15s, border-color .15s;
}
.series-card:hover { border-color: var(--brand-100); box-shadow: var(--shadow-sm); color: inherit; }
.series-img { position: relative; aspect-ratio: 1; background: var(--soft); border-radius: 10px; overflow: hidden; }
.series-img > img, .series-img > .img-placeholder { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: contain; mix-blend-mode: multiply; }
.series-img .img-placeholder svg { width: 36px; height: 36px; }
.series-body { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.series-body strong { color: var(--ink); font-size: 16px; line-height: 1.3; }
.series-sum { color: var(--muted); font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.series-meta { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 600; font-size: 14px; }
.series-meta svg { width: 16px; height: 16px; transition: transform .2s; }
.series-card:hover .series-meta svg { transform: translateX(3px); }
@media (max-width: 420px) { .series-grid { grid-template-columns: 1fr; } .series-card { grid-template-columns: 84px minmax(0, 1fr); } }

/* status + code badges */
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.status-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border: 1px solid; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap; line-height: 1.6;
}
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
/* one colour per part / series status */
.status-badge.is-sellable { color: #0f7a3d; background: #e9f8ef; border-color: #bfe8cf; }
.status-badge.is-quotable { color: var(--brand-600); background: var(--brand-50); border-color: var(--brand-100); }
.status-badge.is-display { color: #4b5565; background: #f1f4f8; border-color: #dfe4ec; }
.status-badge.is-discontinued { color: #a3242f; background: #fdecee; border-color: #f5c2c7; }
.code-tag { font-size: 12px; font-weight: 700; color: var(--navy); background: var(--white); border: 1px solid var(--brand-100); border-radius: 999px; padding: 2px 10px; letter-spacing: .02em; }

/* faceted part listing */
/* filter sidebar (sticky, scrolls on its own) beside the parts table */
.listing { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.facets {
  position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
}
.facets-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.facets-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.facets-head h2 svg { width: 16px; height: 16px; color: var(--brand); }
.facets-head a { font-size: 13px; font-weight: 600; }
.facets-none { margin: 0; padding: 14px 16px; color: var(--muted); font-size: 14px; }
/* facet groups are <details>: native marker hidden, a CSS chevron instead; "show more" options in a nested <details> */
.facet { border-bottom: 1px solid var(--line); }
.facet:last-child { border-bottom: 0; }
.facet > summary, .facet-more > summary { list-style: none; cursor: pointer; }
.facet > summary::-webkit-details-marker, .facet-more > summary::-webkit-details-marker { display: none; }
.facet > summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-weight: 700; font-size: 14px; color: var(--ink); }
.facet > summary::after {
  content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg); transition: transform .15s;
}
.facet[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.facet-n { background: var(--brand); color: var(--white); font-size: 11px; border-radius: 999px; padding: 0 7px; line-height: 1.6; }
.facet ul { list-style: none; margin: 0; padding: 0 8px 10px; }
.facet-more > summary { padding: 0 16px 12px; font-size: 13px; font-weight: 600; color: var(--brand); }
.facet-more[open] > summary { display: none; }
/* filter options are links styled as checkboxes: box | label | count; options with no matches are greyed */
.facet-opt { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; font-size: 14px; color: var(--text); line-height: 1.35; }
a.facet-opt:hover { background: var(--soft); color: var(--ink); }
.facet-opt .box { width: 16px; height: 16px; border: 1.5px solid #b8c1d1; border-radius: 4px; background: var(--white); }
.facet-opt.is-selected { color: var(--ink); font-weight: 600; }
.facet-opt.is-selected .box { background: var(--brand); border-color: var(--brand); }
.facet-opt.is-selected .box::after { content: ""; display: block; width: 5px; height: 9px; border: solid var(--white); border-width: 0 2px 2px 0; transform: translate(4px, 1px) rotate(45deg); }
.facet-opt .cnt { min-width: 26px; padding: 0 7px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 12px; text-align: center; }
.facet-opt.is-empty { color: #a4adbd; }
.facet-opt.is-empty .box { border-color: #dfe4ec; }

/* result count + sort / page-size menus, active-filter chips, and the "no results" box */
.listing-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; margin-bottom: 12px; }
.listing-count { margin: 0; color: var(--muted); font-size: 14px; min-width: 0; }
.listing-count strong { color: var(--ink); }
/* The sort select's widest option ("Max Operating Pressure: high to low") sets its intrinsic width; flex
   items default to min-width:auto, so on narrow screens (320px) the form overflowed the page. min-width:0
   + max-width:100% let the form, label and select shrink, and the label wraps its text above the select
   when space runs out. On wider screens nothing is constrained, so the layout is unchanged. */
.listing-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-width: 0; max-width: 100%; }
.listing-sort label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); min-width: 0; max-width: 100%; }
.listing-sort select { font: inherit; font-size: 14px; color: var(--ink); border: 1px solid #cfd6e2; border-radius: 8px; padding: 6px 10px; background: var(--white); min-width: 0; max-width: 100%; }
.chips { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 12px; border: 1px solid var(--brand-100); border-radius: 999px; background: var(--brand-50); color: var(--navy); font-size: 13px; }
.chip svg { width: 14px; height: 14px; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip-clear { display: inline-block; padding: 4px 6px; font-size: 13px; font-weight: 600; }
.listing-empty { padding: 36px 24px; text-align: center; background: var(--white); border: 1px dashed #cfd6e2; border-radius: 14px; }
.listing-empty p { color: var(--muted); }
@media (max-width: 900px) {
  .listing { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .facets { position: static; max-height: none; }
}

/* parts table: sortable column headers (aria-sort marks the active one), numbers right-aligned */
.part-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.part-table th, .part-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.part-table thead th { background: var(--navy); color: var(--white); font-size: 13px; font-weight: 600; white-space: nowrap; }
.part-table thead th a { display: inline-flex; align-items: center; gap: 6px; color: var(--white); }
.part-table thead th a:hover { color: #bcd2ff; }
.sort-ind { font-size: 10px; opacity: .5; }
.part-table th[aria-sort] .sort-ind { opacity: 1; }
.part-table tbody th { font-weight: 700; white-space: nowrap; }
.part-table tbody tr:hover > * { background: #fafcff; }
.part-table td.desc { min-width: 220px; }
.part-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.part-table tbody tr:last-child > * { border-bottom: 0; }

/* page numbers under the table */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 20px; }
.pager a, .pager span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--text); font-size: 14px; font-weight: 600;
}
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager .pager-cur { background: var(--brand); border-color: var(--brand); color: var(--white); }
.pager .pager-gap { border: 0; background: transparent; min-width: 0; padding: 0 2px; }

/* downloads */
.downloads { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 920px; }
.dl { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.dl-ic { width: 44px; height: 44px; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.dl-ic svg { width: 22px; height: 22px; }
.dl-main { display: flex; flex-direction: column; min-width: 0; }
.dl-main strong { color: var(--ink); overflow-wrap: anywhere; }
.dl-main span { color: var(--muted); font-size: 13px; }
.dl .btn svg { width: 16px; height: 16px; }
@media (max-width: 560px) { .dl { grid-template-columns: 44px minmax(0, 1fr); } .dl > .btn { grid-column: 2; justify-self: start; } }

/* series page */
.series-overview { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.series-side h3 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.series-side h3 ~ h3 { margin-top: 24px; }
.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); color: var(--ink); font-size: 14px; }
@media (max-width: 860px) { .series-overview { grid-template-columns: 1fr; gap: 28px; } }

/* image zoom inside the hero image box */
.p-hero-media > .zoom-fill { position: absolute; inset: 0; padding: var(--pad); border: 0; background: transparent; cursor: zoom-in; }
.zoom-fill img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }

/* part page */
.part-grid { align-items: start; }
.p-hero h1.part-number { letter-spacing: 0; overflow-wrap: anywhere; }
/* a description that repeats a long part number wraps too, so it cannot widen the 1fr column on phones */
.cat-hero-part .lead { overflow-wrap: anywhere; }
.part-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.part-thumbs button { width: 72px; height: 72px; padding: 6px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; cursor: zoom-in; }
.part-thumbs button:hover { border-color: var(--brand-100); box-shadow: var(--shadow-sm); }
.part-thumbs img { width: 100%; height: 100%; object-fit: contain; }
/* key facts as a 2-column grid with 1px lines (the gap shows the background); an odd last item spans both */
.part-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0 0 24px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.part-facts div { padding: 10px 14px; background: var(--white); }
.part-facts div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.part-facts dt { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.part-facts dd { margin: 0; color: var(--ink); font-weight: 600; }
/* attribute tables grouped side by side; .alt-unit shows a value converted to another unit, prefixed "≈ " */
.spec-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: start; }
.spec-group h3 { font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.spec-group .spec-table tbody th { width: 48%; }
.alt-unit { margin-left: 6px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.alt-unit::before { content: "≈ "; }
.related-group + .related-group { margin-top: 28px; }
.related-group h3 { font-size: 17px; margin-bottom: 12px; }
@media (max-width: 860px) { .spec-groups { grid-template-columns: 1fr; } }

/* home page link to the catalog */
.catalog-cta {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin-top: 48px; padding: 24px 28px;
  background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 18px;
}
.catalog-cta h3 { margin: 0 0 4px; font-size: 20px; }
.catalog-cta p { margin: 0; color: var(--muted); }

/* =====================================================================
   Customer chat widget (.ttc-*)
   ===================================================================== */
/* fixed bottom-right container; round launcher button with a hover tooltip and an unread badge.
   --ttc-offset / --ttc-size also size the footer's launcher clearance below */
:root { --ttc-offset: 24px; --ttc-size: 60px; }
.ttc { position: fixed; right: var(--ttc-offset); bottom: var(--ttc-offset); z-index: 1000; font-family: var(--font); }
.ttc-launcher {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: var(--ttc-size); height: var(--ttc-size); padding: 0; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--brand); color: var(--white);
  box-shadow: 0 14px 30px -10px rgba(29, 91, 214, .75), 0 2px 6px rgba(0, 0, 0, .12);
  transition: transform .2s, background-color .2s, opacity .2s, visibility 0s;
}
.ttc-launcher:hover { background: var(--brand-600); transform: translateY(-2px); }
/* tucked away while scrolling down on narrow screens (chat-widget.js sets .is-tucked); visibility flips after the fade */
.ttc.is-tucked .ttc-launcher {
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(16px);
  transition: transform .2s, background-color .2s, opacity .2s, visibility 0s linear .2s;
}
@media (prefers-reduced-motion: reduce) { .ttc-launcher, .ttc.is-tucked .ttc-launcher { transition: none; } }
.ttc-launcher svg { width: 28px; height: 28px; flex: none; }
.ttc-tip {
  position: absolute; right: calc(100% + 12px); top: 50%; transform: translate(6px, -50%);
  background: var(--ink); color: var(--white); font-size: 13px; font-weight: 600; white-space: nowrap;
  padding: 7px 12px; border-radius: 8px; box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
}
.ttc-tip::after { content: ""; position: absolute; left: 100%; top: 50%; margin-top: -5px; border: 5px solid transparent; border-left-color: var(--ink); }
.ttc-launcher:hover .ttc-tip, .ttc-launcher:focus-visible .ttc-tip { opacity: 1; transform: translate(0, -50%); }
.ttc.is-open .ttc-tip { display: none; }
.ttc-badge {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--danger); color: var(--white); font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--white);
}
.ttc-badge[hidden] { display: none; }

/* "Connection closed, please refresh" notice shown when the server evicted this tab's live stream */
.ttc-evicted {
  position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 1001;
  display: flex; gap: 14px; align-items: center; max-width: calc(100vw - 32px);
  background: var(--danger); color: var(--white); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow-md); font-size: 14px; font-weight: 600;
}
.ttc-evicted button {
  flex: none; border: 1px solid rgba(255, 255, 255, .7); background: none; color: var(--white);
  padding: 5px 12px; border-radius: 8px; font: inherit; cursor: pointer;
}
.ttc-evicted button:hover { background: rgba(255, 255, 255, .15); }

/* the panel, above the launcher, with a short open animation (off for reduced motion) */
.ttc-panel {
  position: absolute; right: 0; bottom: 76px;
  width: 384px; height: min(640px, calc(100vh - 120px));
  background: var(--white); border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(15, 24, 42, .06);
  display: flex; flex-direction: column;
  transform-origin: bottom right; animation: ttc-in .18s ease-out;
}
.ttc-panel[hidden] { display: none; }
@keyframes ttc-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ttc-panel { animation: none; } }

/* panel header and body */
.ttc-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 18px; background: linear-gradient(135deg, var(--navy), #1a3b80); color: var(--white); flex: none; }
.ttc-avatar { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .14); display: flex; align-items: center; justify-content: center; flex: none; }
.ttc-avatar svg { width: 22px; height: 22px; }
.ttc-head-text { flex: 1; min-width: 0; }
.ttc-head-text strong { display: block; font-size: 15px; }
.ttc-head-text span { font-size: 12.5px; color: rgba(255, 255, 255, .72); }
.ttc-close { width: 36px; height: 36px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .1); color: var(--white); cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none; }
.ttc-close:hover { background: rgba(255, 255, 255, .2); }
.ttc-close svg { width: 20px; height: 20px; }

.ttc-body { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--white); }
.ttc-loading { margin: auto; color: var(--muted); font-size: 14px; }

/* auth view */
.ttc-auth { overflow-y: auto; padding: 20px 20px 24px; }
.ttc-intro { display: flex; gap: 12px; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 14px; padding: 14px; margin-bottom: 18px; color: var(--navy); font-size: 14px; line-height: 1.5; }
.ttc-intro svg { width: 22px; height: 22px; flex: none; color: var(--brand); }
.ttc-intro p { margin: 0; }
.ttc-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.ttc-tab { border: 0; background: transparent; padding: 9px 8px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.ttc-tab[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }
.ttc-form { display: grid; gap: 12px; }
.ttc-form[hidden] { display: none; }
.ttc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ttc-field { display: grid; gap: 5px; min-width: 0; }
.ttc-field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.ttc-field label .req { color: var(--danger); }
.ttc-field input, .ttc-field select, .ttc-composer textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  border: 1px solid #cfd6e2; border-radius: 10px; padding: 10px 12px; background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.ttc-field input:focus, .ttc-field select:focus, .ttc-composer textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 91, 214, .18); }
.ttc-field input[aria-invalid="true"] { border-color: var(--danger); }
.ttc-hint { font-size: 12px; color: var(--muted); }
/* honeypot field: moved off-screen so people never see it, while bots still fill it in */
.ttc-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ttc-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fdecee; color: #9f1f2b; font-size: 13.5px; }
.ttc-error[hidden] { display: none; }
.ttc-submit { min-height: 46px; border: 0; border-radius: 12px; background: var(--brand); color: var(--white); font-weight: 700; font-size: 15px; cursor: pointer; margin-top: 4px; }
.ttc-submit:hover { background: var(--brand-600); }
.ttc-submit:disabled { opacity: .6; cursor: progress; }
.ttc-fine { font-size: 12px; color: var(--muted); margin: 0; text-align: center; }
@media (max-width: 400px) { .ttc-row { grid-template-columns: 1fr; } }

/* chat view */
.ttc-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ttc-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px 8px; background: var(--soft); display: flex; flex-direction: column; gap: 6px; }
.ttc-day { align-self: center; font-size: 12px; color: var(--muted); background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; margin: 8px 0; }
/* bubbles: agent on the left (white, "TENGTA" label), customer on the right (brand blue), errors in red */
.ttc-msg { max-width: 82%; display: flex; flex-direction: column; gap: 3px; }
.ttc-msg .bubble { padding: 10px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.ttc-msg time { font-size: 11px; color: var(--muted); padding: 0 4px; }
.ttc-msg.agent { align-self: flex-start; }
.ttc-msg.agent .bubble { background: var(--white); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.ttc-msg.customer { align-self: flex-end; align-items: flex-end; }
.ttc-msg.customer .bubble { background: var(--brand); color: var(--white); border-bottom-right-radius: 5px; }
.ttc-msg .who { font-size: 11.5px; font-weight: 700; color: var(--brand); padding: 0 4px; }
.ttc-msg.is-error .bubble { background: #fdecee; border-color: #f5c2c7; color: #9f1f2b; }
.ttc-msg.is-error .who { display: none; }
/* message box + send button, and the "Signed in as … / Sign out" footer */
.ttc-composer { flex: none; display: flex; gap: 8px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--line); background: var(--white); }
.ttc-composer textarea { resize: none; max-height: 120px; min-height: 44px; line-height: 1.45; }
.ttc-send { width: 44px; height: 44px; flex: none; border-radius: 12px; border: 0; background: var(--brand); color: var(--white); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ttc-send:hover { background: var(--brand-600); }
.ttc-send:disabled { opacity: .5; cursor: default; }
.ttc-send svg { width: 20px; height: 20px; }
.ttc-foot { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 14px 10px; font-size: 12px; color: var(--muted); background: var(--white); }
.ttc-foot strong { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttc-foot span { min-width: 0; display: flex; gap: 4px; }
.ttc-link { border: 0; background: none; padding: 0; color: var(--brand); cursor: pointer; font-size: 12px; font-weight: 600; flex: none; }
/* privacy note between the composer and the footer */
.ttc-privacy { flex: none; padding: 0 14px; background: var(--white); text-align: left; }
.ttc-link:hover { text-decoration: underline; }

/* phones: the open panel fills the screen and the launcher hides; 16px inputs stop iOS zooming in */
@media (max-width: 640px) {
  :root { --ttc-offset: 16px; --ttc-size: 56px; }
  .ttc-tip { display: none; }
  .ttc.is-open .ttc-launcher { display: none; }
  .ttc-panel { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; animation: none; }
  .ttc-field input, .ttc-field select, .ttc-composer textarea { font-size: 16px; }
}
/*
 * Below 1300px the launcher overlaps the content column (container 1180px, 24px padding), so at the
 * end of the page it would cover the footer's last row (e.g. the Privacy Policy link). The footer's
 * bottom padding grows to the launcher's offset + size + 16px so the page can scroll that row clear.
 * The same overlap is why chat-widget.js hides the launcher at the top of the page (the first screen
 * is all content) and while scrolling down at this width: it reads the query from --ttc-overlap-mq,
 * so the two stay one breakpoint. CSS variables cannot be used inside @media, so keep the query below
 * identical to --ttc-overlap-mq.
 * While the launcher is hidden, the sticky header is the way to reach customer service: the nav's
 * "Contact sales" button from 861px to 1300px, and the .chat-link button below it at 860px and narrower,
 * where the nav collapses into the menu. Both sit in the header's own layout, so they never cover text.
 */
:root { --ttc-overlap-mq: (max-width: 1300px); }
@media (max-width: 1300px) {
  .site-footer { padding-bottom: calc(var(--ttc-offset) + var(--ttc-size) + 16px); }
}

/* header chat button (opens the widget via [data-open-chat]; the badge mirrors the launcher's unread count) */
.chat-link { display: none; }
@media (max-width: 860px) {
  .chat-link {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-width: 44px; height: 44px; padding: 0 14px 0 12px; border: 0; border-radius: 12px; cursor: pointer;
    background: var(--brand); color: var(--white); font: inherit; font-size: 14px; font-weight: 600;
  }
  .chat-link:hover { background: var(--brand-600); }
  .chat-link svg { width: 21px; height: 21px; flex: none; }
}
/* small phones: icon only and tighter gaps, so logo, chat, quote list and menu fit on one row */
@media (max-width: 480px) {
  .header-inner { gap: 12px; }
  .header-tools { gap: 6px; }
  .chat-link { padding: 0; }
  .chat-link-label { display: none; }
}

/* =====================================================================
   Quote list
   ===================================================================== */

/* header quote-list button with its count badge (quote-cart.js fills [data-quote-count]) */
.header-tools { display: flex; align-items: center; gap: 8px; order: 3; }
.quote-link {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--white);
}
.quote-link:hover, .quote-link[aria-current="page"] { color: var(--brand); border-color: var(--brand-100); background: var(--brand-50); }
.quote-link svg { width: 21px; height: 21px; }
.quote-count {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--brand); color: var(--white); font-size: 11.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1; border: 2px solid var(--white);
}
.quote-count[hidden] { display: none; }
@media (max-width: 860px) { .header-tools { margin-left: auto; } }

/* "Add to quote" forms */
.add-quote { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.qty-input {
  width: 92px; min-height: 38px; border: 1px solid #cfd6e2; border-radius: 10px; padding: 0 10px;
  font: inherit; font-size: 14px; color: var(--ink); background: var(--white);
}
.qty-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 91, 214, .15); }
.qty-input:disabled { background: var(--soft); color: var(--muted); }
.add-quote-uom { font-size: 14px; color: var(--muted); margin-left: 6px; }
.add-quote .add-quote-uom { margin-left: -2px; }
/* compact variant inside part-table rows (label dropped below 1100px); larger variant on part pages */
.add-quote.is-compact { flex-wrap: nowrap; gap: 6px; }
.add-quote.is-compact .qty-input { width: 76px; min-height: 34px; }
.add-quote.is-compact .btn { min-height: 34px; padding: 0 10px; gap: 4px; }
.add-quote.is-compact .btn svg { width: 16px; height: 16px; }
.add-quote-label { white-space: nowrap; }
@media (max-width: 1100px) { .add-quote.is-compact .add-quote-label { display: none; } }
.quote-cell { white-space: nowrap; }
.part-quote { margin: 22px 0 14px; padding: 16px; border: 1px solid var(--brand-100); background: var(--brand-50); border-radius: 14px; }
.part-quote .qty-input { min-height: 46px; width: 110px; font-size: 16px; }
.part-quote .btn { min-height: 46px; }

/* "added to your list" notice from quote-cart.js */
.quote-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 120;
  display: flex; gap: 16px; align-items: center; max-width: calc(100vw - 32px);
  background: var(--navy); color: var(--white); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-md); font-size: 14px;
  /* a left: 50% box would shrink to half the viewport; size to the text instead (max-width still caps it) */
  width: max-content;
}
/* long part numbers have no break points: wrap them inside the box instead of running past it */
.quote-toast span { min-width: 0; overflow-wrap: anywhere; }
.quote-toast a { color: #bcd2ff; font-weight: 700; white-space: nowrap; }
.quote-toast a:hover { color: var(--white); }
.quote-toast[hidden] { display: none; }
/* narrow screens: span the viewport with the link on its own line */
@media (max-width: 600px) {
  .quote-toast { left: 16px; right: 16px; bottom: 16px; transform: none; width: auto; max-width: none; flex-wrap: wrap; gap: 6px; }
  .quote-toast a { flex-basis: 100%; }
}
.q-full { margin-bottom: 18px; }

/* /quote page */
.quote-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 32px; align-items: start; }
/* minmax(0, ...): a plain 1fr column grows to the table's width and pushes the page sideways */
@media (max-width: 960px) { .quote-grid { grid-template-columns: minmax(0, 1fr); } }
/* the scrolling wrap holds the absolutely positioned visually-hidden header text, so it cannot widen the page */
.quote-items .table-wrap { position: relative; }
.quote-table td { vertical-align: middle; }
/* desktop table: long part numbers wrap inside a capped column, so Remove stays in view without scrolling */
@media (min-width: 641px) {
  .quote-table tbody th { white-space: normal; overflow-wrap: anywhere; max-width: 16em; }
  /* the unit ("pcs") stays on the quantity box's line; the description column gives up the width */
  .quote-table td:has(> .qty-input) { white-space: nowrap; }
}
/* a description that repeats a long part number wraps too, so it cannot make the table scroll sideways */
.quote-table td.desc { overflow-wrap: anywhere; }
.quote-table .desc small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.quote-table tr.is-unavailable th, .quote-table tr.is-unavailable .desc { color: var(--muted); }
/* phones: one card per line (part number, description, then quantity and Remove side by side), no sideways scroll */
@media (max-width: 640px) {
  .quote-table, .quote-table tbody { display: block; }
  .quote-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .quote-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .quote-table tbody tr:last-child { border-bottom: 0; }
  .quote-table tbody tr > * { padding: 0; border-bottom: 0; }
  .quote-table tbody th, .quote-table td.desc { grid-column: 1 / -1; min-width: 0; }
  /* long part numbers without spaces wrap instead of widening the card */
  .quote-table tbody th { white-space: normal; overflow-wrap: anywhere; }
}
.q-warn { display: block; color: #a3242f; font-size: 13px; font-weight: 600; margin-top: 2px; }
/* contact form beside the list; honeypot off-screen; error, signed-in note and the thank-you box */
.quote-form { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: grid; gap: 12px; box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 24, 42, .06)); }
.quote-form h2 { font-size: 20px; margin: 0; }
.q-field { display: grid; gap: 4px; }
.q-field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.q-field .req { color: #a3242f; }
.q-field input, .q-field textarea {
  width: 100%; border: 1px solid #cfd6e2; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 15px; color: var(--ink); background: var(--white);
}
.q-field textarea { resize: vertical; min-height: 96px; }
.q-field input:focus, .q-field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 91, 214, .15); }
.q-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* also the ?add= notice above the list and the form's API error ([data-quote-error]); both can quote a long part number */
.q-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fdecee; color: #9f1f2b; font-size: 14px; overflow-wrap: anywhere; }
.q-signed { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--brand-50); color: var(--brand-600); font-size: 14px; }
.q-privacy { margin: 0; font-size: 13px; color: var(--muted); }
.quote-done { padding: 28px; border-radius: 16px; background: #ecfdf3; border: 1px solid #b7e4c7; color: #14532d; }
.quote-done h2 { color: #14532d; font-size: 22px; }
.quote-done p { margin: 0; }
.quote-empty { display: grid; gap: 16px; justify-items: start; }

/* /privacy-policy: numbered sections in the prose column, effective date under the lead */
.legal-date { margin: 0; font-size: 14px; color: var(--muted); }
.legal-lang { margin-top: 4px; }
.legal-section { scroll-margin-top: calc(var(--header-h) + 24px); }
.legal-section + .legal-section { margin-top: 36px; }
.legal-section h2 { font-size: clamp(20px, 2.2vw, 24px); margin-bottom: 12px; }

/* ---------- names without spaces ---------- */
/* a long series, category or part name wraps inside its box instead of widening the page. "anywhere" also lowers the
   box's minimum width, so the grid and flex rows around it can shrink. Not for table cells in general: a table would
   then squeeze its columns to one letter instead of scrolling, so only the cells that hold a name or description get it. */
.p-hero h1, .cat-hero h1, .eyebrow, .code-tag, .p-hero .lead, .cat-hero .lead, .p-note, .p-models li, .p-highlights li,
.prose, .tag-list li, .part-facts dd, .dl-main span, .empty-note, .cat-section-head p,
.cat-tile-body strong, .series-body strong, .series-sum, .series-meta,
.product-tag, .product-body h3, .product-models, .cat-tab, .cat-group-head h3, .related-card,
.facet summary, .facet a, .chip, .ac-list a, .lightbox p, .site-footer li,
.part-table td.desc { overflow-wrap: anywhere; }
.cat-tab { max-width: 100%; }
.cat-group-head h3, .chip strong, .spec-group { min-width: 0; }
.chip { max-width: 100%; }
/* the series column: a name with spaces sizes it as before; one without stops at this width and breaks there, not at one letter per line */
.part-table td > a { display: inline-block; max-width: 16em; overflow-wrap: break-word; }

/* ---------- content blocks: text without spaces ---------- */
/* same fix for every field of the four block types (admin preview and public product page share this markup). The body text
   is already covered by .prose above. "anywhere" lowers the boxes' minimum width, so their grids need no min-width: 0. */
.p-section h2, .sub-title, .section-intro, .table-note, .gallery figcaption, .option h3, .option p, .app-row h3, .app-row p { overflow-wrap: anywhere; }
/* a sub-navigation label wider than the window wraps; flex: none keeps the others on one line, so the list still scrolls */
.subnav li { flex: none; max-width: 100%; }
.subnav a { white-space: normal; overflow-wrap: anywhere; }
/* spec tables still scroll, and normal words never break: "anywhere" would squeeze columns, so a name or value stops at this width instead */
.spec-table.simple th, .spec-table.models th { max-width: 16em; overflow-wrap: break-word; }
.spec-table.simple td, .spec-table td.span { max-width: 20em; overflow-wrap: break-word; }
