/* AGRITRANS theme stylesheet. Tokens/components = mockups/base.css. Breakpoints: 760px, header 1199px. */

/* === Tokens === */
/* No hex outside :root. */
:root {
  /* colour: brand */
  --red: #A61F29; --red-600: #8C1A23; --red-050: #FBEFF0; --graphite: #4A4A4A;
  /* colour: neutrals */
  --ink: #17191C; --muted: #62666D; --line: #E2E4E7; --line-2: #CDD1D6; --field: #8C9299; --surface: #F4F5F6;
  --white: #FFFFFF;
  /* colour: states */
  --ok: #1D7A45; --ok-050: #EAF5EE; --err: #B42318; --err-050: #FDEDEB; --info: #1F5C99; --info-050: #EAF1F9;
  --focus: #1F5C99; --ph: #FFF1C2;
  /* colour: single-use */
  --ok-ink: #145532; --err-ink: #8A1C12; --info-ink: #17466F; --wa: #1C8C4E; --placeholder: #8B9097;
  --disabled: #9A9EA5; --wordmark: #555; --crumb-sep: #A3A7AD; --topbar-text: #D7DADF;
  /* colour: on photos (home) */
  --on-photo: rgba(255,255,255,.86); --photo-cap: rgba(23,25,28,.72);

  /* type */
  --font: 'Manrope', system-ui, sans-serif; --fs-display: 56px; --lh-display: 64px;
  --fs-h1: 44px; --lh-h1: 52px; --fs-h2: 34px; --lh-h2: 42px; --fs-h3: 24px; --lh-h3: 32px;
  --fs-h4: 19px; --lh-h4: 26px; --fs-lead: 18px; --lh-lead: 29px; --fs-body: 16px; --lh-body: 26px;
  --fs-sm: 14px; --lh-sm: 21px; --fs-xs: 12px; --lh-xs: 16px;

  /* radius */
  --r-xs: 4px; --r-sm: 6px; --r-md: 10px; --r-lg: 14px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --container: 1280px; --gutter: 80px;

  --shadow-1: 0 1px 2px rgba(23,25,28,.06), 0 1px 3px rgba(23,25,28,.08);
  --shadow-2: 0 8px 24px rgba(23,25,28,.10), 0 2px 6px rgba(23,25,28,.06);
}

@media (max-width: 760px) {
  :root { --gutter: 16px; --fs-h1: 30px; --lh-h1: 37px; --fs-h2: 25px; --lh-h2: 32px; --fs-h3: 20px; --lh-h3: 27px; --fs-lead: 16px; --lh-lead: 25px; --fs-display: 32px; --lh-display: 38px; }
}

/* === Fonts === */
/* Manrope variable, self-hosted (OFL, fonts/OFL.txt), preloaded */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(../fonts/manrope-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(../fonts/manrope-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* === Base === */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--font); font-size: var(--fs-body); line-height: var(--lh-body);
  font-feature-settings: 'locl' 0; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
img[height] { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; font-feature-settings: 'locl' 0; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 700; }
h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 700; letter-spacing: 0; }
.display { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: -0.02em; }
.lead { font-size: var(--fs-lead); line-height: var(--lh-lead); color: var(--graphite); }
.sm { font-size: var(--fs-sm); line-height: var(--lh-sm); }
.xs { font-size: var(--fs-xs); line-height: var(--lh-xs); }
.muted { color: var(--muted); }
.eyebrow { font-size: 13px; line-height: 16px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.mono { font-variant-numeric: tabular-nums; }

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

.container { max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--s9) 0; }
.section--band { background: var(--surface); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--s6); margin-bottom: var(--s7); }
.section-head p { max-width: 560px; margin-top: var(--s3); }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--lg { width: 28px; height: 28px; }

/* Placeholder marker: debug only */
.agt-debug .ph { background: var(--ph); border-radius: 3px; padding: 0 3px; box-decoration-break: clone; }

/* Visually hidden; also the skip link */
.screen-reader-text, .wpcf7 .screen-reader-response { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); border: 0; word-wrap: normal; }
.screen-reader-text:focus { clip: auto; clip-path: none; width: auto; height: auto; margin: 0; overflow: visible; z-index: 100000; top: 8px; left: 8px; padding: 12px 16px; background: var(--white); color: var(--ink); font-weight: 700; outline: 3px solid var(--focus); outline-offset: 2px; }

.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text,
.gallery-caption { font-size: 14px; line-height: 21px; color: var(--muted); margin-top: 8px; }

@media (max-width: 760px) {
  .section { padding: 56px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 28px; }
}

/* === Components === */

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: var(--r-sm); border: 1.5px solid transparent; font-weight: 700; font-size: 15px; line-height: 1; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--red-600); }
.btn--secondary { background: var(--white); color: var(--ink); border-color: var(--line-2); }
.btn--secondary:hover { border-color: var(--ink); }
.btn--ghost { background: transparent; color: var(--red); padding: 0 6px; height: auto; }
.btn--ghost:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn--wa { background: var(--white); color: var(--ink); border-color: var(--line-2); }
.btn--wa .icon { color: var(--wa); }
.btn--sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn--lg { height: 56px; padding: 0 28px; font-size: 16px; }
.btn--block { width: 100%; }
.btn[disabled] { background: var(--surface); color: var(--disabled); border-color: var(--line); cursor: not-allowed; }

/* --- Form fields --- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 700; line-height: 20px; }
.field label .opt { font-weight: 500; color: var(--muted); }
.input, .select, .textarea { width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid var(--field); border-radius: var(--r-sm); background: var(--white); font-size: 16px; }
.textarea { height: 112px; padding: 12px 14px; resize: vertical; }
/* chevron = --graphite */
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%234A4A4A' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.input::placeholder, .textarea::placeholder, form.search input::placeholder { color: var(--placeholder); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(31,92,153,.18); }
.phone-input { display: flex; flex-wrap: wrap; }
.phone-input .cc { display: flex; align-items: center; padding: 0 12px; border: 1.5px solid var(--field); border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); background: var(--surface); font-weight: 600; font-size: 15px; }
.phone-input .input { flex: 1 1 0; width: 100%; min-width: 0; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.check { position: relative; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 19px; color: var(--muted); }
.check .box { width: 20px; height: 20px; border: 1.5px solid var(--field); border-radius: var(--r-xs); flex: none; margin-top: 0; display: grid; place-items: center; }
/* label.check > input (invisible) + span.box */
.check input { position: absolute; top: 0; left: 0; width: 20px; height: 20px; margin: 0; opacity: 0; cursor: pointer; }
.check input:checked + .box, .f-opt .box.on { background: var(--red); border-color: var(--red); }
.check input:checked + .box::after, .f-opt .box.on::after { content: ''; width: 10px; height: 6px; border: 2px solid var(--white); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); }
.check input:focus-visible + .box { outline: 3px solid var(--focus); outline-offset: 2px; }
.check a { color: var(--ink); text-decoration: underline; }
.upload { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px dashed var(--line-2); border-radius: var(--r-sm); font-size: 14px; color: var(--graphite); }
.upload strong { color: var(--ink); }
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-sm); font-size: 14px; line-height: 21px; }
.alert--err { background: var(--err-050); color: var(--err-ink); }
.alert--info { background: var(--info-050); color: var(--info-ink); }
/* WooCommerce notices (Woo CSS is not loaded): the .alert look */
:is(.woocommerce-message, .woocommerce-info, .woocommerce-error) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 var(--s4); padding: 14px 16px; list-style: none; border-radius: var(--r-sm); font-size: 14px; line-height: 21px; background: var(--info-050); color: var(--info-ink); }
.woocommerce-message { background: var(--ok-050); color: var(--ok-ink); }
.woocommerce-error { flex-direction: column; align-items: flex-start; background: var(--err-050); color: var(--err-ink); }
:is(.woocommerce-message, .woocommerce-info, .woocommerce-error) a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* --- Badges and chips --- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: var(--r-xs); font-size: 12px; font-weight: 700; line-height: 1; background: var(--surface); color: var(--graphite); white-space: nowrap; }
.badge--brand { background: var(--red-050); color: var(--red); }
.badge--ok, .badge--new { background: var(--ok-050); color: var(--ok); }
.chip { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--white); white-space: nowrap; }
.chip:hover, .chip.is-on { border-color: var(--ink); }

/* --- Breadcrumbs --- */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 13px; color: var(--muted); padding: 20px 0 0; }
.crumbs a { color: var(--graphite); }
.crumbs .sep { color: var(--crumb-sep); }
.crumbs span { min-width: 0; overflow-wrap: anywhere; }

