@charset "UTF-8";

/* ==================================================================
   MWD 2026 — Midwest Diesel Joomla 5/6 site template
   (C) 2026 Midwest Diesel / Paschen Communications — GPL-2.0-or-later

   THIS IS THE ONLY STYLESHEET. Edit it and upload it — there is no
   build step, no SCSS, nothing to compile. The file you edit is the
   file the browser loads.

   Plain, FLAT CSS — no nesting, no preprocessor syntax, no minimum
   browser version. Every selector is written out in full, so this file
   works in any browser that understands CSS custom properties.

   Order matters: a rule further down this file beats an identical
   selector further up. Sections 9 and 10 are last on purpose.

   Media queries in this file, and only these four:
     480px  phone     — top bar hidden, hero pull-up released, header refit
     560px  large phone — top bar wraps to two rows, search inputs stack
     768px  tablet    — stats grid collapses
     992px  desktop   — desktop nav hides, mobile drawer takes over
   (--wrap: 1200px is the boxed content width, not a breakpoint.)

   CONTENTS
     1. DESIGN TOKENS
     2. BASE
     3. HEADER
     4. HOME LAYOUT
     5. DEFAULT LAYOUT
     6. CONTENT HELPERS
     7. FOOTER
     8. SYSTEM PAGES
     9. SITE-LOCAL OVERRIDES
     10. STACKING / Z-INDEX
   ================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Anton&family=Barlow:wght@400;500;600;700&display=swap");

/* ==================================================================
   1. DESIGN TOKENS  (:root custom properties)
   ================================================================== */
/* The web-font @import must be the first statement in the file — CSS requires
   @import before any rule. The template also <link>s these fonts in the
   document head; this @import keeps system pages styled if that link is ever
   absent. */
:root {
  /* ---- Brand palette (sampled from the real Midwest Diesel logo) ---- */
  --color-primary: #FFD320; /* Caterpillar gold #FFD320 */
  --color-primary-dark: #E6BD10;
  --color-on-primary: #141414;
  --color-bg: #0C0D0F; /* page background (dark) #0C0D0F */
  --color-bg-2: #141619; /* panels / cards-on-dark */
  --color-bg-3: #1B1E22; /* inputs / wells */
  --color-surface-light: #FFFFFF; /* product cards (B-style, light) */
  --color-surface-tint: #EEF0F2; /* product card image well */
  --color-line: #26292E; /* hairlines on dark */
  --color-line-light: #DCDFE3; /* hairlines on light surfaces */
  --color-text: #F3F4F6; /* body text on dark */
  --color-text-dark: #181818; /* text on light surfaces */
  --color-muted: #9AA0A8; /* secondary text on dark */
  --color-muted-light: #666A70; /* secondary text on light */
  /* ---- Typography ---- */
  --font-disp: 'Anton', system-ui, sans-serif; /* display / headings */
  --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* ---- Type scale ----
  Every font-size in this template comes from this scale. Do NOT write a
  pixel literal further down this file — add or pick a step here instead, so the whole
  site can be re-tuned from one place.

  --fs-300 (16px) is the FLOOR. Nothing renders below it: 16px is both the
  smallest comfortably readable size on a phone and the threshold under
  which iOS Safari auto-zooms a focused input. The scale is written in rem
  so a visitor's own browser text-size setting still scales it.

  The three display steps are fluid (clamp) so headings shrink on a phone
  and grow on a laptop without a media query. */
  --fs-300: 1rem; /* 16px — fine print, meta, labels (FLOOR) */
  --fs-400: 1.0625rem; /* 17px — body copy */
  --fs-500: 1.1875rem; /* 19px — lead paragraphs, article body */
  --fs-600: 1.375rem; /* 22px — small headings, module titles */
  --fs-700: 1.625rem; /* 26px — h4 / card titles */
  --fs-800: 1.875rem; /* 30px — h3 */
  --fs-900: 2.25rem; /* 36px — section sub-heads */
  --fs-1200: clamp(2rem, 4.4vw, 3rem); /* 32 → 48px — h2 */
  --fs-1400: clamp(2.25rem, 5vw, 3.5rem); /* 36 → 56px — section heads */
  --fs-1600: clamp(2.5rem, 6vw, 4.25rem); /* 40 → 68px — h1 / page title */
  /* Component-level type tokens (kept here with the rest of the scale, not
     further down the file, so there is exactly one place to look).
     */
  --fs-base: var(--fs-400);
  --fs-topbar: var(--fs-300); /* top utility bar */
  --fs-nav: var(--fs-500); /* desktop main menu (Anton is condensed) */
  --fs-nav-mobile: 1.375rem; /* 22px — mobile drawer items */
  /* Oversized display numerals — outside the text scale on purpose. */
  --fs-stat: 3.375rem; /* 54px — home-page stat figure */
  --fs-error-code: clamp(4.5rem, 16vw, 8.75rem); /* 72 → 140px — error page code */
  /* ---- Line heights ---- */
  --flh-300: 1.45;
  --flh-400: 1.6;
  --flh-700: 1.25;
  --flh-900: 1.12;
  --flh-1600: 1.05;
  --flh-base: var(--flh-400);
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semi: 600;
  --fw-bold: 700;
  /* ---- Radii / shadows / motion ---- */
  --br-sm: 3px;
  --br: 6px;
  --br-lg: 10px;
  --shadow: 0 16px 36px rgba(0, 0, 0, .5);
  --shadow-sm: 0 8px 20px rgba(0, 0, 0, .4);
  --transition: .16s ease;
  /* ---- Layering (z-index scale) ----
  One place to control what paints over what. Values are deliberately
  high so third-party module CSS (sliders, page builders, pasted
  Custom HTML) can't scroll over the sticky header. Content regions
  are also isolated — see section 10. */
  --z-below: -1; /* decorative layers behind their own content */
  --z-base: 1; /* in-flow content that needs to sit above a ::before/::after */
  --z-sticky: 900; /* sticky elements inside the page body */
  --z-header: 1000; /* sticky site header — must stay clickable */
  --z-dropdown: 1010; /* menu drop-downs / mobile nav panel */
  --z-overlay: 1100; /* full-screen overlays (modals, off-canvas, lightboxes) */
  /* ---- Layout ---- */
  --wrap: 1200px;
  --gutter: 24px;
  --header-h: 82px;
  --topbar-h: 36px;
}

