/* Nex Industry Group public site.
   Layout follows what oilfield buyers know from distributor sites: phone bar, search,
   products menu by family, photo hero, family tiles, catalog with side filters, call band.
   Our own voice: Archivo at three widths (condensed headlines, normal text, expanded
   nameplate values), logo navy, galvanized grey, and separator yellow for the main action. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  color-scheme: light;
  --galv: #eef0ee;
  --paper: #ffffff;
  --ink: #1b232a;
  --ink-2: #47525c;
  --navy: #0e2d4f;
  --navy-deep: #0a2140;
  --plate: #cbd1ce;
  --plate-edge: #8e9894;
  --line: #d3d8d6;
  --yellow: #e8b220;
  --yellow-hi: #f2c440;
  --wa: #157347;
  --ok: #1d6b3f;
  --warn: #8a5a00;
  --err: #a1261b;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.333rem;
  --step-2: 1.777rem;
  --step-3: clamp(1.9rem, 3.2vw, 2.5rem);
  --step-4: clamp(2.4rem, 5.4vw, 4.4rem);

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--galv);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 "Archivo", system-ui, sans-serif;
  font-stretch: 100%;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-stretch: 72%; font-weight: 760; line-height: 1.04; letter-spacing: -0.005em; margin: 0; text-wrap: balance; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-stretch: 85%; font-weight: 700; line-height: 1.2; }
p { margin: 0; }
a { color: var(--navy); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-radius: 2px; }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: 40ch; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.note { color: var(--ink-2); max-width: 68ch; }
.text-link { font-weight: 650; }

.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: var(--radius); }
.skip:focus { top: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 44px; padding: 0.6em 1.15em;
  border: 2px solid transparent; border-radius: var(--radius);
  font: inherit; font-stretch: 88%; font-weight: 680; font-size: var(--step-0); line-height: 1.1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-big { min-height: 52px; padding: 0.75em 1.4em; font-size: 1.125rem; }
.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-primary:hover { background: var(--yellow-hi); }
.btn-quiet { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-quiet:hover { background: var(--ink); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.75); color: #fff; background: rgba(10,33,64,.25); }
.btn-ghost:hover { background: #fff; color: var(--navy); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #0f5c38; }
.btn-small { min-height: 38px; padding: 0.4em 0.85em; font-size: var(--step--1); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.icon { width: 1.2em; height: 1.2em; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Top bar */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 7px var(--gutter); background: var(--navy-deep); color: rgba(255,255,255,.82);
  font-size: var(--step--1);
}
.topbar a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { text-decoration: underline; }
.topbar :focus-visible { outline-color: var(--yellow); }
.topbar-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.topbar-links li:first-child a { font-weight: 700; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand search cta" "nav nav nav";
  align-items: center; gap: 12px 28px;
  padding: 14px var(--gutter) 0;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.brand { grid-area: brand; display: flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; font-stretch: 70%; font-weight: 800; font-size: 1.45rem; line-height: 1; }
.brand img { height: 32px; width: auto; }
.site-header > .search { grid-area: search; max-width: 620px; }
.header-cta { grid-area: cta; }
.site-nav { grid-area: nav; }
.site-nav > ul { display: flex; gap: 4px 30px; list-style: none; margin: 0; padding: 0; }
.site-nav > ul > li > a, .mega > summary {
  display: inline-flex; align-items: center; gap: 6px; padding: 12px 0 13px;
  color: var(--ink); text-decoration: none; font-weight: 600; cursor: pointer;
  border-bottom: 3px solid transparent;
}
.site-nav > ul > li > a:hover, .mega > summary:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--navy); color: var(--navy); }
.mega > summary { list-style: none; }
.mega > summary::-webkit-details-marker { display: none; }
.mega > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg; translate: 0 -2px; }
.mega[open] > summary { border-bottom-color: var(--yellow); }
.mega[open] > summary::after { rotate: 225deg; translate: 0 2px; }
.mega-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--paper); border-top: 1px solid var(--line); border-bottom: 4px solid var(--navy);
  box-shadow: 0 24px 40px rgba(14,45,79,.18);
  padding: 28px var(--gutter) 24px; display: flex; flex-direction: column; gap: 18px;
}
.mega-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 28px; max-height: calc(100vh - 240px); overflow: auto; }
.mega-family { display: block; font-stretch: 80%; font-weight: 750; font-size: 1.1rem; color: var(--navy); text-decoration: none; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.mega-family:hover { text-decoration: underline; }
.mega-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.95rem; }
.mega-grid ul a { color: var(--ink); text-decoration: none; }
.mega-grid ul a:hover { color: var(--navy); text-decoration: underline; }
.mobile-menu { display: none; }