/* --- Cards --- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.p-card .media { aspect-ratio: 1 / 1; background: var(--white); position: relative; border-bottom: 1px solid var(--line); }
.p-card .media img { position: absolute; inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px); object-fit: contain; }
.p-card .badge { align-self: flex-start; }
.p-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.p-card .title { font-size: 15px; line-height: 21px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.p-card .sku { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.p-card .sku b { color: var(--ink); font-weight: 700; }
/* < 290px: stacked foot */
.p-card { container-type: inline-size; }
.p-card .foot { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.p-card .price { font-size: 13px; font-weight: 700; color: var(--graphite); }
/* Sale price (Woo's <del>/<ins>; Woo CSS is not loaded): old price muted and struck through, new price plain */
.price del { margin-right: 6px; color: var(--muted); font-size: .85em; font-weight: 600; text-decoration: line-through; }
.price ins { text-decoration: none; }
.p-card .foot .btn { max-width: 100%; }
@container (max-width: 289px) {
  .p-card .foot { flex-direction: column; align-items: flex-start; }
}

.cat-card { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 420px; display: flex; flex-direction: column; justify-content: flex-end; color: var(--white); }
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,11,13,0) 25%, rgba(10,11,13,.82) 100%); }
.cat-card .in { position: relative; z-index: 1; padding: 32px; }
.cat-card .links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.cat-card .links a, .cat-card .links span { font-size: 14px; font-weight: 600; height: 34px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: var(--r-xs); background: rgba(255,255,255,.14); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.25); }

/* --- Trust bar --- */
.trust { border-bottom: 1px solid var(--line); }
.trust .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust .t { display: flex; gap: 14px; align-items: center; padding: 26px 24px 26px 0; }
.trust .t + .t { padding-left: 24px; border-left: 1px solid var(--line); }
.trust .t .ic { width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--red-050); color: var(--red); display: grid; place-items: center; flex: none; }
.trust .t strong { display: block; font-size: 15px; line-height: 20px; }
.trust .t span { font-size: 13px; line-height: 18px; color: var(--muted); }