/* ==================================================================
   2. BASE  (reset, typography, buttons, layout container)
   ================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--flh-base);
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: var(--fw-semi);
}

a:hover {
  color: var(--color-primary-dark);
}

/* Headings. h5/h6 are included deliberately: left out, the browser gives them
   0.83em and 0.67em — SMALLER than the body text around them — and no display
   face. Every level must have an explicit size here, or any module that emits a
   bare heading and ships no CSS of its own (mod_jpc_category_card_blocks,
   mod_partfinder) falls back to those browser defaults. Anton is a *condensed*
   face, so an unsized heading reads far smaller than the number implies.
   */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-disp);
  font-weight: 400;
  text-transform: uppercase;
  line-height: var(--flh-900);
  letter-spacing: 0.01em;
  margin: 0 0 0.4em;
}

h1 {
  font-size: var(--fs-1600);
  line-height: var(--flh-1600);
}

h2 {
  font-size: var(--fs-1200);
}

h3 {
  font-size: var(--fs-800);
  line-height: var(--flh-700);
}

h4 {
  font-size: var(--fs-700);
  line-height: var(--flh-700);
}

h5 {
  font-size: var(--fs-600);
  line-height: var(--flh-700);
}

h6 {
  font-size: var(--fs-500);
  line-height: var(--flh-700);
  letter-spacing: 0.06em;
}

p {
  margin: 0 0 1em;
}

/* Skip link */
.t-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: var(--color-on-primary);
  padding: 10px 16px;
  z-index: 100;
  font-weight: var(--fw-bold);
}

.t-skip:focus {
  left: 8px;
  top: 8px;
}

/* Layout container */
.t-wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}

.t-section {
  padding: 70px 0;
}

/* Eyebrow / kicker */
.t-eyebrow {
  font-family: var(--font-disp);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: var(--fs-300);
}

/* Buttons */
.t-btn {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-family: var(--font-disp);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 13px 24px;
  border-radius: var(--br-sm);
  font-size: var(--fs-400);
  line-height: 1.2;
  border: 0;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}

.t-btn:hover {
  background: var(--color-primary-dark);
  color: var(--color-on-primary);
  box-shadow: 0 0 0 3px rgba(255, 211, 32, 0.25);
}

.t-btn-ghost {
  background: transparent;
  border: 2px solid #3A3D42;
  color: #fff;
  padding: 11px 22px;
}

.t-btn-ghost:hover {
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: none;
}

/* Generic section heading used on the home page */
.t-sec-head {
  text-align: center;
  margin-bottom: 40px;
}
.t-sec-head .t-eyebrow {
  font-size: var(--fs-300);
}
.t-sec-head h2 {
  font-size: var(--fs-1400);
  margin-top: 8px;
}
.t-sec-head p {
  color: var(--color-muted);
  max-width: 600px;
  margin: 12px auto 0;
}

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

/****  Main Search Panel *****/
.t-search-panel {
  margin-top: -3rem;
}

/**** Sub Feature area ****/
.t-subfeature {
  padding-bottom: 4rem;
}
.t-subfeature .t-split .t-split-img {
  border: none;
}

/* ==================================================================
   3. HEADER  (top bar, logo, nav, hamburger, mobile drawer)
   ================================================================== */
/* ---- Top utility bar ---- */
.t-topbar {
  background: #000;
  color: var(--color-muted);
  font-size: var(--fs-topbar);
  border-bottom: 1px solid var(--color-line);
}
.t-topbar a {
  color: var(--color-muted);
}
.t-topbar a:hover {
  color: var(--color-primary);
}
.t-topbar .t-gold, .t-topbar strong {
  color: var(--color-primary);
}

.t-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--topbar-h);
  flex-wrap: wrap;
}

/* ---- Header ---- */
.t-header {
  background: rgba(12, 13, 15, 0.92);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-line);
}

.t-header-inner {
  display: flex;
  align-items: center;
  gap: 30px;
  min-height: var(--header-h);
}

.t-logo-link {
  display: inline-flex;
  align-items: center;
}