/* Search */
.search { display: flex; width: 100%; }
.search input {
  flex: 1; min-width: 0; min-height: 46px; padding: 0 14px;
  font: inherit; font-size: 1rem; color: var(--ink);
  border: 2px solid var(--navy); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); background: #fff;
}
.search input::placeholder { color: #6b7680; }
.search input:focus-visible { outline: 3px solid var(--yellow); outline-offset: 0; }
.search button {
  width: 54px; min-height: 46px; border: 0; border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--navy); color: #fff; cursor: pointer; display: grid; place-items: center;
}
.search button:hover { background: var(--navy-deep); }
.search-quote button { width: auto; padding-inline: 18px; font: inherit; font-weight: 700; white-space: nowrap; }

/* Hero: full-width yard photo, copy on a navy wash, nameplate over the photo */
.hero { position: relative; color: #fff; background: var(--navy-deep); overflow: hidden; }
.hero > img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero-wash {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(10,33,64,.94) 0%, rgba(10,33,64,.86) 38%, rgba(10,33,64,.35) 70%, rgba(10,33,64,.15) 100%);
}
.hero-inner {
  position: relative; z-index: 2; max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px; align-items: center;
  padding: clamp(48px, 8vw, 104px) var(--gutter);
  min-height: min(78vh, 720px);
}
.hero-copy { display: flex; flex-direction: column; gap: 26px; }
.hero-copy h1 { max-width: 16ch; }
.hero-copy .lead { color: rgba(255,255,255,.88); }
.hero :focus-visible { outline-color: var(--yellow); }

