:root {
  /* Brand palette */
  --maroon: #780001;
  --navy: #01036a;
  --charcoal: #000100;
  --slate: #777976;
  --white: #fafcf9;
  --border-default: #d1d5db;
  --bg-page: var(--white);
  --text-primary: var(--charcoal);
  --text-muted: var(--slate);

  font-family: 'Inter', "Inter Fallback", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
}

a { color: inherit; text-decoration: none; }

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border-default);
}

.brand {
  display: flex;
  align-items: center;
  margin-right: 24px;
}
.brand-logo {
  height: 44px;
  width: auto;
  display: block;
}

.header-search-form {
  position: relative;
  flex: 1 1 auto;
  max-width: 480px;
  margin: 0 auto;
  display: block;
}
.header-search {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--white);
}
.header-search:focus {
  outline: none;
  border-color: var(--maroon);
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--maroon);
}
.header-search::placeholder { color: #9ca3af; }

/* Visible "Search" submit (icon + label) -- search must be recognizable
   without relying on the placeholder, and mouse users need a way to run
   the full search without pressing Enter (VectorLab `labels`). */
.header-search-form { display: flex; gap: 8px; align-items: stretch; }
.header-search-form .header-search { flex: 1 1 auto; min-width: 0; }
.header-search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--maroon);
  border-radius: 6px;
  background: var(--maroon);
  color: var(--white);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.header-search-submit:hover { background: #5c0001; }
@media (max-width: 767.98px) {
  .header-search-submit { width: 44px; flex-shrink: 0; padding: 0; }
  .header-search-submit-label { display: none; }
}

.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;
}

/* ---------- Live search dropdown ---------- */

.search-suggest-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 55;
  background: var(--white);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
  max-height: 70vh;
  overflow-y: auto;
  padding: 4px;
}
/* Same cascade gotcha as the mega menu / nav "More" dropdown earlier --
   an unconditional display here would beat the browser's own
   [hidden]{display:none} default regardless of specificity ties, so this
   explicit override is required, not optional. */
.search-suggest-panel[hidden] { display: none; }

.search-suggest-section { padding: 10px 10px 14px; }
.search-suggest-section + .search-suggest-section { border-top: 1px solid var(--border-default); }
.search-suggest-heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.search-suggest-category-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.search-suggest-category-list a {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-primary);
}
.search-suggest-category-list a:hover { background: var(--bg-page); color: var(--maroon); }
.search-suggest-category-path { font-size: 12px; color: var(--text-muted); }
.search-suggest-category-list a:hover .search-suggest-category-path { color: inherit; opacity: 0.75; }

.search-suggest-brand-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.search-suggest-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  font-size: 13px;
  color: var(--text-primary);
}
.search-suggest-chip:hover { border-color: var(--maroon); color: var(--maroon); }

.search-suggest-product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 8px;
}
.search-suggest-product:hover { background: var(--bg-page); }
.search-suggest-product-media {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 6px;
  overflow: hidden;
}
.search-suggest-product-media img { width: 100%; height: 100%; object-fit: contain; }
.search-suggest-product-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.search-suggest-product-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-suggest-product-meta { font-size: 12px; color: var(--text-muted); }

.search-suggest-viewall {
  display: block;
  margin-top: 6px;
  padding: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--maroon);
  border-radius: 6px;
}
.search-suggest-viewall:hover { background: var(--bg-page); }

.search-suggest-empty { padding: 14px 10px; font-size: 13px; color: var(--text-muted); margin: 0; }

/* ---------- Nav ---------- */