/* Logo is 266x79 (3.37:1). Drive the size from max-height and let the width follow,
   rather than fixing height. The global img{max-width:100%} reset squeezes
   the WIDTH when the header flex row runs out of room on a small phone; with
   a fixed height that squeeze renders as a horizontally squashed logo. With
   height:auto the image scales proportionally instead and simply gets smaller. */
.t-logo img {
  height: auto;
  max-height: 46px;
  width: auto;
  max-width: 100%;
}

/* header-end (e.g. phone / button) */
.t-header-end {
  margin-left: auto;
  font-family: var(--font-body);
  color: var(--color-primary);
  font-size: var(--fs-600);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.t-header-end a {
  color: var(--color-primary);
}

/* ---- Primary nav (Joomla menu module output) ---- */
.t-nav {
  margin-left: auto;
}
.t-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2px;
  align-items: center;
}
.t-nav li {
  position: relative;
}
.t-nav a {
  display: block;
  font-family: var(--font-disp);
  text-transform: uppercase;
  color: #D7DADE;
  font-size: var(--fs-nav);
  letter-spacing: 0.05em;
  padding: 10px 14px;
  border-radius: var(--br-sm);
}
.t-nav a:hover, .t-nav .active > a, .t-nav .current > a {
  color: var(--color-primary);
}
.t-nav {
  /* underline active top-level */
}
.t-nav > ul > li.active > a::after,
.t-nav > ul > li.current > a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--color-primary);
}
.t-nav {
  /* Dropdowns (hover, no click needed) */
}
.t-nav ul ul {
  position: absolute;
  top: 100%;
  left: 0;
  display: block;
  min-width: 220px;
  background: var(--color-bg-2);
  border: 1px solid var(--color-line);
  border-radius: var(--br);
  padding: 6px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: var(--z-dropdown);
}
.t-nav ul ul li {
  width: 100%;
}
.t-nav ul ul a {
  font-size: var(--fs-300);
  padding: 9px 12px;
}
.t-nav li:hover > ul,
.t-nav li:focus-within > ul,
.t-nav li.t-open > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.t-nav {
  /* third level flies out to the side */
}
.t-nav ul ul ul {
  top: 0;
  left: 100%;
}

/* Hide desktop nav on small screens */
@media (max-width: 992px) {
  .t-nav {
    display: none;
  }
  .t-header-end {
    font-size: var(--fs-500);
  }
}
/* ---- Hamburger ---- */
.t-burger {
  display: none;
  margin-left: 8px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.t-burger span {
  display: block;
  width: 26px;
  height: 3px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition);
}

@media (max-width: 992px) {
  .t-burger {
    display: block;
  }
}
/* ---- Mobile nav drawer ---- */
.t-mobile-nav {
  display: none;
  background: var(--color-bg-2);
  border-bottom: 1px solid var(--color-line);
}
.t-mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}
.t-mobile-nav ul ul {
  padding-left: 16px;
}
.t-mobile-nav a {
  display: block;
  font-family: var(--font-disp);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #E4E6E9;
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--color-line);
}
.t-mobile-nav a:hover, .t-mobile-nav .active > a {
  color: var(--color-primary);
}

@media (max-width: 992px) {
  .t-mobile-nav:not([hidden]) {
    display: block;
  }
}

/* ==================================================================
   4. HOME LAYOUT  (hero, features, cards, stats, CTA)
   ================================================================== */
/* The hero itself is rendered by mod_jpc_hero_block (self-styled).
   This wrapper just lets the search panel below overlap it.
   */
.t-hero-region {
  position: relative;
}

.t-main {
  position: relative;
  z-index: 1;
}

/* ---- Feature heading (own full-width row above the card grid) ---- */
.t-feature-top {
  padding: 70px 0 0;
}

/* ---- Feature / product-category card grid (Concept B card style) ---- */
.t-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding-top: 40px;
  padding-bottom: 70px;
}

@media (max-width: 992px) {
  .t-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .t-feature-grid {
    grid-template-columns: 1fr;
  }
}
.t-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface-light);
  color: var(--color-text-dark);
  border: 1px solid var(--color-line);
  border-radius: var(--br);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.t-card:hover {
  color: var(--color-text-dark);
  box-shadow: 0 0 0 1px var(--color-primary), var(--shadow);
  transform: translateY(-4px);
}

.t-card-pic {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  padding: 14px;
  background: var(--color-surface-tint);
  border-bottom: 1px solid var(--color-line-light);
}
.t-card-pic img {
  max-height: 120px;
  width: auto;
}

.t-card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 18px;
  flex: 1;
}

.t-card-title {
  font-family: var(--font-disp);
  text-transform: uppercase;
  font-size: var(--fs-700);
  line-height: 1;
}

.t-card-meta {
  color: var(--color-muted-light);
  font-size: var(--fs-300);
  flex: 1;
}

.t-card .t-btn {
  font-size: var(--fs-300);
  padding: 8px 16px;
}

/* ---- Sub-feature / split (e.g. "We Sell Cores") ---- */
.t-subfeature {
  background: var(--color-bg-2);
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.t-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 46px;
  align-items: center;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 60px var(--gutter);
}
.t-split h2 {
  font-size: var(--fs-1200);
}
.t-split p {
  color: var(--color-muted);
  font-size: var(--fs-500);
}
.t-split .t-split-img {
  border-radius: var(--br-lg);
  overflow: hidden;
  border: 1px solid var(--color-line);
}