/* The nameplate: the one loud thing on the site. */
.plate {
  position: relative; justify-self: end; width: min(420px, 100%);
  padding: 28px 30px 26px; color: var(--navy);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.09) 0 1px, transparent 1px 3px),
    linear-gradient(170deg, #dfe3e1 0%, var(--plate) 55%, #bcc3bf 100%);
  border-radius: 6px; outline: 1px solid var(--plate-edge);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 18px 40px rgba(0,0,0,.35);
}
.plate::before, .plate::after {
  content: ""; position: absolute; left: 10px; right: 10px; height: 9px;
  background:
    radial-gradient(circle at 4.5px 4.5px, #f4f6f5 0 1.5px, #7c8682 2.5px 4.5px, transparent 5px) left / 9px 9px no-repeat,
    radial-gradient(circle at 4.5px 4.5px, #f4f6f5 0 1.5px, #7c8682 2.5px 4.5px, transparent 5px) right / 9px 9px no-repeat;
}
.plate::before { top: 10px; }
.plate::after { bottom: 10px; }
.plate h2 { font-size: var(--step-1); font-stretch: 80%; font-weight: 750; margin-bottom: 14px; }
.plate dl { margin: 0 0 16px; border-top: 1px solid rgba(14,45,79,.35); }
.plate dl > div { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid rgba(14,45,79,.35); }
.plate dt { font-size: var(--step--1); font-weight: 500; color: #2c3e50; }
.plate dd { margin: 0; font-stretch: 118%; font-weight: 640; font-size: 0.95rem; letter-spacing: 0.01em; }
.plate p { font-size: var(--step--1); line-height: 1.45; margin-bottom: 14px; color: #22323f; }
.plate :focus-visible { outline-color: var(--navy); }

.standards {
  padding: 16px var(--gutter); background: var(--navy); color: #fff;
  font-stretch: 88%; font-weight: 600; text-align: center;
}

/* Shared section rhythm */
.families, .top-cats, .featured, .catalog-head, .catalog, .page-head, .prose, .gallery, .contact {
  max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }

/* Family tiles */
.families { padding-block: clamp(48px, 7vw, 88px) 24px; }
.tile-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(250px, auto); gap: 16px; }
.tile { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--navy); color: #fff; display: flex; flex-direction: column; justify-content: flex-end; min-height: 250px; }
.tile-tall { grid-row: span 2; }
.tile > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale .4s ease; }
.tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,33,64,0) 30%, rgba(10,33,64,.9) 100%); z-index: 1; }
.tile-body { position: relative; z-index: 2; padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; }
.tile h3 { font-size: 1.55rem; font-stretch: 72%; }
.tile h3 a { color: #fff; text-decoration: none; }
.tile h3 a::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.tile p { color: rgba(255,255,255,.85); font-size: var(--step--1); max-width: 40ch; }
.tile:hover h3 a { text-decoration: underline; }
.tile:focus-within { outline: 3px solid var(--yellow); outline-offset: 2px; }
.tile a:focus-visible { outline: none; }
@media (prefers-reduced-motion: no-preference) { .tile:hover > img { scale: 1.03; } }

/* All 12 departments: a compact index under the photo tiles */
.dept-index-h { font-size: var(--step-1); margin: 36px 0 12px; }
.dept-index { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dept-index a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); color: var(--navy); font-stretch: 82%; font-weight: 750; font-size: 1.05rem; line-height: 1.2; text-decoration: none; }
.dept-index a:hover { border-color: var(--navy); background: #fff; }

/* Department pages */
.crumbs, .dept-head, .dept-supply, .dept-stock, .dept-others { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.crumbs { padding-top: 20px; font-size: var(--step--1); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; color: var(--ink-2); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--plate-edge); }
.dept-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: center; padding-block: 24px 32px; }
.dept-head.has-photo { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.dept-head h1 { color: var(--navy); margin-bottom: 16px; }
.dept-head .lead { margin-bottom: 24px; max-width: 46ch; }
.dept-head .btn, .inv-message .btn { white-space: normal; text-align: center; }
.dept-head > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.dept-supply { padding-block: 8px 40px; }
.dept-supply h2, .dept-others h2 { font-size: var(--step-2); margin-bottom: 16px; }
.dept-subs { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; }
.dept-subs a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.dept-subs a::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--navy); border-top: 2px solid var(--navy); rotate: 45deg; align-self: center; flex: none; }
.dept-subs a:hover { color: var(--navy); background: var(--paper); }
.dept-others { padding-block: 0 clamp(48px, 6vw, 80px); }
.dept-others ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dept-others a { display: inline-block; padding: 8px 14px; border: 1px solid var(--plate-edge); border-radius: 999px; background: var(--paper); color: var(--ink); text-decoration: none; font-size: 0.95rem; font-weight: 550; }
.dept-others a:hover { border-color: var(--navy); color: var(--navy); }

/* Most requested */
.top-cats { padding-block: 32px clamp(48px, 6vw, 72px); }
.top-cats h2 { font-size: var(--step-2); margin-bottom: 18px; }
.top-cats ul { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 24px; }
.top-cats li a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 550; }
.top-cats li a::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--navy); border-top: 2px solid var(--navy); rotate: 45deg; align-self: center; flex: none; }
.top-cats li a:hover { color: var(--navy); background: var(--paper); }