.site-nav {
  display: flex;
  gap: 28px;
  padding: 14px 32px;
  border-bottom: 1px solid var(--border-default);
  font-size: 14px;
}
.site-nav a { color: var(--text-primary); }
.site-nav a:hover { color: var(--maroon); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Inter', "Inter Fallback", Arial, Helvetica, sans-serif;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--maroon);
  color: var(--white);
}
.btn-primary:hover { background: #5c0001; }
.btn-secondary {
  background: var(--white);
  color: var(--text-primary);
  border-color: var(--border-default);
}
.btn-secondary:hover { border-color: var(--maroon); color: var(--maroon); }

/* ---------- Page shell ---------- */

.page { padding: 24px 32px 64px; max-width: 1440px; margin: 0 auto; }

.breadcrumb { font-size: 13px; color: var(--text-muted); margin: 0 0 16px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--maroon); }
.breadcrumb span { color: var(--text-primary); font-weight: 600; }

.page-title {
  font-family: 'Inter', "Inter Fallback", Arial, Helvetica, sans-serif;
  font-style: oblique 10deg;
  font-weight: 700;
  color: var(--maroon);
  font-size: 32px;
  margin: 0 0 6px;
}
.page-subtitle { color: var(--text-muted); font-size: 15px; margin: 0 0 32px; }

/* ---------- Contact page ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 767.98px) {
  .contact-layout { grid-template-columns: 1fr; }
}

.card { background: var(--white); }

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 18px;
}
@media (max-width: 767.98px) {
  .contact-form .form-row { grid-template-columns: 1fr; }
}
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.contact-form .form-row .form-field { margin-bottom: 0; }
.form-field label { font-size: 13px; font-weight: 600; color: var(--text-primary); }

.form-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--white);
}
.form-input::placeholder { color: #9ca3af; }
.form-input:focus { outline: none; border-color: var(--maroon); box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--maroon); }
textarea.form-input { resize: vertical; min-height: 140px; }

.field-error { color: #b91c1c; font-size: 12px; margin: 2px 0 0; }
/* Form-level error (bot check failed / rate limited) above the submit button */
.form-error { font-size: 14px; margin: 0 0 12px; }
/* Reserve the Turnstile widget's height (65px) so the button doesn't jump when it loads */
.contact-turnstile { min-height: 65px; }

/* Honeypot -- off-screen, not display:none (some spam bots skip
   display:none/type=hidden fields specifically). */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.contact-success {
  padding: 48px 0;
  text-align: center;
}
.contact-success h2 {
  font-family: 'Inter', "Inter Fallback", Arial, Helvetica, sans-serif;
  font-style: oblique 10deg;
  font-weight: 700;
  color: var(--maroon);
  font-size: 26px;
  margin: 0 0 8px;
}
.contact-success p { color: var(--text-muted); margin: 0; }

/* ---------- Contact info panel ---------- */

.contact-info {
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 24px;
}
.info-block {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-default);
}
.info-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.info-block h3 {
  color: var(--maroon);
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 8px;
}
.info-block p { margin: 0; font-size: 14px; line-height: 1.5; }

.hours { margin: 0; }
.hours > div {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 2px 0;
}
.hours dt { font-weight: 500; color: var(--text-primary); }
.hours dd { margin: 0; font-weight: 600; }
.hours .closed dd { color: #9ca3af; font-weight: 400; }

/* ---------- Messages ---------- */

.messages { list-style: none; margin: 0; padding: 12px 32px; }
.messages li { padding: 8px 12px; border-radius: 6px; margin-bottom: 8px; font-size: 14px; }

/* ---------- Nav pills (Home + future category pages) ---------- */

.site-nav { gap: 8px; flex-wrap: wrap; }
.nav-pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-family: 'Inter', "Inter Fallback", Arial, Helvetica, sans-serif;
  font-weight: 600;
  white-space: nowrap;
}
.nav-pill:hover { color: var(--maroon); }
.nav-pill.active {
  background: var(--maroon);
  color: var(--white);
  font-weight: 600;
}
.nav-pill.active:hover { color: var(--white); }