@media (max-width: 992px) {
  .t-split {
    grid-template-columns: 1fr;
  }
}
.t-check {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}
.t-check li {
  position: relative;
  padding: 8px 0 8px 30px;
  color: #CFD3D8;
  font-size: var(--fs-500);
}
.t-check li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: var(--fw-bold);
}

/* ---- Stats row ---- */
.t-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}
.t-stats .t-stat-n {
  font-family: var(--font-disp);
  font-size: var(--fs-stat);
  color: var(--color-primary);
  line-height: 1;
}
.t-stats .t-stat-l {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--fs-300);
  color: var(--color-muted);
  margin-top: 6px;
}

@media (max-width: 768px) {
  .t-stats {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}
/* ---- Call to action band ---- */
.t-cta {
  text-align: center;
  padding: 10px var(--gutter);
  background: linear-gradient(180deg, var(--color-bg), var(--color-bg-2));
}
.t-cta h2 {
  font-size: var(--fs-1400);
}
.t-cta p {
  color: var(--color-muted);
  max-width: 560px;
  margin: 14px auto 26px;
  font-size: var(--fs-500);
}

/* ---- Search panel (Custom HTML in feature-top or its own module) ---- */
.t-search-panel {
  background: var(--color-bg-2);
  border: 1px solid var(--color-line);
  border-radius: var(--br-lg);
  padding: 22px;
  position: relative;
  z-index: 5;
  margin-top: -40px;
  box-shadow: var(--shadow);
}
.t-search-panel h3 {
  font-size: var(--fs-600);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}

.t-search-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
}
.t-search-grid select, .t-search-grid input {
  height: 48px;
  background: var(--color-bg-3);
  border: 1px solid var(--color-line);
  border-radius: var(--br);
  color: #E8E9EB;
  padding: 0 14px;
  font-size: var(--fs-400);
  font-family: var(--font-body);
}
.t-search-grid .t-btn {
  height: 48px;
  line-height: 22px;
}

.t-search-byno {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}
.t-search-byno b {
  font-family: var(--font-disp);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--fs-500);
  color: var(--color-primary);
  white-space: nowrap;
}
.t-search-byno input {
  flex: 1;
  height: 46px;
  background: var(--color-bg-3);
  border: 1px solid var(--color-line);
  border-radius: var(--br);
  color: #E8E9EB;
  padding: 0 14px;
  font-size: var(--fs-400);
  font-family: var(--font-body);
}

@media (max-width: 992px) {
  .t-search-grid {
    grid-template-columns: 1fr 1fr;
  }
  .t-search-byno {
    flex-wrap: wrap;
  }
  .t-search-byno b {
    width: 100%;
  }
}
@media (max-width: 560px) {
  .t-search-grid {
    grid-template-columns: 1fr;
  }
}
/* ---- Surplus banner (full-width image link) ---- */
.t-surplus-banner {
  display: block;
  margin: 50px auto;
  max-width: var(--wrap);
  padding: 0 var(--gutter);
}

.t-surplus-banner img {
  width: 100%;
  border-radius: var(--br);
}

/* ==================================================================
   5. DEFAULT LAYOUT  (page head, content/sidebar grid, modules)
   ================================================================== */
/* ---- Interior page banner ---- */
.t-pagehead {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--color-line);
  background: var(--color-bg-2);
}

.t-pagehead-bg {
  position: absolute;
  inset: 0;
  background: url("../images/surplus-banner.png") center/cover no-repeat;
  opacity: 0.18;
}

.t-pagehead-inner {
  position: relative;
  z-index: 2;
  padding: 56px var(--gutter);
}

/* Page Banner = "Always" on a page with no Browser Page Title: the band is kept
   purely for its background image, so it does not need full heading height. */
.t-pagehead-untitled .t-pagehead-inner {
  padding-top: 40px;
  padding-bottom: 40px;
}

.t-page-title {
  font-size: var(--fs-1600);
  margin: 0;
}

.t-crumbs {
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-300);
  margin-top: 10px;
}
.t-crumbs a {
  color: var(--color-primary);
}
.t-crumbs ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

/* ---- Breadcrumbs on their own, when the page banner is not rendered ---- */
.t-crumbs-bare {
  padding-top: 20px;
}

/* ---- Content / sidebar layout ---- */
.t-main.t-wrap {
  padding-top: 0;
  padding-bottom: 0;
}

.t-main-top, .t-main-bottom {
  padding: 24px 0;
}

.t-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding: 54px 0;
}

.t-layout.t-has-l {
  grid-template-columns: 280px 1fr;
}

.t-layout.t-has-r {
  grid-template-columns: 1fr 280px;
}

.t-layout.t-has-lr {
  grid-template-columns: 260px 1fr 260px;
}

.t-has-r .t-content {
  order: -1;
}

.t-has-lr .t-content {
  order: 0;
}