/* Inventory cards */
.featured { padding-block: 0 clamp(48px, 6vw, 88px); }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.featured .inv-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.dept-stock .inv-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.card { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card:hover { border-color: var(--plate-edge); }
.card-photo { aspect-ratio: 4 / 3; background: #f5f6f5; display: grid; place-items: center; color: var(--ink-2); font-size: var(--step--1); border-bottom: 1px solid var(--line); }
.card-photo { position: relative; overflow: hidden; }
.card-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 0.8rem; color: var(--ink-2); }
.card-type { font-weight: 700; color: var(--navy); }
.card h3 { font-size: 1.15rem; }
.card-specs { font-size: var(--step--1); color: var(--ink-2); line-height: 1.4; }
.card-price { font-weight: 700; }
.card .btn { margin-top: auto; align-self: stretch; }
.status { display: flex; align-items: center; gap: 7px; font-size: var(--step--1); font-weight: 600; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-available { color: var(--ok); }
.status-limited { color: var(--warn); }
.status-inquire { color: var(--ink-2); }
.inv-message { grid-column: 1 / -1; padding: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.inv-message p { max-width: 60ch; }
.inv-message.is-error { border-color: #e2b4ae; }

/* Steps: a real sequence, so it gets numbers. */
/* Full-width bands keep their content on the same edge as the sections between them. */
.steps, .call-band { padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))); }
.steps { background: var(--paper); border-bottom: 1px solid var(--line); padding-block: clamp(40px, 6vw, 72px); }
.steps h2 { margin-bottom: 32px; color: var(--navy); }
.steps ol { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 3px solid var(--navy); padding-top: 16px; }
.steps li::before { content: counter(step); display: block; margin-bottom: 8px; font-stretch: 62%; font-weight: 800; font-size: 3.2rem; line-height: 1; color: var(--navy); }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--ink-2); max-width: 34ch; }

/* Call band */
.call-band {
  background: var(--yellow); color: var(--ink);
  padding-block: clamp(32px, 5vw, 56px);
  display: flex; justify-content: space-between; align-items: center; gap: 24px 48px; flex-wrap: wrap;
}
.call-band h2 { font-size: var(--step-3); }
.call-band p { margin-top: 8px; max-width: 52ch; }
.call-band .btn-primary { background: var(--navy); color: #fff; }
.call-band .btn-primary:hover { background: var(--navy-deep); }

/* Equipment we supply (landing mode): families as columns of quote links */
.supply { max-width: var(--max); margin-inline: auto; padding: 12px var(--gutter) clamp(48px, 6vw, 88px); }
.supply-grid { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 32px; }
.supply-family h2 { font-size: var(--step-1); padding-bottom: 8px; border-bottom: 3px solid var(--navy); margin-bottom: 4px; }
.supply-family h2 a { color: var(--navy); text-decoration: none; }
.supply-family h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.supply-family ul { list-style: none; margin: 0; padding: 0; }
.supply-family li a { display: flex; justify-content: space-between; gap: 12px; min-height: 44px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 550; }
.supply-family li a::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--navy); border-top: 2px solid var(--navy); rotate: 45deg; flex: none; }
.supply-family li a:hover { color: var(--navy); background: var(--paper); }