/* JS-driven collapse (nav-collapse.js): once it runs, it adds this class
   and takes over from the flex-wrap fallback above -- the row stays single
   line and whatever doesn't fit moves into the "More" dropdown instead of
   wrapping. Pills keep white-space: nowrap either way so a long label
   wraps onto extra ROWS (the fallback) rather than breaking itself onto
   extra LINES mid-pill. */
.site-nav.js-nav-collapse { flex-wrap: nowrap; overflow: visible; }
/* overflow stays visible (not hidden) on the nav itself -- the "More"
   dropdown is an absolutely-positioned descendant of it, and overflow:
   hidden on an ancestor clips absolutely-positioned content too, which
   silently hid the whole dropdown behind the nav row. Nothing actually
   overflows the row once nav-collapse.js has run a recalc anyway. */

.nav-more-wrap { position: relative; flex-shrink: 0; }
.nav-more-toggle {
  display: inline-flex;
  align-items: center;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-primary);
}
.nav-more-toggle::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}
.nav-more-toggle:hover { color: var(--maroon); }
.nav-more-toggle.open { background: var(--bg-page); }
.nav-more-count { color: var(--text-muted); font-weight: 500; }
.nav-more-toggle:hover .nav-more-count,
.nav-more-toggle.open .nav-more-count { color: inherit; }

.nav-more-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 220px;
  max-width: calc(100vw - 32px);
  background: var(--white);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* `display: flex` above is an author-stylesheet rule, which beats the
   browser's own `[hidden] { display: none }` default regardless of
   selector specificity (author origin always outranks user-agent origin
   in the cascade) -- so without this override, toggling the `hidden`
   attribute via nav-collapse.js did nothing visually and the dropdown
   looked permanently open. This selector's higher specificity (class +
   attribute) makes the closed state actually hide it. */
.nav-more-panel[hidden] { display: none; }
.nav-more-panel .nav-pill {
  display: block;
  width: 100%;
  white-space: normal;
  text-align: left;
  border-radius: 8px;
}

/* ---------- Hero (Home) ---------- */

.hero { padding-top: 32px; padding-bottom: 8px; }
.hero-title {
  font-family: 'Inter', "Inter Fallback", Arial, Helvetica, sans-serif;
  font-style: oblique 10deg;
  font-weight: 700;
  color: var(--maroon);
  font-size: 34px;
  max-width: 700px;
  margin: 0 0 16px;
}
.hero-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
  max-width: 680px;
  margin: 0 0 24px;
}

/* ---------- Product grid (Home, later category pages) ---------- */

.product-section { margin-top: 48px; }
.section-title { font-family: 'Inter', "Inter Fallback", Arial, Helvetica, sans-serif; font-size: 22px; font-weight: 700; margin: 0 0 20px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
@media (max-width: 1279.98px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767.98px) {
  .product-grid { grid-template-columns: 1fr; }
}

.product-card {
  border: 1px solid var(--border-default);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product-card-media {
  aspect-ratio: 4 / 3;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card-media img { width: 100%; height: 100%; object-fit: contain; }
.product-card-media { text-decoration: none; }

.no-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  width: 100%;
  height: 100%;
}
.no-image-placeholder svg { width: 32%; max-width: 56px; height: auto; opacity: 0.7; }
.no-image-placeholder--large svg { max-width: 88px; }
.no-image-label {
  font-family: 'Inter', "Inter Fallback", Arial, Helvetica, sans-serif;
  font-size: 13px;
}
.product-card-title a { color: inherit; text-decoration: none; }
.product-card-title a:hover { color: var(--maroon); }
.product-card-body { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.product-card-title {
  font-family: 'Inter', "Inter Fallback", Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  /* Titles vary wildly in length (EPCOM data) -- truncatewords in the
     template shortens the worst offenders, and this clamp guarantees
     every card's title block is exactly 2 lines tall regardless, so the
     Contact Us button lands at the same height across a row. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.3em * 2);
}
.product-card-brand {
  font-family: 'Inter', "Inter Fallback", Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--navy);
  margin: 0;
  min-height: 1.4em;
  line-height: 1.4em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.product-card-model {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 8px;
  min-height: 1.4em;
  line-height: 1.4em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.product-card-cta { margin-top: auto; width: 100%; }

.empty-state { color: var(--text-muted); font-size: 14px; line-height: 1.5; }
div.empty-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 32px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
}
div.empty-state p { margin: 0; max-width: 65ch; }
.empty-state-title { font-size: 16px; font-weight: 600; color: var(--text-primary); }
div.empty-state .btn { margin-top: 8px; }

/* ---------- Pagination ---------- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}
.pagination-status { font-size: 14px; color: var(--text-muted); }
.btn-disabled { opacity: 0.5; cursor: default; pointer-events: none; }

/* ---------- Category listing ---------- */

.category-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-top: 8px;
}

.category-sidebar { width: 260px; flex-shrink: 0; }
.sidebar-section { margin-bottom: 24px; }
.sidebar-heading {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 10px;
}
.sidebar-divider { height: 1px; background: var(--border-default); margin-bottom: 24px; }

.sort-select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--white);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
}

.category-search-input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--white);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  margin-bottom: 12px;
}
.category-search-input:focus {
  outline: none;
  border-color: var(--maroon);
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--maroon);
}
.category-search-empty { font-size: 13px; color: var(--text-muted); margin: 8px 0 0; }