@media (max-width: 992px) {
  .t-layout, .t-layout.t-has-l, .t-layout.t-has-r, .t-layout.t-has-lr {
    grid-template-columns: 1fr;
  }
  .t-has-r .t-content {
    order: 0;
  }
}
/* Interior content typography (article output) */
.t-content {
  /* Article body was inheriting --fs-base with nothing else set, so long-form
     copy read at UI-chrome size. Long-form wants a step up from the UI.
     */
  font-size: var(--fs-500);
  line-height: var(--flh-400);
}
.t-content h2 {
  font-size: var(--fs-900);
  margin-bottom: 14px;
}
.t-content h3 {
  font-size: var(--fs-800);
  margin: 26px 0 10px;
  color: #fff;
}
.t-content p, .t-content li {
  color: #C3C7CD;
}
.t-content a {
  color: var(--color-primary);
}
.t-content img {
  border-radius: var(--br);
}
.t-content ul, .t-content ol {
  padding-left: 1.2em;
}

/* ---- Sidebar modules (chrome t-module) ---- */
.t-sidebar .t-module {
  background: var(--color-bg-2);
  border: 1px solid var(--color-line);
  border-radius: var(--br);
  padding: 18px;
  margin-bottom: 22px;
}

.t-module-title {
  font-family: var(--font-disp);
  text-transform: uppercase;
  font-size: var(--fs-600);
  letter-spacing: 0.04em;
  border-bottom: 3px solid var(--color-primary);
  padding-bottom: 8px;
  margin: 0 0 14px;
}

.t-module-body ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.t-module-body li a, .t-module-body > a {
  display: block;
}
.t-module-body a {
  color: #C3C7CD;
  padding: 9px 0;
  border-bottom: 1px solid var(--color-line);
  display: block;
}
.t-module-body a:hover {
  color: var(--color-primary);
}
.t-module-body li:last-child a {
  border-bottom: 0;
}

/* ==================================================================
   6. CONTENT HELPERS  (reusable grid/row/stack classes)
   ================================================================== */
/* ---- Responsive column grids ---- */
.c-grid {
  display: grid;
  gap: var(--space-gutter);
  grid-template-columns: 1fr;
}

.c-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.c-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.c-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.c-grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

@media (max-width: 768px) {
  .c-grid--3,
  .c-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .c-grid--2,
  .c-grid--3,
  .c-grid--4 {
    grid-template-columns: 1fr;
  }
}
/* ---- Flex row ---- */
.c-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-gutter);
}

.c-row--middle {
  align-items: center;
}

.c-row--between {
  justify-content: space-between;
}

.c-row--center {
  justify-content: center;
}

.c-row--equal > * {
  flex: 1 1 0;
  min-width: 0;
}

/* ---- Vertical spacing ---- */
.c-stack > * + * {
  margin-top: 1rem;
}

.c-stack--lg > * + * {
  margin-top: 2rem;
}

/* ---- Width helpers ---- */
.c-narrow {
  max-width: 70ch;
  margin-inline: auto;
}

.c-center {
  text-align: center;
}

/* Misc general page content modifiers */
span.highlight {
  color: var(--color-primary);
}

/* Contact Us - information formatting */
div.contact_us_info div.contact_us_photos_and_bios {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
div.contact_us_info div.contact_us_photos_and_bios .contact_bio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
div.contact_us_info div.contact_us_photos_and_bios .contact_bio .contact_bio_picture {
  display: flex;
  justify-content: flex-end;
}

.t-main {
  z-index: 100;
}

/****  Main Search Panel *****/
.t-feature-top {
  margin-top: -6rem;
  z-index: 100;
}
.t-feature-top .t-search-panel {
  margin-bottom: 6rem;
}
.t-feature-top .t-search-panel .t-search-panel-contents {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1rem;
}
.t-feature-top .t-search-panel .t-search-panel-contents .t-search-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.t-feature-top .t-search-panel .t-search-panel-contents .t-search-grid button.t-btn {
  grid-column-start: 1;
  grid-column-end: 3;
}
.t-feature-top .t-search-panel .t-search-panel-contents .t-search-byno {
  display: grid;
  grid-template-columns: 1fr;
}

/* ==================================================================
   7. FOOTER
   ================================================================== */
.t-footer {
  background: #000;
  color: var(--color-muted);
  font-size: var(--fs-400);
  border-top: 1px solid var(--color-line);
  margin-top: 0;
}

.t-footer-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
  padding-top: 54px;
  padding-bottom: 44px;
}

