/*
 * home.css — the home page only (index.php sets $page['styles']). 261120/027.
 *
 * Layout from the homepage-v3 study (C:\Users\abauldree\Documents\ChatGPT\B2B\prototype\homepage-v3\homepage.css,
 * read 2026-11-20), rewritten on this site's own tokens (site.css :root — --surface, --ink, --muted, --line,
 * --soft, --red, --chrome-*), so light and dark follow the site's theme switch without rules of their own.
 * The hero, the product tiles (.products / .product-card), buttons and links are site.css's; this file adds
 * the platform finder, the section navigator, the family cards, the engine and brand tabs, the heavy-duty
 * feature and the dealer band's second column. Everything is scoped under .home.
 * Type is a step larger than the rest of the site, as in the study: 16 px copy, 14 px controls, 12 px notes.
 */

/* Panels and tab lists carry display rules; the `hidden` attribute must still win. */
.home [hidden] { display: none !important; }

/* ── Hero + platform finder: one bordered block ───────────────────────────────────────────────────────────── */
.home-hero { margin-top: 30px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.home-hero .hero { margin-top: 0; border-radius: 0; min-height: 360px; }
.home-hero .hero p { max-width: 420px; font-size: 16px; line-height: 1.65; }
.home-hero .hero-link { font-size: 14px; }
/* 261120/054: "BUILT WITHIN." sat behind the engine picture and read "BUILT THIN." — now one line above it. */
.home-hero .hero-watermark { top: 20px; right: 26px; font-size: 54px; line-height: 1; letter-spacing: -1px; white-space: nowrap; }
.home-hero .hero-watermark br { display: none; }
.home-hero .hero-art img { height: 330px; margin-top: 52px; }
.platform-finder { display: flex; align-items: center; gap: 30px; padding: 23px 30px; background: var(--surface); scroll-margin-top: 20px; }
.platform-finder > div:first-child { flex-shrink: 0; }
.platform-finder .eyebrow { margin-bottom: 4px; font-size: 12px; letter-spacing: .8px; color: var(--red); }
.platform-finder > div:first-child p { font-size: 14px; }
.platform-choices { display: grid; flex: 1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.platform-choices a { padding: 2px 23px; border-left: 1px solid var(--line); }
.platform-choices strong { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 600; line-height: 1.1; }
.platform-choices span { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
.platform-choices a:hover strong { color: var(--red); }
.finder-link { font-size: 14px; font-weight: 600; color: var(--red); white-space: nowrap; }
.finder-link:hover { text-decoration: underline; }

/* ── Section navigator (sticky) ───────────────────────────────────────────────────────────────────────────── */
.home-nav { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 32px; height: 56px; margin-top: 25px; padding: 0 22px; overflow-x: auto; scrollbar-width: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.home-nav::-webkit-scrollbar { display: none; }
.home-nav > span { padding-right: 15px; border-right: 1px solid var(--line); font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.home-nav a { padding: 17px 0; border-bottom: 2px solid transparent; font-size: 14px; font-weight: 600; white-space: nowrap; }
.home-nav a:hover { color: var(--red); border-bottom-color: var(--red); }

/* ── Sections and their headings ──────────────────────────────────────────────────────────────────────────── */
.home-section { padding: 47px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 70px; }
.home-section.brands { border-bottom: 0; }
.home-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 24px; }
.home-heading .eyebrow { margin-bottom: 9px; font-size: 12px; letter-spacing: 1.4px; color: var(--red); }
.home-heading h2 { font-size: 42px; line-height: 1.08; letter-spacing: -.3px; }
.home-heading p { max-width: 760px; margin-top: 11px; font-size: 16px; line-height: 1.65; color: var(--muted); }
.home-heading .btn { flex-shrink: 0; font-size: 14px; }

/* Four tiles are a row of four or two rows of two — never three and one. */
.home .products { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

/* ── Product families ─────────────────────────────────────────────────────────────────────────────────────── */
.family-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.family { display: block; padding: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.family:hover { border-color: var(--red); }
.family > div { height: 146px; margin: -20px -20px 18px; background: #fff; }
.family img { width: 100%; height: 100%; padding: 14px; object-fit: contain; }
.family h3 { font-size: 30px; font-weight: 600; line-height: 1.15; }
.family p { margin-top: 7px; font-size: 14px; line-height: 1.6; color: var(--muted); }

/* ── Top sellers: the second four ─────────────────────────────────────────────────────────────────────────── */
.home-more { margin-top: 18px; }
.home-more-row { display: flex; align-items: center; justify-content: center; gap: 25px; margin-top: 24px; }
.home-more-row > span { font-size: 14px; color: var(--muted); }
.home-more-row .btn { font-size: 14px; }

/* ── Tabs (engine section, brand explorer) ────────────────────────────────────────────────────────────────── */
.home-tabs { display: flex; gap: 7px; margin: 23px 0 24px; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--line); }
.home-tabs button { flex-shrink: 0; padding: 14px 22px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font: 600 16px/1.4 var(--font-body); white-space: nowrap; cursor: pointer; }
.home-tabs button:hover { background: var(--soft); color: var(--ink); }
.home-tabs button[aria-selected="true"] { background: var(--surface); border-bottom-color: var(--red); color: var(--ink); }
.home-tabs button:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
/* Without script every panel shows: keep them apart. With script only one is visible, so the gap never shows. */
.home-panel + .home-panel { margin-top: 24px; }

/* ── Engine section: feature + compact list ───────────────────────────────────────────────────────────────── */
.engine-layout { display: grid; grid-template-columns: .9fr 1.3fr; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.engine-feature { display: flex; flex-direction: column; align-items: start; padding: 30px; background: var(--soft); border-right: 1px solid var(--line); }
.engine-feature .eyebrow { font-size: 12px; letter-spacing: .8px; color: var(--red); }
.engine-feature h3 { max-width: 360px; margin: 11px 0 12px; font-size: 34px; line-height: 1.05; }
.engine-feature p { max-width: 390px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.engine-feature img { width: 100%; height: 220px; margin: 14px 0; padding: 13px; object-fit: contain; background: #fff; border-radius: var(--radius); }
.engine-feature .btn { margin-top: auto; font-size: 14px; }
.assembly-list { display: flex; flex-direction: column; min-width: 0; padding: 0 25px; }
.assembly-item { display: flex; flex: 1; align-items: center; gap: 20px; min-width: 0; padding: 22px 0; border-bottom: 1px solid var(--line); }
.assembly-item:last-child { border-bottom: 0; }
.assembly-photo { flex-shrink: 0; width: 115px; height: 120px; background: #fff; border-radius: 4px; }
.assembly-photo img { width: 100%; height: 100%; padding: 8px; object-fit: contain; }
.assembly-item > div { flex: 1; min-width: 0; }
.assembly-item .eyebrow { margin-bottom: 0; font-size: 12px; letter-spacing: .3px; }
.assembly-item h4 { margin: 5px 0 12px; font: 600 16px/1.5 var(--font-body); }
.assembly-item h4 a:hover { color: var(--red); }
.assembly-bottom { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 10px 15px; }
.assembly-bottom small, .heavy-bottom small { display: block; margin-bottom: 3px; font-size: 12px; color: var(--muted); }
.assembly-bottom strong { display: block; font-size: 20px; font-weight: 600; line-height: 1.2; }
.assembly-bottom .assembly-stock, .heavy-bottom .assembly-stock { margin: 4px 0 0; font-weight: 600; color: var(--green, #1f8a4c); }
.assembly-bottom .text-link { font-size: 14px; }
.assembly-bottom .card-add { margin-top: 0; }
.assembly-bottom .card-add .btn { flex: 0 0 auto; padding: 0 14px; }

/* A product photo that did not load (home.js puts this in its place). */
.photo-unavailable { display: grid; place-items: center; width: 100%; height: 100%; min-height: 90px; padding: 10px; background: var(--soft); color: var(--muted); font-size: 12px; line-height: 1.4; text-align: center; border-radius: 4px; }

/* ── Heavy duty: dark feature (dark in both themes, like the hero) ────────────────────────────────────────── */
.heavy-duty { display: grid; grid-template-columns: 1.25fr 1fr; gap: 65px; margin-top: 46px; padding: 35px 40px; background: var(--chrome-panel); color: var(--chrome-ink); border-radius: var(--radius); scroll-margin-top: 70px; }
.heavy-copy > .eyebrow { font-size: 12px; color: var(--chrome-accent); }
.heavy-copy h2 { margin-top: 17px; font-size: 54px; line-height: .98; }
.heavy-copy > p { max-width: 510px; margin: 20px 0; font-size: 16px; line-height: 1.7; color: #c0c5ce; }
.heavy-links { margin-top: 25px; }
.heavy-links a { display: flex; flex-direction: column; padding: 13px 0; border-top: 1px solid #3a3e45; }
.heavy-links span { font-size: 14px; font-weight: 500; }
.heavy-links small { margin-top: 4px; font-size: 12px; color: #a9b0bc; }
.heavy-links a:hover span { color: #ff7184; }
.heavy-product { display: flex; flex-direction: column; min-width: 0; padding: 24px; background: var(--surface); color: var(--ink); border-radius: var(--radius); }
.heavy-product > .eyebrow { font-size: 12px; color: var(--red); }
.heavy-photo { display: block; margin: 15px 0; background: #fff; border-radius: 3px; }
.heavy-photo img { width: 100%; height: 180px; padding: 14px; object-fit: contain; }
.heavy-product h3 { font: 600 18px/1.5 var(--font-body); }
.heavy-product h3 a:hover { color: var(--red); }
.heavy-product > p { margin-top: 7px; font-size: 12px; color: var(--muted); }
.heavy-bottom { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-top: 22px; }
.heavy-bottom strong { display: block; font-size: 24px; font-weight: 600; }
.heavy-bottom .btn { font-size: 14px; }

/* ── Brand explorer ───────────────────────────────────────────────────────────────────────────────────────── */
.brand-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin-top: 26px; border-bottom: 0; }
.brand-tabs button { padding: 16px 12px; background: var(--surface); border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-left: 0; font-family: var(--font-display); font-size: 24px; letter-spacing: .1px; }
.brand-tabs button:first-child { border-left: 1px solid var(--line); }
.brand-tabs button[aria-selected="true"] { background: var(--chrome-panel); color: var(--chrome-ink); }
.brand-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 10px 0 22px; }
.brand-panel-heading h3 { font-size: 32px; font-weight: 600; line-height: 1.1; }
.brand-panel-heading p { margin-top: 5px; font-size: 14px; color: var(--muted); }
.brand-panel-heading .text-link { font-size: 14px; white-space: nowrap; }

/* ── Dealer band ──────────────────────────────────────────────────────────────────────────────────────────── */
.home-dealer { grid-template-columns: 1.3fr 1fr; gap: 70px; margin-top: 8px; border-top: 3px solid var(--red-button); }
.home-dealer .eyebrow { font-size: 12px; }
.home-dealer h2 { font-size: 45px; line-height: 1; }
.home-dealer p { max-width: 610px; margin-top: 20px; font-size: 16px; line-height: 1.75; color: #c0c5ce; }
.dealer-next { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dealer-next .btn { font-size: 14px; }
.dealer-next .btn.outline { background: none; border-color: #636a74; color: #fff; }
.dealer-next .btn.outline:hover { background: #2a2e34; }
.dealer-next > span { grid-column: 1 / -1; margin-top: 10px; font-size: 14px; text-align: center; color: #b4bdc9; }

/* ── Narrower windows ─────────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .platform-finder { gap: 18px; padding: 20px; }
  .platform-choices a { padding: 3px 17px; }
  .platform-choices strong { font-size: 24px; }
  .home .products { gap: 14px; }
  .assembly-photo { width: 90px; height: 105px; }
  .assembly-list { padding: 0 20px; }
  .heavy-duty { gap: 35px; padding: 30px; }
  .home-dealer { gap: 35px; }
  .home-nav { gap: 27px; }
}
@media (max-width: 900px) {
  .platform-finder { flex-wrap: wrap; gap: 20px; }
  .platform-finder > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 15px; width: 100%; }
  .platform-choices a:first-child { padding-left: 0; border-left: 0; }
  .home-heading { align-items: start; flex-wrap: wrap; gap: 18px; }
  .family-grid { gap: 12px; }
  .family { padding: 16px; }
  .family > div { height: 125px; margin: -16px -16px 15px; }
  .family h3 { font-size: 26px; }
  .home .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .engine-layout { grid-template-columns: 1fr; }
  .engine-feature { border-right: 0; border-bottom: 1px solid var(--line); }
  .engine-feature img { height: 200px; }
  .brand-tabs { display: flex; overflow-x: auto; }
  .brand-tabs button { flex: 1; min-width: 140px; padding: 14px 20px; font-size: 22px; }
  .heavy-duty { gap: 25px; padding: 28px; }
  .heavy-copy h2 { font-size: 48px; }
  .home-dealer { grid-template-columns: 1fr; gap: 25px; }
  .dealer-next { max-width: 450px; }
}
@media (max-width: 560px) {
  /* The finder comes before the engine picture on a phone: the hero's two halves and the finder are re-ordered. */
  .home-hero { display: flex; flex-direction: column; margin-top: 20px; }
  .home-hero .hero { display: contents; }
  .home-hero .hero-copy { order: 0; padding: 29px 25px; background: var(--chrome-panel); color: var(--chrome-ink); }
  .home-hero .hero h1 { font-size: 61px; }
  .home-hero .platform-finder { order: 1; padding: 23px 20px; }
  .home-hero .hero-art { order: 2; height: 180px; clip-path: none; }
  .home-hero .hero-art img { width: 90%; height: 178px; padding: 12px; }
  .home-hero .hero-watermark { top: 10px; right: 14px; font-size: 30px; }
  .home-hero .hero-art img { margin-top: 30px; height: 150px; }
  .platform-finder > div:first-child { display: block; }
  .platform-choices { flex-basis: 100%; }
  .platform-choices a { padding: 3px 13px; }
  .platform-choices strong { font-size: 23px; white-space: nowrap; }
  .home-nav { gap: 25px; height: 54px; margin-top: 20px; padding: 0 16px; }
  .home-nav > span { display: none; }
  .home-section { padding: 34px 0; }
  .home-heading h2 { font-size: 34px; line-height: 1.1; }
  .family-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .family > div { height: 130px; }
  .home .products { gap: 12px; }
  .home-more-row { flex-direction: column; align-items: start; gap: 14px; }
  .home-more-row .btn { width: 100%; }
  .home-tabs { gap: 0; margin: 20px 0; }
  .home-tabs button { padding: 13px 16px; font-size: 14px; }
  .brand-tabs button { min-width: 134px; padding: 15px 18px; font-size: 22px; }
  .engine-feature { padding: 24px; }
  .engine-feature h3 { font-size: 33px; line-height: 1.1; }
  .engine-feature .btn { width: 100%; margin-top: 12px; }
  .assembly-list { padding: 0 18px; }
  .assembly-item { align-items: start; gap: 13px; padding: 23px 0; }
  .assembly-photo { width: 73px; height: 93px; }
  .assembly-item h4 { font-size: 14px; line-height: 1.65; }
  .heavy-duty { grid-template-columns: 1fr; gap: 27px; margin-top: 32px; padding: 25px 22px; }
  .heavy-copy h2 { font-size: 50px; line-height: 1; }
  .heavy-product { padding: 21px; }
  .heavy-bottom { flex-wrap: wrap; }
  .heavy-bottom .btn { width: 100%; }
  .brand-panel-heading { align-items: start; flex-wrap: wrap; gap: 18px; margin: 24px 0; }
  .home-dealer { padding: 29px 24px; }
  .home-dealer h2 { font-size: 42px; }
  .dealer-next { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .home * { transition: none !important; }
}