.category-filter-list { display: flex; flex-direction: column; gap: 10px; }
.category-filter-item[hidden] { display: none; }
.category-filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  font-size: 13px;
  cursor: pointer;
  gap: 8px;
}
.category-filter-check { display: flex; align-items: center; gap: 8px; color: var(--text-primary); }
.category-filter-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--maroon);
}
.category-filter-count { color: var(--text-muted); flex-shrink: 0; }

.category-products { flex: 1; min-width: 0; }
.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.category-title {
  font-family: 'Inter', "Inter Fallback", Arial, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.category-count { font-size: 13px; color: var(--text-muted); margin: 0; }

.product-grid--narrow { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1279.98px) { .product-grid--narrow { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767.98px) {
  .category-content { flex-direction: column; }
  .category-sidebar { width: 100%; }
  .product-grid--narrow { grid-template-columns: 1fr; }
}

/* ---------- Product detail ---------- */

.product-main {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  margin-top: 8px;
  flex-wrap: wrap;
}

.product-gallery { display: flex; gap: 16px; }
.gallery-thumbs { display: flex; flex-direction: column; gap: 10px; }
.gallery-thumb {
  width: 64px;
  height: 64px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
}
.gallery-thumb.active { border: 2px solid var(--maroon); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }

.gallery-main {
  width: 480px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }

.product-details {
  flex: 1 1 400px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.product-detail-title {
  font-family: 'Inter', "Inter Fallback", Arial, Helvetica, sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.feature-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.feature-list li { display: flex; align-items: center; gap: 10px; }
.feature-check { color: #1b9151; font-weight: 700; }

.product-meta-divider { height: 1px; background: var(--border-default); }
.product-meta-rows { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.meta-label { color: var(--text-muted); font-weight: 500; margin-right: 4px; }
.meta-value { color: var(--navy); font-weight: 600; }

.contact-cta-box {
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-cta-heading { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0; }
.contact-cta-subtext { font-size: 13px; color: var(--text-muted); margin: 0 0 8px; }
.contact-cta-box .btn { align-self: flex-start; }

/* ---------- All Products mega menu ---------- */

#mega-menu-toggle { cursor: pointer; }

.mega-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 40;
}

.mega-menu-panel {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border-default);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
  max-height: 80vh;
  overflow-y: auto;
}
.mega-menu-inner { padding: 28px 64px 40px; display: flex; flex-direction: column; gap: 24px; }

.mega-menu-search {
  width: 360px;
  max-width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--maroon);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  /* Was var(--text-muted) back when this field was permanently disabled --
     now that it's wired up, muted belongs on the placeholder only, or
     what you type looks greyed out. */
  color: var(--text-primary);
}
.mega-menu-search::placeholder { color: var(--text-muted); }
.mega-menu-search-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); margin: 0 0 -16px; }
.mega-menu-search:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--maroon);
}