/* Catalog */
.catalog-head { padding-block: clamp(32px, 5vw, 56px) 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 40px; align-items: end; }
.catalog-head h1 { color: var(--navy); grid-column: 1; }
.catalog-head .lead { grid-column: 1; font-size: var(--step-0); }
.catalog-head .search { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
.catalog { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; padding-block: 12px clamp(48px, 6vw, 88px); align-items: start; }
.filters { position: sticky; top: 132px; }
.filter-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.filter-box > summary { padding: 12px 16px; font-weight: 750; font-stretch: 85%; font-size: 1.1rem; border-bottom: 1px solid var(--line); list-style: none; cursor: pointer; }
.filter-box > summary::-webkit-details-marker { display: none; }
.filters fieldset { border: 0; margin: 0; padding: 12px 16px 14px; border-bottom: 1px solid var(--line); }
.filters fieldset:last-child { border-bottom: 0; }
.filters legend { font-weight: 700; font-size: var(--step--1); color: var(--ink-2); padding: 0; margin-bottom: 6px; float: left; width: 100%; }
.opt { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-size: 0.95rem; clear: both; }
.opt input { accent-color: var(--navy); width: 18px; height: 18px; margin: 0; flex: none; }
.opt span:nth-of-type(1) { flex: 1; }
.opt-count { color: var(--ink-2); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.opt:has(input:checked) span:nth-of-type(1) { font-weight: 700; color: var(--navy); }
.results-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; min-height: 40px; margin-bottom: 12px; }
.count { color: var(--ink-2); font-size: var(--step--1); }
.search-note { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.search-note button { font: inherit; font-size: var(--step--1); color: var(--navy); background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 4px; }

/* Inner pages */
.page-head { padding-block: clamp(40px, 7vw, 80px) 8px; display: flex; flex-direction: column; gap: 18px; }
.page-head h1 { color: var(--navy); }
.page-head .lead { max-width: 52ch; }
.prose { padding-block: 24px clamp(40px, 6vw, 72px); }
.prose > * { max-width: 66ch; }
.prose p { margin-bottom: 1em; }
.prose h2 { font-size: var(--step-1); font-stretch: 85%; margin: 1.6em 0 0.4em; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-block: 0 clamp(48px, 6vw, 88px); }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 64px); padding-block: clamp(40px, 6vw, 80px); align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 22px; }
.contact-info h1 { color: var(--navy); }
.contact-info .plate { justify-self: start; }
.contact-list { margin: 0; border-top: 1px solid var(--line); }
.contact-list > div { display: grid; grid-template-columns: 11em 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list dt { color: var(--ink-2); font-size: var(--step--1); padding-top: 2px; }
.contact-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.quote-form { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: var(--radius); padding: clamp(20px, 3vw, 36px); display: flex; flex-direction: column; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 650; font-size: var(--step--1); }
.req { font-weight: 400; color: var(--ink-2); }
.hint { font-size: var(--step--1); color: var(--ink-2); }
.field input, .field select, .field textarea { font: inherit; font-size: 1rem; color: var(--ink); min-height: 48px; padding: 10px 12px; border: 1px solid var(--plate-edge); border-radius: var(--radius); background: #fff; width: 100%; }
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
.quote-form .btn { align-self: flex-start; }
.form-status:empty { display: none; }
.form-status { padding: 12px 14px; border-radius: var(--radius); font-weight: 600; }
.form-status.is-ok { background: #e6f2ea; color: var(--ok); }
.form-status.is-error { background: #f8e7e5; color: var(--err); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Item dialog */
.item-dialog { width: min(880px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; border: 0; border-radius: 6px; color: var(--ink); box-shadow: 0 24px 80px rgba(14,45,79,.35); }
.item-dialog::backdrop { background: rgba(14, 25, 38, .72); }
.dialog-close { position: sticky; top: 0; display: flex; justify-content: flex-end; height: 0; z-index: 2; }
.icon-btn { margin: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); font-size: 1.1rem; cursor: pointer; color: var(--ink); }
.item-gallery { position: relative; background: #f5f6f5; aspect-ratio: 16 / 9; display: grid; place-items: center; color: var(--ink-2); }
.item-gallery img { width: 100%; height: 100%; object-fit: contain; }
.item-gallery .gal-nav { position: absolute; top: 50%; translate: 0 -50%; }
.item-gallery .gal-prev { left: 4px; }
.item-gallery .gal-next { right: 4px; }
.gal-count { position: absolute; bottom: 10px; right: 14px; font-size: var(--step--1); background: rgba(255,255,255,.9); padding: 2px 8px; border-radius: 99px; }
.item-body { padding: clamp(20px, 4vw, 40px); display: flex; flex-direction: column; gap: 12px; }
.item-tag, .item-part { color: var(--ink-2); font-size: var(--step--1); }
.item-part:empty { display: none; }
.item-body h2 { color: var(--navy); font-size: var(--step-3); }
.item-body h3 { font-size: var(--step-0); font-stretch: 100%; margin-top: 8px; }
.spec-list { margin: 0; border-top: 1px solid var(--line); }
.spec-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.spec-list > div:nth-child(odd) { background: #f7f8f7; }
.spec-list dt { color: var(--ink-2); padding-left: 8px; }
.spec-list dd { margin: 0; font-weight: 600; text-align: right; padding-right: 8px; }
.item-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 8px; }
.item-price { font-stretch: 80%; font-weight: 750; font-size: var(--step-2); }

/* Footer */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.78); padding: clamp(40px, 6vw, 64px) var(--gutter) 28px; font-size: var(--step--1); }
.site-footer > * { max-width: var(--max); margin-inline: auto; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer :focus-visible { outline-color: var(--yellow); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-grid-4 { grid-template-columns: 1.3fr 1.6fr 1fr; }
.footer-grid-4 > div:nth-child(2) ul { columns: 2; column-gap: 24px; display: block; }
.footer-grid-4 > div:nth-child(2) li { margin-bottom: 8px; break-inside: avoid; }
.footer-grid p { max-width: 40ch; }
.footer-grid h2 { font-size: var(--step-0); font-stretch: 100%; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-contact { margin-top: 16px !important; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-stretch: 70%; font-weight: 800; font-size: 1.35rem; color: #fff; margin-bottom: 12px; }
.footer-brand img { height: 24px; width: auto; filter: brightness(0) invert(1); }
.footer-legal { border-top: 1px solid rgba(255,255,255,.14); padding-top: 20px; color: rgba(255,255,255,.6); }

.wa-float { display: none; }

/* Tablet */
@media (max-width: 1080px) {
  .mega-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dept-subs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-cats ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .site-header { grid-template-columns: auto 1fr auto; grid-template-areas: "brand cta menu"; padding-bottom: 12px; }
  .site-header > .search, .site-nav { display: none; }
  .header-cta { justify-self: end; }
  .mobile-menu { display: block; grid-area: menu; }
  .mobile-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 2px solid var(--navy); border-radius: var(--radius); font-weight: 650; cursor: pointer; color: var(--navy); }
  .mobile-menu > summary::-webkit-details-marker { display: none; }
  .burger, .burger::before, .burger::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
  .burger::before, .burger::after { content: ""; position: absolute; left: 0; }
  .burger::before { top: -6px; }
  .burger::after { top: 6px; }
  .mobile-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 4px solid var(--navy); box-shadow: 0 24px 40px rgba(14,45,79,.2); padding: 16px var(--gutter) 24px; display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 120px); overflow: auto; }
  .mobile-panel ul { list-style: none; margin: 0; padding: 0; }
  .mobile-panel li a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
  .hero-inner { grid-template-columns: 1fr; min-height: 0; }
  .hero-wash { background: linear-gradient(180deg, rgba(10,33,64,.92) 0%, rgba(10,33,64,.8) 55%, rgba(10,33,64,.55) 100%); }
  .plate { justify-self: start; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-tall { grid-row: span 1; grid-column: 1 / -1; min-height: 320px; }
  .catalog-head { grid-template-columns: 1fr; }
  .catalog-head .search { grid-column: 1; grid-row: auto; }
  .catalog { grid-template-columns: 1fr; }
  .dept-head.has-photo { grid-template-columns: 1fr; }
  .footer-grid-4 { grid-template-columns: 1fr 1fr; }
  .filters { position: static; }
  .filter-box:not([open]) > summary { border-bottom: 0; }
  .filters fieldset { display: flex; flex-wrap: wrap; gap: 6px 16px; }
  .filters legend { margin-bottom: 4px; }
  .opt { clear: none; }
  .contact { grid-template-columns: 1fr; }
  .steps ol { grid-template-columns: 1fr; gap: 24px; }
  .supply-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

/* Phone */
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .topbar-note { display: none; }
  .topbar { justify-content: flex-end; }
  .header-cta { display: none; }
  .site-header { grid-template-areas: "brand menu"; grid-template-columns: 1fr auto; }
  .brand { font-size: 1.3rem; }
  .tile-grid { grid-template-columns: 1fr; }
  .top-cats ul { grid-template-columns: 1fr 1fr; }
  .supply-grid { grid-template-columns: 1fr; }
  .field-row, .gallery, .footer-grid, .footer-grid-4, .dept-subs { grid-template-columns: 1fr; }
  .plate { padding: 24px 20px 22px; }
  .plate dl > div { grid-template-columns: 1fr; gap: 0; }
  .contact-list > div { grid-template-columns: 1fr; gap: 2px; }
  .actions .btn { flex: 1 1 auto; }
  .wa-float { display: grid; place-items: center; position: fixed; right: 16px; bottom: 16px; z-index: 20; width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
  .wa-float .icon { width: 28px; height: 28px; }
  .wa-float.is-hidden { display: none; }
  .site-footer { padding-bottom: 88px; }
}
@media (prefers-reduced-motion: no-preference) {
  .item-dialog[open] { animation: rise .18s ease-out; }
  @keyframes rise { from { opacity: 0; translate: 0 8px; } }
}