@media (max-width: 992px) {
  .t-footer-cols {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .t-footer-cols {
    grid-template-columns: 1fr;
  }
}
.t-footer a {
  color: var(--color-muted);
}

.t-footer a:hover {
  color: var(--color-primary);
}

.t-footer-logo img {
  height: 40px;
  width: auto;
  margin-bottom: 14px;
}

/* Footer column module (chrome t-footer) */
.t-footer-module {
  margin-bottom: 18px;
}

.t-footer-title {
  font-family: var(--font-disp);
  color: #fff;
  text-transform: uppercase;
  font-size: var(--fs-500);
  letter-spacing: 0.04em;
  margin: 0 0 12px;
}

.t-footer-body ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.t-footer-body a, .t-footer-body p {
  display: block;
  padding: 4px 0;
  margin: 0;
}
.t-footer-body .t-footer-call {
  font-family: var(--font-disp);
  color: var(--color-primary);
  font-size: var(--fs-700);
}

/* Bottom bar */
.t-footer-bar {
  border-top: 1px solid var(--color-line);
  padding: 18px 0;
  color: #6C7178;
  font-size: var(--fs-300);
}
.t-footer-bar .t-wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.t-footer-bar a {
  color: #6C7178;
}
.t-footer-bar a:hover {
  color: var(--color-primary);
}

/* ==================================================================
   8. SYSTEM PAGES  (offline, error)
   ================================================================== */
/* Error / offline / login centred message pages */
.t-msg-wrap {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px var(--gutter);
}

.t-msg-card {
  background: var(--color-bg-2);
  border: 1px solid var(--color-line);
  border-radius: var(--br-lg);
  padding: 44px 38px;
  max-width: 560px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
}

.t-msg-card .t-footer-logo img {
  height: 46px;
  width: auto;
  margin: 0 auto 22px;
}

.t-msg-text {
  color: var(--color-muted);
  font-size: var(--fs-500);
}

.t-error-code {
  font-family: var(--font-disp);
  font-size: var(--fs-error-code);
  line-height: 0.9;
  color: var(--color-primary);
}

.t-error-title {
  font-size: var(--fs-800);
  margin: 6px 0 14px;
}

.t-error-text {
  color: var(--color-muted);
  margin-bottom: 24px;
}

.t-error-debug {
  text-align: left;
  margin-top: 24px;
  font-size: var(--fs-300);
  color: var(--color-muted);
  overflow: auto;
}

/* Offline login form */
.t-offline-form {
  margin-top: 22px;
  text-align: left;
}
.t-offline-form label {
  display: block;
  font-size: var(--fs-300);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  margin: 12px 0 4px;
}
.t-offline-form input {
  width: 100%;
  height: 46px;
  background: var(--color-bg-3);
  border: 1px solid var(--color-line);
  border-radius: var(--br);
  color: #E8E9EB;
  padding: 0 14px;
  font-size: var(--fs-400);
  font-family: var(--font-body);
}
.t-offline-form .t-btn {
  margin-top: 18px;
  width: 100%;
}

/* Joomla system messages */
#system-message-container {
  margin: 20px 0;
}

.alert {
  border: 1px solid var(--color-line);
  border-left: 4px solid var(--color-primary);
  background: var(--color-bg-2);
  border-radius: var(--br);
  padding: 14px 18px;
  margin-bottom: 16px;
  color: var(--color-text);
}

.alert-success {
  border-left-color: #2ecc71;
}

.alert-danger, .alert-error {
  border-left-color: #e74c3c;
}

.alert-warning {
  border-left-color: var(--color-primary);
}

/* ==================================================================
   9. SITE-LOCAL OVERRIDES  (must stay after the layout sections)
   ================================================================== */

/* =============================================================
   SITE-LOCAL overrides — Midwest Diesel (midwestdieseldev2026)
   Reason: design review 01 — mobile legibility + small module fonts
   Date:   2026-07-29

   This section sits after every layout section and before section 10, so a
   selector written here beats the template's own rule at equal specificity.
   No !important is needed anywhere below.

   Breakpoints: phone 560 / tablet 768 / desktop 992.
   NOTE: the mobile drawer (.t-mobile-nav) appears at <=992px, NOT 560px.

   SCOPE: this section holds ONLY (a) responsive layout tweaks and
   (b) overrides aimed at third-party extension CSS. The type scale lives
   in section 1 and the heading sizes in section 2 — do not put type
   tokens back in here.
   =============================================================
   */

/* =============================================================
   9.1  TOP UTILITY BAR — small-screen layout
   --fs-topbar is now --fs-300 (16px) at every width, so there is no
   size override here; the bar just needs to run to two rows once the
   two groups no longer fit side by side.
   =============================================================
   */
@media (max-width: 560px) { /* <=560px */
  :root {
    --topbar-h: auto;
  }
  /* .t-topbar-inner is already flex-wrap:wrap (section 3, line 20);
     releasing min-height is all it needs to run to two rows.
     */
  .t-topbar-inner {
    justify-content: center;
    gap: 4px 16px;
    padding: 8px 0;
  }
  .t-topbar a {
    display: inline-block;
    padding: 3px 0;
  }
}

/* =============================================================
   9.2  MOBILE MENU
   .t-mobile-nav a (section 3) sets no font-size, so it inherits
   body. In condensed uppercase Anton that reads small; --fs-nav-mobile
   (22px) is the equivalent comfortable size.
   Scoped to 992px — the drawer appears at 992px, not 560px.
   =============================================================
   */