.mega-menu-search-results {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 560px;
}
/* Same cascade gotcha hit twice already this session (nav "More" dropdown,
   mega menu panel itself, header search dropdown) -- an unconditional
   `display` here beats the browser's own [hidden]{display:none} default
   regardless of specificity, so toggling the `hidden` attribute from JS
   does nothing without this explicit override. Applies to .mega-menu-columns
   below too, since it's swapped the same way. */
.mega-menu-search-results[hidden] { display: none; }
.mega-menu-search-result {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-primary);
}
.mega-menu-search-result:hover { background: var(--bg-page); color: var(--maroon); }
.mega-menu-search-result-context { color: var(--text-muted); }
.mega-menu-search-empty { font-size: 13px; color: var(--text-muted); margin: 8px 0 0; padding: 0 10px; }

.mega-menu-columns { display: flex; gap: 36px; flex-wrap: wrap; }
.mega-menu-columns[hidden] { display: none; }

.mega-menu-roots { width: 260px; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px; }
.mega-menu-root-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.mega-menu-root-item.active {
  background: var(--bg-page);
  color: var(--maroon);
  font-weight: 600;
  border-left-color: var(--maroon);
}

.mega-menu-subs { flex: 1; min-width: 200px; }
.mega-menu-subsubs { flex: 1; min-width: 200px; }
.mega-menu-sub-heading { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 0 0 10px; }
.mega-menu-subsub-list .mega-menu-sub-heading {
  border-left: 3px solid var(--maroon);
  padding-left: 10px;
}
.mega-menu-sub-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 6px;
}
.mega-menu-sub-link:hover { color: var(--maroon); background: var(--bg-page); }
.mega-menu-sub-link--all { color: var(--maroon); font-weight: 500; margin-bottom: 4px; }
/* Column-2 items that have their own children (shown in column 3 on
   hover/focus -- see mega-menu.js selectSub()). .active marks whichever
   one is currently previewed, same highlight language as
   .mega-menu-root-item.active. */
.mega-menu-sub-link--parent.active {
  background: var(--bg-page);
  color: var(--maroon);
  font-weight: 600;
}
.mega-menu-chevron {
  width: 6px;
  height: 6px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ---------- Responsive (header / nav / mega menu / page) ---------- */

@media (max-width: 767.98px) {
  .site-header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
  }
  .header-search-form {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    margin: 0;
  }
  .site-nav { padding: 12px 16px; }
  .page { padding: 16px 16px 48px; }
  .messages { padding: 12px 16px; }
  .mega-menu-inner { padding: 20px 20px 32px; }
  .mega-menu-columns { gap: 20px; }
  .mega-menu-roots { width: 100%; }
  .mega-menu-subs { min-width: 0; }
  .mega-menu-subsubs { min-width: 0; }
}


/* ---------- Contact submit: sending state ---------- */
/* Shown while the HTMX request is in flight (Brevo SMTP can take >1s);
   label switches to "Sending..." in contact-form.js, so the state never
   relies on the spinner's motion alone (VectorLab `loaders`/`reduced-motion`). */
.contact-submit { gap: 8px; }
.contact-submit-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(250, 252, 249, 0.4);
  border-top-color: var(--white);
  border-radius: 50%;
}
.contact-submit.is-sending { pointer-events: none; }
.contact-submit.is-sending .contact-submit-spinner {
  display: inline-block;
  animation: contact-spin 300ms linear infinite;
}
@keyframes contact-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .contact-submit.is-sending .contact-submit-spinner { animation: none; }
}