/* --- Logo strip --- */
.logos { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.logos .l { height: 104px; display: grid; place-items: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 26px; background: var(--white); }
.logos .l img { max-height: 48px; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: .85; transition: filter .2s, opacity .2s; }
.logos .l:hover img { filter: none; opacity: 1; }
.logos .l .wordmark { white-space: nowrap; font-weight: 800; font-size: 17px; letter-spacing: .02em; color: var(--wordmark); }
.logos--8 { grid-template-columns: repeat(8, 1fr); }
.logos--6 { grid-template-columns: repeat(6, 1fr); }
.logos--sm .l { height: 84px; }
.logos--sm .l img { max-height: 40px; }

/* --- Steps --- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.step { padding: 28px; border-radius: var(--r-md); background: var(--white); border: 1px solid var(--line); }
.step .n { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--white); display: grid; place-items: center; font-weight: 800; margin-bottom: 18px; }
/* Step and o-card titles: h3 (heading order under the section H2) at the h4 size */
.step h3, .o-card h3 { font-size: var(--fs-h4); line-height: var(--lh-h4); letter-spacing: 0; }
.step p { color: var(--graphite); margin-top: 8px; font-size: 15px; line-height: 24px; }

/* --- Tabs [data-agt-tabs]. No JS: panels stacked. Ready = initTabs(); .agt-js pre-applies it, undone after 3s. */
[data-agt-tabs] [role=tablist] { display: none; }
[data-agt-tabs-ready] [role=tablist] { display: flex; }
[data-agt-tabs-ready] [role=tabpanel]:not(.on), [role=tabpanel][hidden] { display: none; }
.agt-js [data-agt-tabs]:not([data-agt-tabs-ready]) [role=tablist] { display: flex; animation: agt-tabs-off 0s 3s forwards; }
.agt-js [data-agt-tabs]:not([data-agt-tabs-ready]) [role=tabpanel]:not(.on) { height: 0; overflow: hidden; visibility: hidden; border-top-width: 0; animation: agt-tabs-on 0s 3s forwards; }
@keyframes agt-tabs-off { to { display: none; height: 0; visibility: hidden; border-bottom-width: 0; } }
@keyframes agt-show { to { display: block; } }
@keyframes agt-tabs-on { to { height: auto; overflow: visible; visibility: visible; border-top-width: 1px; } }
[role=tab] { margin: 0 0 -1px; border: 0; border-bottom: 2px solid transparent; background: none; font-weight: 700; color: var(--muted); cursor: pointer; }
[role=tab]:hover, [role=tab].on { color: var(--ink); }
[role=tab].on { border-bottom-color: var(--red); }
[role=tab]:focus-visible { outline-offset: -3px; }

/* --- Components at 1199px: trust bar 2x2 --- */
@media (max-width: 1199px) {
  .trust .container { grid-template-columns: 1fr 1fr; }
  .trust .t:nth-child(odd) { padding-left: 0; border-left: 0; }
  .trust .t:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* --- Components at 760px --- */
@media (max-width: 760px) {
  .trust .t { padding: 16px 8px 16px 0; gap: 10px; align-items: flex-start; }
  .trust .t + .t { padding-left: 0; border-left: 0; }
  .trust .t:nth-child(n+3) { border-top: 0; }
  .trust .t .ic { width: 36px; height: 36px; }
  .trust .t strong { font-size: 14px; }
  .trust .t span { font-size: 12px; }
  .logos, .logos--8, .logos--6 { grid-template-columns: repeat(3, 1fr); }
  .logos--8 { grid-template-columns: repeat(4, 1fr); }
  .logos .l { height: 72px; padding: 14px; }
  .logos .l img { max-height: 30px; }
  .steps { grid-template-columns: 1fr; gap: 12px; }
  .cat-card { min-height: 340px; }
  .cat-card .in { padding: 22px; }
  /* Phone cards: no button */
  .p-card .body { padding: 12px; }
  .p-card .title { font-size: 14px; line-height: 19px; min-height: 38px; }
  .p-card .foot .btn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .card, .logos .l img { transition: none; }
}

/* === Forms === */
/* CF7 markup (inc/forms.php); CF7's CSS is not loaded. JS: initForms(). */

/* --- CF7 basics (replace plugin CSS) --- */
.wpcf7 .hidden-fields-container { display: none; }
.wpcf7-form-control-wrap { position: relative; display: block; min-width: 0; }
.agt-form { min-width: 0; }
.wpcf7 input[type="tel"], .wpcf7 input[type="email"] { direction: ltr; }

/* --- Layout: form.form --- */
.agt-form form.form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; padding: 40px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.agt-form .form > .full, .agt-form .form > .wpcf7-response-output { grid-column: 1 / -1; }
.agt-form .form .sep { grid-column: 1 / -1; height: 1px; background: var(--line); margin: 6px 0; }
.agt-form .form .form-submit .wpcf7-submit { width: 100%; }
.form-submit .wpcf7-submit { height: auto; min-height: 56px; padding-top: 8px; padding-bottom: 8px; line-height: 20px; white-space: normal; }
.agt-form[data-agt-context="home"] form.form { padding: 36px; gap: 18px; }

/* --- Product inquiry box (parts/inquiry-form.php) --- */
.quote { margin-top: 28px; border: 1.5px solid var(--line-2); border-radius: var(--r-lg); padding: 26px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.quote .quote-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.quote .top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.quote .price { font-size: 22px; line-height: 28px; font-weight: 800; }
.quote .price small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); font-weight: 600; }
.quote .two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.quote .alt { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quote p.xs a { color: var(--ink); text-decoration: underline; }

/* Qty stepper (initForms) */
.qty { position: relative; display: flex; flex: none; height: 48px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: var(--white); }
.qty .wpcf7-form-control-wrap { display: contents; }
.qty-btn { width: 44px; padding: 0; border: 0; background: none; font-weight: 800; font-size: 18px; color: var(--graphite); cursor: pointer; border-radius: var(--r-sm); }
.qty-btn:hover { color: var(--ink); }
.qty .input { width: 52px; height: 100%; padding: 0 4px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.qty .input::-webkit-inner-spin-button, .qty .input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty .input:focus { box-shadow: inset 0 0 0 2px var(--focus); }
.qty .wpcf7-not-valid-tip { position: absolute; top: calc(100% + 6px); right: 0; white-space: nowrap; }

/* --- Fields --- */
.field > .wpcf7-form-control-wrap { display: flex; flex-direction: column; gap: 6px; }
.phone-input .wpcf7-form-control-wrap { display: contents; }
.phone-input .wpcf7-not-valid-tip { flex-basis: 100%; margin-top: 6px; }
.phone-input:focus-within .cc { border-color: var(--focus); }

/* Error state */
.input.wpcf7-not-valid, .select.wpcf7-not-valid, .textarea.wpcf7-not-valid { border-color: var(--err); }
.wpcf7-not-valid-tip { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; line-height: 18px; color: var(--err); }
.wpcf7-not-valid-tip::before, .wpcf7-response-output::before { content: ''; flex: none; width: 16px; height: 16px; margin-top: 1px; background: currentColor; -webkit-mask: var(--agt-ic-alert) center / contain no-repeat; mask: var(--agt-ic-alert) center / contain no-repeat; }
.agt-form { --agt-ic-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.2h.01'/%3E%3C/svg%3E"); }
.agt-form, .prose { --agt-ic-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }

/* --- Topic radios as .seg --- */
fieldset.field { display: block; margin: 0; padding: 0; border: 0; min-width: 0; }
fieldset.field > legend { float: left; width: 100%; padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 700; line-height: 20px; }
fieldset.field > legend + * { clear: both; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg .wpcf7-list-item { display: block; margin: 0; }
.seg label { position: relative; height: 44px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: var(--white); font-weight: 700; font-size: 14px; cursor: pointer; }
.seg label:hover { border-color: var(--ink); }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg label:has(input:checked) { border-color: var(--red); background: var(--red-050); color: var(--red); }
.seg input:checked ~ .icon, .seg input:checked ~ .wpcf7-list-item-label { color: var(--red); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

/* --- Upload: up to 3 file inputs --- */
.upload .icon { color: var(--graphite); }
.upload-body { flex: 1; min-width: 0; }
.upload-text { line-height: 21px; }
.upload-files { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; }
.upload-file { display: flex; flex-direction: column; gap: 6px; min-width: 0; max-width: 100%; }
.upload-file input[type="file"] { max-width: 100%; font-size: 13px; color: var(--muted); cursor: pointer; }
.upload-file input[type="file"]::file-selector-button { height: 40px; margin-right: 10px; padding: 0 14px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: var(--white); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.upload-file input[type="file"]:hover::file-selector-button { border-color: var(--ink); }
.upload-file input[type="file"].wpcf7-not-valid::file-selector-button { border-color: var(--err); }
/* With CF7 JS: one empty picker at a time */
.wpcf7.js .upload-file:not(.is-filled) + .upload-file:not(.is-filled) { display: none; }

/* --- CF7 acceptance --- */
.wpcf7-acceptance .wpcf7-list-item { display: block; margin: 0; }
.wpcf7-acceptance label { position: relative; display: block; font-size: 13px; line-height: 19px; color: var(--muted); cursor: pointer; }
.wpcf7-acceptance input { position: absolute; z-index: 1; top: 0; left: 0; width: 20px; height: 20px; margin: 0; opacity: 0; cursor: pointer; }
.wpcf7-acceptance .wpcf7-list-item-label { display: block; padding-left: 30px; }
.wpcf7-acceptance .wpcf7-list-item-label::before { content: ''; position: absolute; top: 0; left: 0; width: 20px; height: 20px; border: 1.5px solid var(--field); border-radius: var(--r-xs); background: var(--white); }
.wpcf7-acceptance input:checked + .wpcf7-list-item-label::before { background: var(--red); border-color: var(--red); }
.wpcf7-acceptance input:checked + .wpcf7-list-item-label::after { content: ''; position: absolute; top: 6px; left: 5px; width: 10px; height: 6px; border: 2px solid var(--white); border-top: 0; border-right: 0; transform: rotate(-45deg); }
.wpcf7-acceptance input:focus-visible + .wpcf7-list-item-label::before { outline: 3px solid var(--focus); outline-offset: 2px; }
.wpcf7-acceptance.wpcf7-not-valid .wpcf7-list-item-label::before { border-color: var(--err); }
.wpcf7-acceptance a { color: var(--ink); text-decoration: underline; }
[data-name="consent"] .wpcf7-not-valid-tip { margin-top: 6px; }

/* --- Submit + spinner --- */
.form-submit { position: relative; }
.wpcf7-submit:disabled { cursor: not-allowed; }
form.submitting .wpcf7-submit { background: var(--red-600); cursor: progress; }
.wpcf7-spinner { visibility: hidden; position: absolute; top: 50%; right: 20px; width: 20px; height: 20px; margin-top: -10px; border: 2px solid var(--white); border-right-color: transparent; border-radius: 50%; animation: agt-spin .8s linear infinite; pointer-events: none; }
form.submitting .wpcf7-spinner { visibility: visible; }
@keyframes agt-spin { to { transform: rotate(360deg); } }

/* --- Response as .alert --- */
.wpcf7-response-output { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-sm); font-size: 14px; line-height: 21px; background: var(--err-050); color: var(--err-ink); }
.wpcf7-response-output::before { width: 20px; height: 20px; margin-top: 0; }
.wpcf7-response-output:empty, form.init .wpcf7-response-output, form.submitting .wpcf7-response-output, form.resetting .wpcf7-response-output { display: none; }
form.sent .wpcf7-response-output { background: var(--ok-050); color: var(--ok-ink); font-weight: 600; }
form.sent .wpcf7-response-output::before { -webkit-mask-image: var(--agt-ic-check); mask-image: var(--agt-ic-check); }

/* --- Fallback without CF7 --- */
.agt-form-fallback { display: grid; gap: 16px; }
.direct { display: grid; gap: 12px; margin-top: 32px; }
.agt-form-fallback .direct { margin-top: 0; }
.direct a { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); }
.direct a:hover { border-color: var(--line-2); }
.direct a .ic { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--surface); display: grid; place-items: center; }
.direct a small { display: block; color: var(--muted); font-size: 13px; }
.direct a strong { font-size: 18px; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .agt-form form.form, .agt-form[data-agt-context="home"] form.form { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 16px; }
  .quote { padding: 18px; }
  .quote .two { grid-template-columns: minmax(0, 1fr); }
  .quote .alt .btn { min-width: 0; padding: 0 12px; gap: 8px; }
  .form-submit .wpcf7-submit { padding-left: 16px; padding-right: 16px; }
  .seg label { padding: 0 12px; font-size: 13px; }
  .upload-file input[type="file"]::file-selector-button { height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .wpcf7-spinner { animation: none; border-right-color: var(--white); opacity: .7; }
}

/* === Header === */
/* header.php, parts/mega-menu.php, parts/mobile-drawer.php, .m-bar in footer.php. JS: initMenu, initDrawer.
   ≤1199px (DESKTOP_MQ in main.js): mobile header; .m-bar ≤760px. */

/* --- Topbar --- */
.topbar { background: var(--ink); color: var(--topbar-text); font-size: 13px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 40px; }
.topbar .tb-r { display: flex; align-items: center; gap: 24px; }
.topbar .tb-i { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.topbar .tb-i .icon { width: 16px; height: 16px; }
.topbar a.tb-i { color: var(--white); font-weight: 700; }

/* --- Row 1 --- */
.header { background: var(--white); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.header .row1 { display: flex; align-items: center; gap: 32px; height: 88px; }
.logo img { height: 60px; width: auto; }
/* form.search: body.search exists */
form.search { flex: 1; display: flex; height: 50px; border: 1.5px solid var(--field); border-radius: var(--r-sm); overflow: hidden; background: var(--white); }
form.search .icon { margin: 0 4px 0 14px; align-self: center; color: var(--muted); }
form.search input { flex: 1; border: 0; padding: 0 10px; font-size: 15px; min-width: 0; text-overflow: ellipsis; outline: none; background: transparent; -webkit-appearance: none; appearance: none; }
form.search button { display: flex; align-items: center; border: 0; background: var(--ink); color: var(--white); font-weight: 700; padding: 0 22px; font-size: 14px; cursor: pointer; }
form.search button .icon { margin: 0; color: currentColor; }
/* Focus ring on the field */
form.search:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(31,92,153,.18); }
form.search button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.header .m-search { display: none; }
.h-actions { display: flex; align-items: center; gap: 12px; }
.h-phone { display: flex; flex-direction: column; line-height: 1.15; }
.h-phone small { font-size: 12px; color: var(--muted); font-weight: 600; }
.h-phone strong { font-size: 17px; font-weight: 800; white-space: nowrap; }
.h-phone-wrap { display: flex; align-items: center; gap: 10px; padding-right: 8px; }
.h-phone-wrap .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--red-050); color: var(--red); display: grid; place-items: center; }
.burger, .m-call { display: none; }
.burger, .m-call, .d-close { place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border-radius: var(--r-sm); border: 1.5px solid var(--line-2); background: var(--white); color: var(--ink); cursor: pointer; }
.d-close { display: grid; }

/* --- Main navigation --- */
/* Nav shrinks 1340→1200px */
.nav { --nav-fs: clamp(14px, calc(14px + (100vw - 1200px) / 140), 15px); --nav-px: clamp(8px, calc(8px + (100vw - 1200px) * 6 / 140), 14px); }
.nav { display: flex; align-items: stretch; gap: 4px; height: 52px; border-top: 1px solid var(--line); }
.nav > a, .nav > button { display: inline-flex; align-items: center; gap: 6px; padding: 0 var(--nav-px); font-size: var(--nav-fs); font-weight: 700; background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.nav > a:first-child, .nav > button:first-child { padding-left: 0; }
.nav > button.is-open, .nav > .is-current { border-bottom-color: var(--red); }
.nav > button.is-open { color: var(--red); }
.nav > a .icon, .nav > button .icon { width: 16px; height: 16px; }
.nav .spacer { flex: 1; }
.nav .nav-aux { font-weight: 600; color: var(--graphite); font-size: 14px; }

/* --- Mega menu (.is-open) --- */
.mega { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 24px 40px rgba(23,25,28,.14); }
.mega.is-open { display: block; }
.mega .container { display: grid; grid-template-columns: 0.9fr 1.1fr 1.25fr 300px; gap: 40px; padding-top: 36px; padding-bottom: 40px; }
.mega .mega-h { margin: 0 0 14px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega li a { display: flex; justify-content: space-between; padding: 7px 0; font-size: 15px; font-weight: 600; }
.mega li a:hover, .mega .mega-h a:hover { color: var(--red); }
.mega li a span { color: var(--muted); font-weight: 500; font-size: 13px; }
.mega .brands-2 { columns: 2; column-gap: 28px; }
.mega .brands-2 a { white-space: nowrap; gap: 10px; }
.mega .mega-card { background: var(--surface); border-radius: var(--r-md); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.mega .mega-card p { font-size: 14px; line-height: 21px; color: var(--graphite); }
.mega .mega-title { font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 700; text-wrap: balance; }
.mega .mega-phone { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.mega-all { grid-column: 1 / 4; border-top: 1px solid var(--line); padding-top: 18px; display: flex; gap: 28px; font-size: 14px; font-weight: 700; }
.mega-all a { display: inline-flex; gap: 6px; align-items: center; color: var(--red); }
.scrim { display: none; position: fixed; inset: 0; background: rgba(23,25,28,.35); z-index: 10; }
.scrim.is-open { display: block; }

/* --- Drawer --- */
.drawer { position: fixed; inset: 0; z-index: 1001; background: var(--white); overflow: auto; overscroll-behavior: contain; }
.drawer .d-head { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 var(--gutter); border-bottom: 1px solid var(--line); }
.drawer .d-head img { height: 40px; width: auto; }
.drawer .d-body { padding: 8px var(--gutter) 120px; }
.drawer .d-search { display: flex; height: 46px; margin: 12px 0 4px; }
.drawer .acc { border-bottom: 1px solid var(--line); }
.drawer .acc > a, .drawer .acc > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; font-size: 17px; font-weight: 700; }
.drawer .acc > summary { list-style: none; cursor: pointer; }
.drawer .acc > summary::-webkit-details-marker { display: none; }
.drawer .acc > summary .icon { transition: transform .15s; }
.drawer .acc[open] > summary .icon { transform: rotate(90deg); }
.drawer .acc ul { list-style: none; margin: 0 0 14px; padding: 0; }
.drawer .acc li a { display: flex; justify-content: space-between; padding: 9px 0 9px 12px; font-size: 15px; font-weight: 600; color: var(--graphite); border-left: 2px solid var(--line); }
.drawer .acc li a span { color: var(--muted); font-weight: 500; font-size: 13px; }
.drawer .d-contact { margin-top: 24px; background: var(--surface); border-radius: var(--r-md); padding: 18px; display: grid; gap: 10px; }
/* Scroll lock (initDrawer) */
.agt-locked, .agt-locked body { overflow: hidden; }

/* --- Sticky mobile bar (≤760px) --- */
.m-bar { display: none; }

@media (max-width: 1199px) {
  .topbar { display: none; }
  .header .row1 { height: 64px; gap: 12px; }
  .logo img { height: 40px; }
  .row1 > form.search, .h-phone-wrap, .nav, .scrim.is-open { display: none; }
  .h-actions { margin-left: auto; }
  .h-actions .btn { height: 44px; }
  .burger, .m-call { display: grid; }
  .m-call { color: var(--red); border-color: var(--red-050); background: var(--red-050); }
  .header .m-search { display: flex; margin: 0 0 12px; height: 46px; }
  .header .m-search button { padding: 0 12px; }
}

@media (max-width: 760px) {
  /* Clear of the fixed bar (updateOffset) */
  html { scroll-padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .h-actions { display: none; }
  .m-call { margin-left: auto; }
  .m-bar { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--line); z-index: 30; box-shadow: 0 -6px 18px rgba(23,25,28,.08); }
  .m-bar .btn { height: 46px; padding: 0 10px; font-size: 14px; gap: 6px; }
  /* WCAG 2.4.11 */
  .agt-consent-open .m-bar { visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .drawer .acc > summary .icon { transition: none; }
}

/* === Footer === */
.footer { background: var(--surface); border-top: 1px solid var(--line); padding: 64px 0 0; font-size: 14px; line-height: 22px; }
.footer .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1.2fr; gap: 40px; }
.footer .cols > * { min-width: 0; overflow-wrap: break-word; }
.footer .f-logo { height: 64px; width: auto; margin-bottom: 16px; }
.footer .f-about { max-width: 300px; }
.footer .f-h { margin: 0 0 14px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { padding: 4px 0; }
.footer li a:hover { color: var(--red); }
.footer .ci { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; }
.footer .ci .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--graphite); }
.footer .ci span { min-width: 0; }
.footer .legal { margin-top: 48px; border-top: 1px solid var(--line); padding: 20px 0 28px; display: flex; justify-content: space-between; gap: 10px 24px; color: var(--muted); font-size: 13px; }
.footer .legal .links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer .legal li { padding: 0; }
.footer .legal button { padding: 0; border: 0; background: none; color: inherit; font: inherit; line-height: inherit; cursor: pointer; }
.footer .legal button:hover { color: var(--red); }

@media (max-width: 1199px) {
  .footer .cols { grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
  .footer .cols > :last-child { grid-column: span 2; }
}

@media (max-width: 760px) {
  /* Room for .m-bar (updateOffset) */
  .footer { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .footer .cols { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .footer .cols > :first-child, .footer .cols > :last-child { grid-column: 1 / -1; }
  .footer .legal { flex-direction: column; gap: 10px; }
  .footer .legal .links { gap: 0 20px; }
  /* Tap targets >= 44px */
  .footer li { padding: 0; }
  .footer li a, .footer .legal button { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 0; }
  .footer a.ci { align-items: center; min-height: 44px; }
  .footer a.ci .icon { margin-top: 0; }
}

/* === Prose === */
/* Editor content (the_content) on page.php and the landing/service/grain/insurance templates. Rules reach only the
   flow parents (.prose, core group, core column) and their direct children, so components inside the content
   (e.g. the dev /styleguide/ page, CF7 forms) keep their own styles. */
.prose { max-width: 860px; color: var(--graphite); }
.prose:has(> .section) { max-width: none; } /* /styleguide/ */
.prose > * + * { margin-top: var(--s4); }
.prose > * + :is(h2, .wp-block-group, .wp-block-columns) { margin-top: var(--s7); }
.prose > * + h3 { margin-top: var(--s6); }
.prose > :is(h2, h3) + * { margin-top: var(--s3); }
.prose .wp-block-group > * + *, .prose .wp-block-column > * + * { margin-top: var(--s3); margin-block-start: var(--s3); }
.prose .wp-block-group > * + :is(ul, .wp-block-columns) { margin-top: var(--s5); margin-block-start: var(--s5); }
:is(.prose, .prose .wp-block-group, .prose .wp-block-column) > :is(h2, h3, h4) { color: var(--ink); }
:is(.prose, .prose .wp-block-group, .prose .wp-block-column) > h2 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
:is(.prose, .prose .wp-block-group) > h3, .prose .wp-block-column > :is(h2, h3) { font-size: var(--fs-h4); line-height: var(--lh-h4); letter-spacing: 0; } /* column card titles: h4 size at any level */
:is(.prose, .prose .wp-block-group, .prose .wp-block-column) > ul { list-style: none; margin-bottom: 0; padding: 0; display: grid; gap: 14px; }
:is(.prose, .prose .wp-block-group, .prose .wp-block-column) > ul > li { position: relative; padding-left: 32px; color: var(--ink); }
:is(.prose, .prose .wp-block-group, .prose .wp-block-column) > ul > li::before { content: ''; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; background: var(--ok); -webkit-mask: var(--agt-ic-check) center / contain no-repeat; mask: var(--agt-ic-check) center / contain no-repeat; }
:is(.prose, .prose .wp-block-group, .prose .wp-block-column) > ol { margin-bottom: 0; padding-left: var(--s5); display: grid; gap: var(--s2); color: var(--ink); }
:is(.prose, .prose .wp-block-group, .prose .wp-block-column) > :is(p, ul, ol, h2, h3, h4) a:not([class]) { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
:is(.prose, .prose .wp-block-group, .prose .wp-block-column) > :is(p, ul, ol, h2, h3, h4) a:not([class]):hover { text-decoration: none; }
.prose .wp-block-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 0; }
.prose .wp-block-column { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); }
.prose .wp-block-column > p { font-size: 15px; line-height: 24px; }
.prose > .wp-block-image img, .prose > figure img { border-radius: var(--r-md); }

@media (max-width: 760px) {
  .prose > * + :is(h2, .wp-block-group, .wp-block-columns) { margin-top: 40px; }
  .prose .wp-block-columns { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .prose .wp-block-column { padding: 18px; }
}

/* === Pages === */

/* === Home === */
/* front-page.php = mockups/home.html */

.eyebrow + h2 { margin-top: 10px; }
.service h2 + .lead, .inquiry h2 + .lead { margin-top: 16px; }
.section--tight { padding-top: 72px; padding-bottom: 72px; }
.section--tight-top { padding-top: 72px; }
.section--tight-bottom { padding-bottom: 72px; }
.logos-label { margin: 36px 0 14px; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.agt-form [hidden] { display: none; }

/* --- Hero --- */
.hero { padding: 56px 0 64px; }
.hero .container { display: grid; grid-template-columns: minmax(0, 1fr) 560px; gap: 64px; align-items: center; }
.hero h1 { font-size: 52px; line-height: 60px; margin: 16px 0 20px; }
.hero .lead { max-width: 600px; }

.finder { margin-top: 32px; border: 1.5px solid var(--line-2); border-radius: var(--r-md); background: var(--white); box-shadow: var(--shadow-1); }
.finder .tabs { border-bottom: 1px solid var(--line); }
.finder .tabs button { display: flex; gap: 8px; align-items: center; padding: 14px 20px; font-size: 14px; line-height: 20px; }
.finder .row { display: flex; gap: 10px; padding: 14px; }
.finder .input, .finder .select { flex: 1 1 0; min-width: 0; height: 52px; font-size: 16px; }
.finder .select + .input { flex-grow: 1.4; }
.finder .btn { flex: none; height: 52px; }
.finder .panel + .panel { border-top: 1px solid var(--line); }
.finder[data-agt-tabs-ready] .panel + .panel { border-top: 0; }

.popular { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.popular .sm { color: var(--muted); font-weight: 600; margin-right: 4px; }

.hero-media { position: relative; }
.hero-media .photo { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 4.4; background: var(--surface); }
.hero-media .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% center; }
.hero-media .call { position: absolute; left: -40px; bottom: 32px; background: var(--white); border-radius: var(--r-md); box-shadow: var(--shadow-2); padding: 18px 20px; display: flex; gap: 14px; align-items: center; }
.hero-media .call .ic { width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--red); color: var(--white); display: grid; place-items: center; }
.hero-media .call small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); font-weight: 600; }
.hero-media .call strong { font-size: 20px; line-height: 26px; font-weight: 800; white-space: nowrap; }
.hero-media .cap { position: absolute; right: 16px; top: 16px; background: var(--photo-cap); color: var(--white); font-size: 12px; line-height: 16px; font-weight: 600; padding: 6px 10px; border-radius: var(--r-xs); }

/* --- Sectors --- */
.sectors { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.sectors .cat-card { min-height: 460px; }
.sectors h3 { font-size: 30px; line-height: 36px; font-weight: 800; }
.sectors p { color: var(--on-photo); margin-top: 8px; max-width: 460px; }

/* --- Products --- */
.prod-grid, .rel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }

/* --- Service --- */
.service { display: grid; grid-template-columns: 1.05fr 1fr; gap: 72px; align-items: center; }
.service > * { min-width: 0; }
.service .photos { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; height: 520px; }
.service .photos img { width: 100%; height: 100%; min-height: 0; object-fit: cover; border-radius: var(--r-md); }
.service .photos img:first-child { grid-row: 1 / 3; }
.service .photos img:only-child { grid-column: 1 / -1; }
.service .photos img:first-child:nth-last-child(2), .service .photos img:first-child:nth-last-child(2) ~ img { grid-row: 1 / 3; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks li .icon { color: var(--ok); margin-top: 3px; }
.note { margin-top: 24px; padding: 14px 16px; border-left: 3px solid var(--red); background: var(--surface); font-size: 14px; line-height: 21px; border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* --- Other services --- */
.other { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.o-card { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.o-card .ic { width: 52px; height: 52px; border-radius: var(--r-md); background: var(--surface); display: grid; place-items: center; color: var(--ink); }
.o-card p { color: var(--graphite); font-size: 15px; line-height: 24px; }
.o-card .btn--ghost { margin-top: auto; align-self: flex-start; padding-left: 0; white-space: normal; text-align: left; line-height: 20px; }
.o-card .mini-logos { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.o-card .mini-logos img { width: auto; height: 18px; filter: grayscale(1); opacity: .7; }

/* --- Proof --- */
.proof { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.proof--stats-1.proof--quote { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.proof--stats-2.proof--quote { grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 1.6fr); }
.proof--stats-3.proof--quote { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr); }
.proof > div { padding: 32px; }
.proof > div + div { border-left: 1px solid var(--line); }
.proof .num { font-size: 44px; line-height: 48px; font-weight: 800; letter-spacing: -.02em; }
.proof .num + span { display: block; margin-top: 6px; color: var(--graphite); font-size: 15px; }
.proof blockquote { margin: 0; font-size: 17px; line-height: 27px; font-weight: 600; }
.proof cite { display: block; margin-top: 14px; font-style: normal; font-size: 14px; color: var(--muted); }
.proof cite b { color: var(--ink); }
.proof:not(.proof--quote) > div { text-align: center; }
.proof--stats-0 blockquote { max-width: 860px; }

/* --- Inquiry --- */
.inquiry { display: grid; grid-template-columns: minmax(0, 1fr) 640px; gap: 72px; }

@media (max-width: 1199px) {
  .hero .container { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero h1 { font-size: 44px; line-height: 52px; }
  .hero .lead { max-width: 720px; }
  .hero-media .photo { aspect-ratio: 21 / 9; }
  .hero-media .call { left: 16px; bottom: 16px; }
  .prod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .service { gap: 48px; }
  .service .photos { height: 440px; }
  .proof > div { padding: 24px; }
  .proof .num { font-size: 36px; line-height: 42px; }
  .inquiry { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

@media (max-width: 960px) {
  .hero-media .photo { aspect-ratio: 16 / 9; }
  .sectors .cat-card { min-height: 400px; }
  .sectors h3 { font-size: 26px; line-height: 32px; }
  .logos--8 { grid-template-columns: repeat(4, 1fr); }
  .logos--6 { grid-template-columns: repeat(3, 1fr); }
  .service { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .service .photos { height: 400px; }
  .other { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .proof { grid-auto-flow: row; }
  .proof.proof--stats-1 { grid-template-columns: minmax(0, 1fr); }
  .proof.proof--stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof.proof--stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .proof--quote > div:last-child { grid-column: 1 / -1; }
  .proof--quote:not(.proof--stats-0) > div:last-child { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .hero { padding: 20px 0 40px; }
  .hero .container { gap: 28px; }
  .hero h1 { font-size: 31px; line-height: 38px; margin: 12px 0 14px; }
  .finder { margin-top: 22px; }
  .finder .tabs button { flex: 1 1 auto; justify-content: center; min-height: 44px; padding: 12px 14px; font-size: 13px; }
  .finder .row { flex-direction: column; padding: 12px; }
  .finder .input, .finder .select { flex: none; width: 100%; }
  .popular .chip { position: relative; height: 32px; font-size: 13px; padding: 0 12px; }
  .popular .chip::after { content: ''; position: absolute; inset: -6px 0; }
  .hero-media .photo { aspect-ratio: 16 / 10; }
  .hero-media .cap { display: none; }
  .hero-media .call { left: 12px; bottom: 12px; padding: 12px 14px; }
  .hero-media .call .ic { width: 40px; height: 40px; }
  .hero-media .call strong { font-size: 17px; line-height: 22px; }
  .sectors { grid-template-columns: 1fr; gap: 14px; }
  .sectors .cat-card { min-height: 360px; }
  .sectors h3 { font-size: 24px; line-height: 30px; }
  .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .service { gap: 28px; }
  .service .photos { height: 300px; }
  .other { gap: 12px; }
  .proof > div { padding: 18px 12px; }
  .proof .num { font-size: 28px; line-height: 32px; }
  .proof .num + span { font-size: 13px; line-height: 18px; }
  .proof--quote > div:last-child { padding: 20px; }
  .inquiry { gap: 28px; }
}

/* === Catalogue === */
/* archive-product.php = mockups/category.html. JS: initFilters, initView. ≤960px: filters collapse (FILTERS_MQ). */

/* --- Head --- */
.cat-head { padding: 12px 0 36px; border-bottom: 1px solid var(--line); }
.cat-head .container { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 64px; align-items: end; }
.cat-head h1 { margin: 18px 0 14px; }
.cat-head .lead { max-width: 720px; }
.cat-head .lead p + p { margin-top: 8px; }
.help-card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; display: grid; gap: 10px; }
.help-card strong { font-size: 16px; }
.help-card p { font-size: 14px; line-height: 21px; color: var(--graphite); }
.help-tel { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.subcats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }

/* --- Filters --- */
.layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px; padding-top: 36px; padding-bottom: 96px; }
.filters summary, .faq summary { list-style: none; cursor: pointer; }
.filters summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
.filters .f-toggle { display: none; }
.f-group { border-bottom: 1px solid var(--line); padding: 18px 0; }
.f-group:first-of-type { padding-top: 0; }
.f-group:last-child { border: 0; }
.f-group h2 { margin: 0 0 12px; font-size: 14px; line-height: 21px; letter-spacing: 0; }
.f-sub { margin: 8px 0 2px; font-size: 12px; font-weight: 700; color: var(--muted); }
.f-opt { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; line-height: 21px; font-weight: 600; }
a.f-opt:hover { color: var(--red); }
.f-opt .box { width: 18px; height: 18px; border: 1.5px solid var(--line-2); border-radius: var(--r-xs); flex: none; display: grid; place-items: center; }
.f-opt .n { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 13px; }
.f-opt.dis { color: var(--crumb-sep); }
.f-more > summary { padding: 6px 0 0; }
.f-group form.search { height: 44px; }

/* --- Toolbar --- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 20px; }
.toolbar .applied, .toolbar .r, .sort { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar .r { gap: 12px; }
.toolbar .chip { height: 32px; font-size: 13px; gap: 6px; }
.toolbar .chip .icon { width: 14px; height: 14px; }
.toolbar .select { height: 40px; width: 220px; font-size: 14px; }
.sort .btn { flex: none; }
.view { display: flex; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
.view[hidden] { display: none; }
.agt-js .view[hidden] { display: flex; visibility: hidden; }
.view button { width: 40px; height: 37px; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.view button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.view button:focus-visible { outline-offset: -3px; }

/* --- Grid, CTA, pager, empty --- */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.p-grid.is-list, .agt-list .p-grid[data-agt-grid] { grid-template-columns: minmax(0, 1fr); gap: 12px; }
:is(.is-list, .agt-list [data-agt-grid]) .p-card { flex-direction: row; }
:is(.is-list, .agt-list [data-agt-grid]) .p-card .media { flex: none; width: 160px; border: 0; border-right: 1px solid var(--line); }
:is(.is-list, .agt-list [data-agt-grid]) .p-card .body { min-width: 0; }
:is(.is-list, .agt-list [data-agt-grid]) .p-card .title { min-height: 0; }
.inline-cta { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--ink); color: var(--white); border-radius: var(--r-md); padding: 26px 30px; }
.inline-cta h2, .tab-body h2 { font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 700; letter-spacing: 0; }
.inline-cta p { color: var(--topbar-text); font-size: 15px; margin-top: 4px; }
.inline-cta .btns, .cat-empty .btns { display: flex; flex-wrap: wrap; gap: 10px; }
.inline-cta .btns { flex: none; }
.inline-cta .btn--secondary { background: transparent; color: var(--white); border-color: var(--graphite); }
.inline-cta .btn--secondary:hover { border-color: var(--white); }
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 40px; }
.pager a, .pager .dots { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 12px; font-weight: 700; font-size: 14px; }
.pager a { border: 1.5px solid var(--line); border-radius: var(--r-sm); }
.pager a:hover { border-color: var(--ink); }
.pager a.on { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pager .prev .icon { transform: scaleX(-1); }
.cat-empty { padding: 40px; border-radius: var(--r-md); background: var(--surface); }
.cat-empty h2 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
.cat-empty p { max-width: 600px; margin: 8px 0 24px; color: var(--graphite); }

/* --- SEO + FAQ --- */
.seo { border-top: 1px solid var(--line); padding: 56px 0 72px; }
.seo .container { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 64px; }
.seo .container > :only-child { max-width: 860px; }
.seo h2, .related h2 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 700; }
.seo p { color: var(--graphite); margin-top: 12px; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { display: flex; justify-content: space-between; gap: 16px; font-weight: 700; }
.faq [open] .icon { transform: rotate(180deg); }
.faq details p { font-size: 15px; line-height: 24px; }

@media (max-width: 1199px) {
  .cat-head .container { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
  .layout { grid-template-columns: 240px minmax(0, 1fr); gap: 32px; }
  .p-grid, .rel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .cat-head .container, .layout, .seo .container { grid-template-columns: minmax(0, 1fr); grid-auto-flow: row; gap: 24px; }
  .help-card { max-width: 480px; }
  .filters .f-toggle { display: flex; width: 100%; }
  .f-panel[open] > .f-toggle { margin-bottom: 18px; }
  /* CLS: looks collapsed from the first paint until initFilters() closes it ([data-agt-ready]); shown after 3s if JS fails */
  .agt-js .f-panel:not([data-agt-ready]) > .f-toggle { margin-bottom: 0; }
  .agt-js .f-panel:not([data-agt-ready]) > :not(summary) { display: none; animation: agt-show 0s 3s forwards; }
}
@media (max-width: 760px) {
  .cat-head { padding: 0 0 24px; }
  .cat-head h1 { margin: 12px 0 10px; }
  .help-tel { min-height: 44px; }
  .subcats { margin-top: 16px; }
  .subcats .chip, .toolbar .chip { position: relative; }
  .subcats .chip::after, .toolbar .chip::after { content: ''; position: absolute; inset: -6px 0; }
  .layout { gap: 16px; padding-top: 20px; padding-bottom: 56px; }
  .f-opt { padding: 11px 0; }
  .toolbar .r { display: contents; }
  .toolbar .applied { flex: 1 1 0; min-width: 0; }
  .toolbar .applied > strong { line-height: 43px; }
  .view { order: 1; align-self: flex-start; }
  .sort { order: 2; flex: 1 1 100%; flex-wrap: nowrap; }
  .toolbar .select { flex: 1; min-width: 0; height: 44px; font-size: 16px; }
  .sort .btn { height: 44px; }
  .view { border: 0; box-shadow: inset 0 0 0 1.5px var(--line-2); }
  .view button { width: 45.5px; height: 44px; }
  .view button[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--line-2); }
  .p-grid, .rel { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  :is(.is-list, .agt-list [data-agt-grid]) .p-card .media { width: 104px; }
  .inline-cta { flex-direction: column; align-items: stretch; padding: 20px; gap: 16px; }
  .pager a, .pager .dots { min-width: 44px; height: 44px; }
  .cat-empty { padding: 24px 20px; }
  .seo { padding: 40px 0 48px; }
}

/* === Product === */
/* single-product.php = mockups/product.html */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) 520px; gap: 64px; padding: 24px 0 72px; }
.gallery { display: flex; gap: 16px; align-items: flex-start; }
.thumbs { flex: none; display: grid; gap: 10px; width: 88px; }
.thumbs button { aspect-ratio: 1; display: grid; place-items: center; padding: 8px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--white); cursor: pointer; }
.thumbs .on { border-color: var(--ink); }
.thumbs img, .lightbox img { max-height: 100%; object-fit: contain; }
.main-img { position: relative; flex: 1; min-width: 0; aspect-ratio: 1 / .86; padding: 48px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.main-img img { position: absolute; inset: 0; width: 100%; height: 100%; padding: inherit; object-fit: contain; }
.zoom { position: absolute; right: 16px; bottom: 16px; }
.zoom .icon { width: 14px; height: 14px; }
.info h1 { font-size: var(--fs-h2); line-height: var(--lh-h2); margin: 14px 0 18px; }
.meta { display: grid; grid-template-columns: 150px minmax(0, 1fr); margin: 0; border-top: 1px solid var(--line); }
.meta > *, .spec :is(th, td) { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; text-align: left; vertical-align: top; }
.meta dt, .spec th { color: var(--muted); font-weight: 600; }
.meta dd, .spec td { font-weight: 700; }
.meta a { text-decoration: underline; text-underline-offset: 3px; }
.xref { display: flex; flex-wrap: wrap; gap: 6px; }
.xref .badge { height: 26px; font-size: 13px; background: var(--white); border: 1px solid var(--line-2); color: var(--ink); font-variant-numeric: tabular-nums; }
.assure { display: grid; gap: 10px; margin-top: 20px; }
.assure div { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--graphite); font-weight: 600; }
.assure .icon { color: var(--red); }
.tabs-h { gap: 32px; border-bottom: 1px solid var(--line); }
.tabs-h button { padding: 16px 0; border-bottom-width: 3px; }
.tab-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: start; padding-top: 36px; }
.tab-text { margin-top: 12px; color: var(--graphite); }
.tab-text > * + * { margin-top: 12px; }
.spec { width: 100%; border-collapse: collapse; }
.spec th { width: 45%; }
.related { padding: 72px 0 96px; }
.related .section-head { margin-bottom: 28px; }

/* Lightbox */
.lightbox { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 64px 16px 16px; border: 0; background: var(--white); }
.lightbox[open] { display: grid; grid-template: minmax(0, 1fr) auto / 1fr auto auto auto 1fr; gap: 16px; align-items: center; }
.lightbox img { grid-column: 1 / -1; justify-self: center; }
.lb-prev, .lb-next, .lb-count { grid-row: 2; }
.lb-prev { grid-column: 2; transform: scaleX(-1); }
.lb-count { grid-column: 3; padding: 0 8px; font-weight: 700; }
.lb-next { grid-column: 4; }
.lb-close { position: absolute; top: 12px; right: 12px; }

@media (max-width: 1199px) {
  .pdp { grid-template-columns: minmax(0, 1fr) 420px; gap: 40px; }
  .main-img { padding: 24px; }
}
@media (max-width: 960px) {
  .pdp, .tab-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .pdp { gap: 24px; padding: 12px 0 40px; }
  .gallery { flex-direction: column; align-items: stretch; }
  .thumbs { order: 2; width: auto; grid-template-columns: repeat(4, 64px); }
  .main-img { padding: 20px; }
  .zoom::after { content: ''; position: absolute; inset: -10px; }
  .meta { grid-template-columns: 120px minmax(0, 1fr); }
  .tabs-h { gap: 20px; overflow-x: auto; }
  .tabs-h button { font-size: 14px; white-space: nowrap; }
  .tab-body { gap: 24px; }
}

/* === Contact === */
/* template-contact.php = mockups/contact.html. The card is .c-main (form + info note), so the note sits inside it as in the mockup. */
.c-head, .page-head { padding: 8px 0 40px; }
.c-head h1, .page-head h1 { margin: 18px 0 14px; }
.c-head .lead, .page-head .lead { max-width: 720px; }
.c-head .lead p + p { margin-top: 8px; }

.c-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 56px; align-items: start; padding-bottom: 96px; }
.c-main { display: grid; gap: 20px; min-width: 0; padding: 40px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); scroll-margin-top: 24px; }
.c-main .agt-form form.form { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.c-note .icon { margin-top: 1px; }

/* --- Side panels --- */
.side { display: grid; gap: 20px; align-content: start; min-width: 0; }
.side .panel { border: 1px solid var(--line); border-radius: var(--r-md); padding: 26px; }
.side .panel h2 { margin-bottom: 14px; font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 700; letter-spacing: 0; }
.c-row { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.side .panel h2 + .c-row { border-top: 0; padding-top: 0; }
.c-row > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.c-row .ic { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; flex: none; }
.c-row small { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.c-row strong { font-size: 16px; }
a.c-row:hover strong { color: var(--red); }
.ic--red { color: var(--red); }
.ic--wa { color: var(--wa); }
.prep { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.prep li { display: flex; gap: 10px; font-size: 15px; line-height: 22px; }
.prep .icon { color: var(--ok); margin-top: 1px; }
.side .dark { background: var(--ink); color: var(--white); border: 0; }
.side .dark p { color: var(--line-2); font-size: 14px; line-height: 21px; margin: 8px 0 16px; }

@media (max-width: 1199px) {
  .c-wrap { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; }
  .c-main { padding: 32px; }
}

@media (max-width: 960px) {
  .c-wrap { grid-template-columns: minmax(0, 1fr); }
  .side { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

@media (max-width: 760px) {
  .c-head, .page-head { padding: 0 0 24px; }
  .c-wrap { gap: 20px; padding-bottom: 48px; }
  .c-main { padding: 20px; gap: 16px; }
  .side { grid-template-columns: minmax(0, 1fr); }
  .side .panel { padding: 20px; }
}

/* === Landing === */
/* template-landing.php (Google Ads pages). No mockup: home hero + .direct, form card like .c-main, .ticks-style lists, o-cards, .inline-cta. */
.l-crumbs + .l-hero { padding-top: 32px; }
/* DOM order = visual order: intro, form, direct. Desktop puts direct under the lead, form spans both rows. */
.l-hero .container { grid-template-areas: "intro form" "direct form"; grid-template-rows: auto 1fr; row-gap: 0; align-items: start; }
.l-intro { grid-area: intro; min-width: 0; }
.l-hero .l-form { grid-area: form; }
.l-hero .l-direct { grid-area: direct; }
.l-hero h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
.l-direct { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 600px; }
.l-direct a { min-height: 44px; }
.l-form { min-width: 0; padding: 36px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); scroll-margin-top: 24px; }
.l-form h2 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
.l-form-note { margin-top: 6px; color: var(--graphite); font-size: 15px; line-height: 23px; }
.l-form .agt-form { margin-top: 24px; }
.l-form .agt-form form.form { padding: 0; gap: 18px; border: 0; border-radius: 0; box-shadow: none; }
.l-form .textarea { height: 88px; }

/* --- Benefits + CTA --- */
.l-benefits .o-card h3 { font-size: var(--fs-h4); line-height: var(--lh-h4); letter-spacing: 0; }
.l-benefits + .l-cta { padding-top: 0; }
.l-cta .inline-cta h2 { text-wrap: balance; }
.l-cta-tel { color: var(--white); font-weight: 700; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.l-cta-tel:hover { text-decoration: none; }
.l-cta .inline-cta :focus-visible { outline-color: var(--white); }

@media (max-width: 1199px) {
  .l-hero .container { grid-template-areas: "intro" "form" "direct"; grid-template-rows: none; row-gap: 40px; }
  .l-hero .l-direct { margin-top: 0; }
  .l-form { max-width: 720px; }
}

@media (max-width: 760px) {
  /* Plain stacking in DOM order: lead, form, phone/WA */
  .l-crumbs + .l-hero { padding-top: 16px; }
  .l-hero .container { row-gap: 16px; }
  .l-hero .eyebrow { display: block; }
  .l-hero h1 { margin: 10px 0 12px; }
  .l-form { margin-top: 8px; padding: 20px; }
  .l-form .agt-form { margin-top: 18px; }
  .l-form .agt-form form.form { padding: 0; gap: 16px; }
  .l-direct { grid-template-columns: minmax(0, 1fr); }
}

/* === Service pages === */
/* template-service.php, template-grain.php, template-insurance.php, page.php (/za-nas/, privacy, plain pages).
   No mockups: home service block, o-cards, logo strip and inquiry section. Head = .page-head (shared with .c-head above). */
.page-head .eyebrow { display: block; margin-top: 18px; }
.page-head .eyebrow + h1 { margin-top: 10px; }
.page-head + .section { padding-top: var(--s6); }
.page-head + .trust { border-top: 1px solid var(--line); }
.page-direct { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 860px; margin-top: var(--s7); }

/* --- Service hero: text first in DOM and on screen, photos right --- */
.page-crumbs + .s-hero { padding-top: var(--s6); }
.s-hero { padding-bottom: 72px; }
.s-hero + .s-content { padding-top: 0; }
.s-intro h1 { margin-top: 10px; }
.s-intro h1 + .lead { margin-top: 16px; }

/* --- Grain price board --- */
.g-prices h2 { margin-bottom: var(--s6); }
.g-board { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.g-card { padding: 24px; gap: 8px; }
.g-card:hover { border-color: var(--line); box-shadow: none; }
.g-card .ic { width: 52px; height: 52px; margin-bottom: 8px; border-radius: var(--r-md); background: var(--surface); display: grid; place-items: center; color: var(--ink); }
.g-card h3 { font-size: var(--fs-h4); line-height: var(--lh-h4); letter-spacing: 0; }
.g-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.g-price strong { font-size: 36px; line-height: 42px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.g-price span { color: var(--graphite); font-weight: 600; }
.g-date { margin-top: auto; padding-top: 4px; font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--muted); }
.g-paused { max-width: 860px; font-size: var(--fs-body); line-height: var(--lh-body); }
.g-paused .icon { margin-top: 3px; }

/* --- Insurance: content cards full width (like home o-cards), CTA = text + phone/WhatsApp --- */
.i-content .prose { max-width: none; }
.i-content .prose .wp-block-columns { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.i-cta .inquiry { align-items: center; }
.i-cta .direct { margin-top: 0; }

@media (max-width: 760px) {
  .page-head + .section, .page-crumbs + .s-hero { padding-top: var(--s4); }
  .s-hero { padding-bottom: 56px; }
  .page-direct { grid-template-columns: minmax(0, 1fr); margin-top: 40px; }
  .g-prices h2 { margin-bottom: var(--s5); }
  .g-board { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .g-card { padding: 16px; }
  .g-card .ic { width: 44px; height: 44px; margin-bottom: 4px; }
  .g-price strong { font-size: 26px; line-height: 32px; }
  .g-price span { font-size: var(--fs-sm); }
}

/* === Machines === */
/* archive-agt_machine.php (/mashini/ + the two typed pages), single-agt_machine.php. No mockup: catalogue cards/pager/empty
   block, product page gallery/info/quote box, home o-cards + inquiry band. Gallery/lightbox JS = initGallery (T-013). */

/* --- Listing: full-width grid (no filter column), so 4 cards like the home product row --- */
.p-grid.m-grid, .p-grid.s-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.m-list, .m-content { padding-bottom: var(--s8); }
.m-list + .m-content, .m-list + .m-reasons, .m-content + .m-reasons { padding-top: 0; }
.m-ph { position: absolute; inset: 0; display: grid; place-items: center; background: var(--surface); color: var(--muted); border-radius: inherit; }
.m-ph .icon { width: 48px; height: 48px; stroke-width: 1.4; }
.p-card .m-meta { line-height: 18px; }
.m-type { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--muted); }

/* --- Reasons: static o-cards (not links) --- */
.m-reasons-list { list-style: none; margin: 0; padding: 0; }
.m-reasons-list .o-card:hover { border-color: var(--line); box-shadow: none; }
.m-reasons-list h3 { font-size: var(--fs-h4); line-height: var(--lh-h4); letter-spacing: 0; }

/* --- Single: quote box with the `machine` form (form.form without its own card) --- */
.m-quote h2 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
.m-quote .agt-form form.form { padding: 0; gap: 16px; border: 0; border-radius: 0; box-shadow: none; }
.m-quote .textarea { height: 96px; }
.m-desc { padding: var(--s7) 0 var(--s9); border-top: 1px solid var(--line); }
.m-desc h2 { margin-bottom: var(--s4); font-size: var(--fs-h3); line-height: var(--lh-h3); }

@media (max-width: 1199px) {
  .p-grid.m-grid, .p-grid.s-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .p-grid.m-grid, .p-grid.s-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .p-grid.m-grid, .p-grid.s-grid { gap: 10px; }
  .m-list, .m-content { padding-bottom: var(--s7); }
  .m-ph .icon { width: 36px; height: 36px; }
  .m-desc { padding: var(--s6) 0 56px; }
}

/* === Blog & search === */
/* index.php (/blog/), archive.php, single.php, parts/post-list.php, search.php, 404.php. No mockups: catalogue card/grid/
   pager/empty block, home o-cards, page head + .prose (T-016). Search product grid = .p-grid.s-grid (4 columns, Machines). */

/* --- Post cards (.b-grid = .grid3) --- */
.b-card .media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface); border-bottom: 1px solid var(--line); }
.b-card .media img { width: 100%; height: 100%; object-fit: cover; }
.b-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.b-ph .icon { width: 48px; height: 48px; stroke-width: 1.4; }
.b-card .body { flex: 1; display: flex; flex-direction: column; gap: var(--s2); padding: 20px 22px 22px; }
.b-date { font-size: var(--fs-sm); line-height: var(--lh-sm); font-weight: 600; color: var(--muted); }
.b-card .title { font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 700; letter-spacing: 0; }
.b-excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--graphite); font-size: 15px; line-height: 24px; }
.b-more { margin-top: auto; padding-top: var(--s1); display: inline-flex; align-items: center; gap: var(--s2); color: var(--red); font-size: 15px; font-weight: 700; }
.b-card:hover .title { color: var(--red); }
.b-card:hover .b-more { text-decoration: underline; text-underline-offset: 4px; }
.b-empty .btns { margin-top: var(--s5); }

/* --- Single post --- */
.b-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) 10px; color: var(--muted); font-size: 15px; line-height: 24px; font-weight: 600; }
.b-meta .sep { color: var(--crumb-sep); }
.b-meta a { color: var(--graphite); text-decoration: underline; text-underline-offset: 3px; }
.b-meta a:hover { color: var(--red); }
.b-figure { max-width: 860px; margin: 0 0 var(--s6); }
.b-figure img { width: 100%; max-height: 560px; object-fit: cover; border-radius: var(--r-md); } /* tall uploads: cropped */
.b-body { padding-bottom: 0; }
.b-cta { padding-bottom: var(--s8); }
.b-cta .inline-cta .btns { flex: 0 1 auto; justify-content: flex-end; }
.b-cta .inline-cta :focus-visible { outline-color: var(--white); }
.b-cta + .b-related { padding-top: 0; }
:is(.b-related, .s-products) .section-head { margin-bottom: 28px; }
:is(.b-related, .s-products, .s-other) h2 { font-size: var(--fs-h3); line-height: var(--lh-h3); }

/* --- Search: products first, then the other content as a list --- */
.s-products { padding-bottom: var(--s8); }
.s-products + .s-other { padding-top: 0; }
.s-other h2 { margin-bottom: 20px; }
.s-list, .s-other .pager { max-width: 860px; }
.s-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.s-item { position: relative; padding: 20px 0; border-bottom: 1px solid var(--line); }
.s-item h3 { margin-top: 10px; font-size: var(--fs-h4); line-height: var(--lh-h4); letter-spacing: 0; }
.s-item h3 a::after { content: ''; position: absolute; inset: 0; } /* whole row clickable */
.s-item:hover h3 a { color: var(--red); }
.s-item p { margin-top: 6px; color: var(--graphite); font-size: 15px; line-height: 24px; }
.s-none form.search { max-width: 640px; }
.s-none .subcats { margin-top: var(--s4); }
.s-none .btns { margin-top: var(--s5); }

/* --- 404 --- */
.e-search { max-width: 640px; margin-top: var(--s5); }
.e-links { list-style: none; margin: 0; padding: 0; }
.e-links li { display: flex; min-width: 0; }
.e-links .o-card { flex: 1; }
.e-links h2 { font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 700; letter-spacing: 0; }
.e-links .o-card:hover .btn--ghost { text-decoration: underline; text-underline-offset: 4px; }
.e-direct { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 860px; margin-top: var(--s6); }

@media (max-width: 960px) {
  .b-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .b-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .b-card .body { padding: 16px 18px 18px; }
  .b-figure { margin-bottom: var(--s5); }
  .b-cta, .s-products { padding-bottom: var(--s7); }
  .b-cta .inline-cta .btns { justify-content: flex-start; }
  :is(.b-related, .s-products) .section-head .btn--ghost { min-height: 44px; padding-left: 0; }
  :is(.b-empty, .s-none) .btns .btn { flex: 1 1 auto; }
  .s-item { padding: var(--s4) 0; }
  .e-search { margin-top: var(--s4); }
  .e-links .o-card { padding: 20px; }
  .e-direct { grid-template-columns: minmax(0, 1fr); margin-top: var(--s5); }
}

/* === Consent === */
/* Markup: inc/tracking.php, JS: initConsent */
.consent { position: fixed; left: var(--s5); bottom: var(--s5); z-index: 1000; width: calc(100% - 2 * var(--s5)); max-width: 720px; max-height: calc(100vh - 2 * var(--s5)); overflow-y: auto; padding: var(--s5); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.consent[hidden], .consent-panel[hidden] { display: none; }
/* No stored choice: html.agt-consent-open is set by the head script (inc/tracking.php), so the banner shows from the first paint */
.agt-consent-open .consent[hidden] { display: block; }
.consent-title { font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 700; }
.consent-text { margin-top: var(--s2); color: var(--graphite); }
.consent-text a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.consent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s5); }
.consent-actions .btn--ghost { min-height: 44px; padding: 0 var(--s3); }
.consent-panel { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); }
.consent-panel fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.consent-panel .check { align-items: center; min-height: 44px; font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--ink); cursor: pointer; }
.consent-panel .check input { top: 50%; transform: translateY(-50%); }
.consent-panel .btn { margin-top: var(--s4); }
main[tabindex="-1"]:focus { outline: none; }

@media (max-width: 760px) {
  .consent { left: 0; bottom: 0; width: 100%; max-width: none; max-height: 100vh; padding: var(--s5) var(--gutter) calc(var(--s5) + env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .consent-actions { flex-direction: column; align-items: stretch; gap: var(--s2); margin-top: var(--s4); }
  .consent-actions .btn, .consent-panel .btn { width: 100%; height: 48px; }
}