@media (max-width: 992px) { /* <=992px */
  .t-mobile-nav a {
    font-size: var(--fs-nav-mobile);
    padding: 13px var(--gutter);
    min-height: 48px; /* Apple/Google tap-target guidance */
    display: flex; /* replaces display:block so */
    align-items: center; /* min-height actually applies */
  }
  .t-mobile-nav ul ul {
    padding-left: 14px;
  }
  .t-mobile-nav ul ul a {
    font-size: var(--fs-500);
    color: var(--color-muted);
    min-height: 44px;
  }
  .t-mobile-nav ul ul a:hover,
  .t-mobile-nav ul ul .active > a {
    color: var(--color-primary);
  }
  /* The drawer has no max-height, so a long menu at 22px pushes the
     page down instead of scrolling. Cap it to the viewport.
     */
  .t-mobile-nav:not([hidden]) {
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  /* section 3 gives the burger 26px bars + 8px padding = a 42px-wide
     hit area. The button that opens the menu should not be the smallest
     target on the page.
     */
  .t-burger {
    min-width: 48px;
    min-height: 48px;
  }
}

/* =============================================================
   9.3  FORM CONTROLS — 16px floor
   Controls do not inherit the page font by default. Any input under
   16px also makes iOS Safari zoom the page on focus, which leaves the
   visitor scrolled sideways with no obvious way back.
   =============================================================
   */
input,
select,
textarea,
button {
  font-family: inherit;
  font-size: var(--fs-300);
}

/* =============================================================
   9.4  CUSTOM MODULE / COMPONENT TYPE

   Load order is in our favour: index.php renders every registered
   stylesheet before it links template.css — so all of these load
   BEFORE the template. Every selector below is single-class, so
   matching it exactly is enough to win.

   These extensions ship their own CSS with sizes below our floor.
   Sizes come from the scale (--fs-*) so they re-tune with everything
   else; --fs-300 is the floor and nothing here goes under it.

   Extensions that ship no CSS at all — mod_jpc_category_card_blocks
   and mod_partfinder — are handled by the heading scale in section 2,
   not here. There is nothing of theirs to override.
   -------------------------------------------------------------
   */
/* ---- mod_partfinder_categories (media/mod_partfinder_categories/css/categories.css) */
.mod-pf-cat-name {
  font-size: var(--fs-600);
}

.mod-pf-cat-desc {
  font-size: var(--fs-400);
  color: var(--color-muted-light); /* was #777 on white — under 4.5:1 */
}

.mod-pf-cat-btn {
  font-size: var(--fs-300);
}

/* ---- com_partfinder (media/com_partfinder/css/results.css) */
.partfinder-results-count {
  font-size: var(--fs-400);
}

.partfinder-results-table {
  font-size: var(--fs-400);
}

.partfinder-results-table thead th {
  font-size: var(--fs-300);
}

.partfinder-page {
  font-size: var(--fs-400);
}

.partfinder-btn-name {
  font-size: var(--fs-600);
}

.partfinder-empty-message {
  font-size: var(--fs-500);
}

/* ---- com_partfinder (media/com_partfinder/css/product.css) */
.pf-field-label {
  font-size: var(--fs-300);
}

/* ---- mod_jpc_hero_block (modules/mod_jpc_hero_block/assets/hero.css)
   The hero title/sub already use clamp() and scale correctly. Only the
   two fixed small values need a floor.
   */
.jpc-hero-kick {
  font-size: var(--fs-300);
} /* was 16px w/ .22em tracking */
.jpc-hero-btn {
  font-size: var(--fs-400);
} /* was 15px — tap target */

/* =============================================================
   9.5  MOBILE / SMALL-TABLET CORRECTIONS  (design review 02)

   Breakpoint note: "mobile" here is 480px, not the 560px tier used
   elsewhere. The 500px-wide small-tablet pane must KEEP the top bar
   (9.5a) and KEEP the hero pull-up (9.5e), so those two rules have to
   sit below 500px. The two-row top-bar tidy-up (9.5c) stays at 560px,
   because that is where the bar starts wrapping.
   ============================================================= */

/* ---- 9.5a  Hide the top utility bar on phones ---- */
@media (max-width: 480px) {
  .t-topbar {
    display: none;
  }
}

/* ---- 9.5b  Stop grid children forcing horizontal overflow ----
   A grid item's default min-width is auto, so a long unbreakable string
   (a part number, a wide <select>) can push the track wider than the
   screen and scroll the page sideways. min-width: 0 lets the track
   shrink instead. Applies at every width. */
.t-search-panel-contents > *,
.t-search-grid > *,
.t-search-byno > * {
  min-width: 0;
}

/* ---- 9.5c  Top bar: kill the gap between the two wrapped rows ----
   The visible gap was not the flex row-gap — it was margin on the module
   output inside the bar. Joomla's mod_custom emits <p>/<div>, and section 2
   gives every <p> a 1em bottom margin, which lands between the two rows. */
@media (max-width: 560px) {
  .t-topbar-inner {
    gap: 0 16px;
    padding: 6px 0;
  }
  .t-topbar-start {
    margin-bottom: 0;
    padding-bottom: 0;
  }
  .t-topbar-end {
    margin-top: 0;
    padding-top: 0;
  }
  .t-topbar-start > *,
  .t-topbar-end > *,
  .t-topbar p,
  .t-topbar ul,
  .t-topbar div {
    margin-block: 0;
  }
  .t-topbar a {
    padding-block: 2px;
  }
}

/* ---- 9.5d  Search panel: stack the two halves instead of overflowing ----
   The 3fr/2fr split leaves each input under ~150px below tablet width. */
@media (max-width: 992px) {
  .t-feature-top .t-search-panel .t-search-panel-contents {
    grid-template-columns: 1fr;
  }
}

/* Single-column inputs on a phone.
   NOTE the button: section 6 sets grid-column-start:1 / grid-column-end:3 on
   it. In a one-column grid, line 3 does not exist, so the browser creates an
   implicit second column to satisfy it — which is itself a cause of the page
   scrolling sideways. grid-column: 1 / -1 spans "to the last line" whatever
   the column count, so it is correct at every width. */
@media (max-width: 560px) {
  .t-feature-top .t-search-panel .t-search-panel-contents .t-search-grid {
    grid-template-columns: 1fr;
  }
  .t-feature-top .t-search-panel .t-search-panel-contents .t-search-grid button.t-btn {
    grid-column: 1/-1;
  }
}

/* ---- 9.5e  Don't pull the search panel over the hero on phones ----
   Two separate negative margins stack up here: .t-feature-top (-6rem,
   section 6) and .t-search-panel (-40px, section 4). Zeroing only the first
   still leaves the panel 40px over the hero image, so both are released. */
@media (max-width: 480px) {
  .t-feature-top {
    margin-top: 0;
  }
  .t-search-panel,
  .t-feature-top .t-search-panel {
    margin-top: 0;
  }
}

/* =============================================================
   9.6  MOBILE DRAWER — anchor it to the sticky header

   The drawer used to be a normal-flow sibling after </header>, i.e.
   parked at the top of the document. .t-header is position:sticky, so
   the burger follows you down the page while the panel did not: tapping
   it at scroll offset 2000px opened the drawer 2000px above the
   viewport. The click and the JS were fine — the panel was simply
   off-screen, which read as "the burger does nothing unless you are at
   the top of the page."

   index.php now renders the drawer inside <header class="t-header">.
   Because sticky is a positioned element, the header is the drawer's
   containing block, so top:100% pins the panel to the underside of the
   header at every scroll offset. No JS involved.

   Side effect, and the correct behaviour for a sticky header: the drawer
   now OVERLAYS the page instead of pushing it down.
   ============================================================= */
@media (max-width: 992px) {
  .t-mobile-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: var(--z-dropdown);
    box-shadow: var(--shadow);
  }
}

/* =============================================================
   9.7  SMALL-PHONE HEADER FIT

   At 320px the .t-wrap gutters leave a 272px content box, and the header
   row wants roughly: logo 155 + phone ~130 + burger 48 + two 30px gaps
   = ~393px. Flexbox absorbs the ~120px overflow by shrinking .t-logo,
   which is what produced the squashed logo before section 3 was made
   aspect-ratio safe.

   The logo now shrinks proportionally rather than distorting, but left
   alone it gets very small. Tightening the gap and the phone number
   gives it room back.
   ============================================================= */
@media (max-width: 480px) {
  .t-header-inner {
    gap: 14px;
  }
  .t-logo img {
    max-height: 38px;
  }
  .t-header-end {
    font-size: var(--fs-300);
  }
}

/* ==================================================================
   10. STACKING / Z-INDEX  (must stay LAST)
   ================================================================== */

/* =============================================================
   mwd2026 — stacking / layering rules

   WHY THIS FILE EXISTS
   The site header is `position: sticky` and must stay on top of, and
   clickable above, everything that scrolls under it. Module content is
   written by other people — third-party extensions, page builders and
   HTML pasted into a Custom module routinely carry `z-index: 999` or
   `9999`. Raising the header's own z-index alone is an arms race you
   eventually lose.

   THE FIX (two layers of defence)
   1. The header sits at var(--z-header) = 1000, well above ordinary
   module CSS (see section 3 / section 1).
   2. Every region that renders module or component output gets
   `isolation: isolate`. That makes the region its own stacking
   context, so a `z-index: 99999` inside a module only competes with
   its siblings *inside that region* — the whole region still paints
   below the header. This is what makes the fix permanent.

   ESCAPE HATCH
   If a module legitimately needs to cover the whole viewport (a
   lightbox, cookie bar, off-canvas panel), give any element inside it
   the class `t-overlay-escape`. Its region stops isolating, and the
   module's own z-index applies again — use var(--z-overlay) (1100) so
   it lands above the header rather than under it.

   NOTE: this region list is mwd2026's, read from index.php. It is NOT
   the same as pcom2026's. If you add a module region to index.php, add
   its wrapper class to BOTH selector lists below.

   `.t-mobile-nav` is deliberately absent: it sits in normal flow (it
   pushes the page down rather than overlaying it) and its sub-menus are
   statically positioned, so it has nothing to isolate.

   The negative-margin pull-ups (`.t-search-panel` at section 2, line 117,
   `section 6, line 82`) still work: `.t-hero-region` and `.t-main` become
   sibling stacking contexts, and `.t-main` is later in the DOM, so it
   continues to paint above the hero.
   =============================================================
   */
/* Regions that render module / component output.
   Keep this list in sync with the regions in index.php.
   */
.t-topbar,
.t-hero-region,
.t-feature-top,
.t-feature-grid,
.t-subfeature,
.t-cta,
.t-pagehead,
.t-main,
.t-main-top,
.t-main-bottom,
.t-layout,
.t-content,
.t-sidebar,
.t-footer {
  isolation: isolate;
}

/* Opt out per region when a module inside it must overlay the page. */
:is(.t-topbar,
.t-hero-region,
.t-feature-top,
.t-feature-grid,
.t-subfeature,
.t-cta,
.t-pagehead,
.t-main,
.t-main-top,
.t-main-bottom,
.t-layout,
.t-content,
.t-sidebar,
.t-footer):has(.t-overlay-escape) {
  isolation: auto;
}

/* Helper for content that has opted out: put it above the header on purpose. */
.t-overlay-escape {
  z-index: var(--z-overlay);
}
