/* ==========================================================================
   FIVER — Fitment Ledger
   shell.css — the shared shell and the reusable component layer
   --------------------------------------------------------------------------
   Every page type on this site uses the same four regions:

       topbar -> masthead -> nav -> (page body) -> footer -> dock

   The shell is deliberately quiet: graphite chrome, hairline rules, one
   accent colour that the page mode controls. All the personality lives in
   the page body, which is what lets eight different page types share a
   header without looking like eight copies of the same template.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Utility bar
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--graphite);
  color: #B7BEC7;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--graphite-3);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 36px;
}
.topbar__group { display: flex; align-items: center; gap: 20px; }
.topbar__group a { color: #D4D9DF; }
.topbar__group a:hover { color: #fff; }
.topbar__sep { color: var(--graphite-3); }
.topbar__lang { display: flex; align-items: center; gap: 8px; }
.topbar__lang .is-active { color: var(--brand-orange-lt); }
.topbar__dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand-orange);
  display: inline-block;
}

/* --------------------------------------------------------------------------
   2. Masthead
   -------------------------------------------------------------------------- */
.masthead {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.masthead__inner {
  display: flex;
  align-items: center;
  gap: 40px;
  min-height: 100px;
  padding: 16px var(--gutter);
  max-width: var(--wrap);
  margin: 0 auto;
}
.masthead__brand { flex: 0 0 auto; display: block; }
.masthead__logo { height: 58px; width: auto; }

.masthead__tagline {
  flex: 0 0 auto;
  padding-left: 22px;
  border-left: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.7;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
  max-width: 190px;
}
.masthead__tagline b { color: var(--ink); font-weight: 600; }

/* the fitment search — styled as a part-number entry line */
.fitsearch { flex: 1 1 auto; max-width: 560px; }
.fitsearch__form {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--ink);
  background: #fff;
  height: 46px;
}
.fitsearch__key {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  padding: 0 16px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  background: transparent;
}
.fitsearch__key::placeholder { color: var(--ink-4); text-transform: uppercase; font-size: 0.72rem; letter-spacing: .12em; }
.fitsearch__key:focus { outline: none; }
.fitsearch__go {
  flex: 0 0 auto;
  width: 52px;
  display: grid;
  place-items: center;
  background: var(--graphite);
  color: #fff;
  transition: background-color .18s ease;
}
.fitsearch__go:hover { background: var(--accent); }
.fitsearch__hint {
  display: flex;
  gap: 14px;
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-4);
  flex-wrap: wrap;
}
.fitsearch__hint a:hover { color: var(--accent); }

.masthead__actions { flex: 0 0 auto; display: flex; align-items: center; gap: 22px; }
.masthead__phone { text-align: right; }
.masthead__phone-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.masthead__phone-number {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.masthead__toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  place-items: center;
}

/* --------------------------------------------------------------------------
   3. Primary navigation
   -------------------------------------------------------------------------- */
.nav {
  background: var(--graphite);
  position: relative;
  z-index: 60;
}
.nav__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: stretch;
}
.nav__list {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
}
.nav__item { position: relative; display: flex; }
.nav__link {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 20px;
  font-family: var(--font-display);
  font-weight: 650;
  font-stretch: 104%;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #C9CFD6;
  transition: color .16s ease, background-color .16s ease;
  white-space: nowrap;
}
.nav__link:hover { color: #fff; background: var(--graphite-2); }
.nav__item.is-current > .nav__link { color: #fff; background: var(--graphite-2); }
.nav__item.is-current > .nav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--accent);
}

.nav__spacer { flex: 1 1 auto; }
.nav__cta {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 22px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
}
.nav__cta:hover { background: var(--accent-deep); }

.nav__burger { display: none; }

/* --- mega menu ----------------------------------------------------------- */
.mega {
  position: absolute;
  top: 100%;
  left: 0;
  width: min(880px, calc(100vw - 48px));
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  box-shadow: 0 24px 48px -24px rgba(20, 26, 34, .38);
  padding: 26px 28px 30px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 70;
}
.nav__item:hover > .mega,
.nav__item:focus-within > .mega {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.mega__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 32px;
}
.mega__col h4 {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
  padding-bottom: 9px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.mega__col li a {
  display: block;
  padding: 5px 0;
  font-size: 0.92rem;
  color: var(--ink-2);
  transition: color .14s ease, transform .14s ease;
}
.mega__col li a:hover { color: var(--accent); transform: translateX(3px); }
.mega__foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.mega__foot p { font-size: 0.86rem; color: var(--ink-3); }

/* --------------------------------------------------------------------------
   4. Breadcrumb + page header (shared inner-page furniture)
   -------------------------------------------------------------------------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.crumbs a:hover { color: var(--accent); }
.crumbs__sep { opacity: .5; }
.crumbs [aria-current] { color: var(--ink-2); }

.pagehead {
  padding: 46px 0 40px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.pagehead__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.pagehead__title { margin-top: 14px; }
.pagehead__sub { margin-top: 12px; max-width: 620px; color: var(--ink-3); }

/* --------------------------------------------------------------------------
   5. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--graphite);
  color: #A8B0BA;
  padding: 66px 0 0;
  border-top: 4px solid var(--accent);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 48px;
  padding-bottom: 52px;
}
.footer__logo { height: 52px; width: auto; margin-bottom: 20px; }
.footer__blurb { font-size: 0.92rem; line-height: 1.75; max-width: 34ch; }
.footer h4 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--graphite-3);
}
.footer__list li { margin-bottom: 9px; }
.footer__list a { font-size: 0.92rem; transition: color .14s ease; }
.footer__list a:hover { color: var(--brand-orange-lt); }
.footer__contact li {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.footer__contact svg { flex: 0 0 auto; margin-top: 3px; color: var(--brand-orange-lt); }
.footer__contact b { display: block; color: #fff; font-weight: 500; }

.footer__bar {
  border-top: 1px solid var(--graphite-3);
  padding: 22px 0 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: #79828D;
}
.footer__bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}
.footer__bar-inner > span { min-width: 0; }
.footer__bar nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer__bar a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   6. Inquiry dock (floating)
   --------------------------------------------------------------------------
   Only the quote button is visible at rest. The rest of the rail unfolds on
   hover or keyboard focus, so the resting footprint is a single 48 px square
   in the corner instead of a column that sits on top of the page's calls to
   action.
   -------------------------------------------------------------------------- */
.dock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.dock__stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dock__stack .dock__btn {
  opacity: 0;
  transform: translateY(10px) scale(.88);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, background-color .16s ease;
}
.dock:hover .dock__stack .dock__btn,
.dock:focus-within .dock__stack .dock__btn {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.dock__row { display: flex; align-items: center; gap: 8px; }
.dock__btn--top {
  opacity: 0;
  transform: translateY(10px) scale(.88);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, background-color .16s ease;
}
.dock.is-active .dock__btn--top {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.dock.is-active .dock__btn--top:hover { transform: translateY(-2px); }
.dock__btn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-2);
  box-shadow: 0 10px 24px -14px rgba(20, 26, 34, .5);
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
}
.dock__btn:hover { background: var(--graphite); color: #fff; transform: translateY(-2px); }
.dock__btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.dock__btn--accent:hover { background: var(--accent-deep); }
.dock__tip {
  position: absolute;
  right: 58px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--graphite);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
  z-index: 2;
}
.dock__btn:hover .dock__tip { opacity: 1; }
.dock__btn { position: relative; }

/* --------------------------------------------------------------------------
   7. Components
   -------------------------------------------------------------------------- */

/* --- data table ---------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: #fff; }
.data-table { font-size: 0.94rem; }
.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
}
.data-table thead th {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--paper-2); }
.data-table td.is-key {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-2);
  white-space: nowrap;
  width: 1%;
}
.data-table td.is-mono { font-family: var(--font-mono); font-size: 0.84rem; }
.data-table .is-accent { color: var(--accent-deep); font-weight: 600; }

/* --- form ---------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field label .req { color: var(--accent); }
.field input, .field textarea, .field select {
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: 11px 13px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.field__hint { font-size: 0.78rem; color: var(--ink-4); }
.field__error { font-size: 0.78rem; color: #B4402A; display: none; }
.field.has-error input, .field.has-error textarea { border-color: #B4402A; }
.field.has-error .field__error { display: block; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid .field--full { grid-column: 1 / -1; }

/* --- pagination ---------------------------------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.pagination a, .pagination span {
  min-width: 38px; height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  transition: all .15s ease;
}
.pagination a:hover { border-color: var(--ink); color: var(--ink); }
.pagination .is-current { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.pagination .gap { border: 0; min-width: 22px; }

/* --- notice / callout ---------------------------------------------------- */
.notice {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 18px 22px;
  font-size: 0.95rem;
  line-height: 1.65;
}
.notice--dark {
  background: var(--graphite-2);
  border-left-color: var(--brand-orange-lt);
  color: #C4CAD1;
}

/* --- rail (sidebar) ------------------------------------------------------ */
.rail { width: var(--rail); flex: 0 0 var(--rail); }
.rail__block { border: 1px solid var(--line); background: #fff; margin-bottom: 22px; }
.rail__head {
  background: var(--graphite);
  color: #fff;
  padding: 13px 16px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rail__body { padding: 16px; }

/* accordion */
.acc__item { border-bottom: 1px solid var(--line-2); }
.acc__item:last-child { border-bottom: 0; }
.acc__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 4px;
  text-align: left;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color .14s ease;
}
.acc__btn:hover { color: var(--accent); }
.acc__btn[aria-expanded="true"] { color: var(--accent); }
.acc__btn .acc__sign {
  flex: 0 0 auto;
  width: 14px; height: 14px;
  position: relative;
}
.acc__btn .acc__sign::before, .acc__btn .acc__sign::after {
  content: '';
  position: absolute;
  background: currentColor;
}
.acc__btn .acc__sign::before { left: 0; right: 0; top: 6px; height: 1.5px; }
.acc__btn .acc__sign::after { top: 0; bottom: 0; left: 6px; width: 1.5px; transition: transform .18s ease; }
.acc__btn[aria-expanded="true"] .acc__sign::after { transform: scaleY(0); }
.acc__panel { display: none; padding: 0 4px 12px; }
.acc__panel.is-open { display: block; }
.acc__panel a {
  display: block;
  padding: 5px 0 5px 12px;
  font-size: 0.88rem;
  color: var(--ink-3);
  border-left: 1px solid var(--line);
  transition: color .14s ease, border-color .14s ease;
}
.acc__panel a:hover { color: var(--accent); border-left-color: var(--accent); }
.acc__panel a.is-active { color: var(--accent-deep); font-weight: 600; border-left-color: var(--accent); }

/* --- figure / plate ------------------------------------------------------ */
.plate {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}
.plate img { width: 100%; }
.plate--contain img { object-fit: contain; }

/* --- tags ---------------------------------------------------------------- */
.tags { display: flex; flex-wrap: wrap; gap: 7px; }

/* --- reveal -------------------------------------------------------------- */
.reveal { opacity: 1; }
.reveal.is-armed { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   8. Responsive shell
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .masthead__tagline { display: none; }
  .masthead__phone { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 900px) {
  .topbar__inner { height: auto; padding: 8px var(--gutter); flex-wrap: wrap; gap: 8px 20px; }
  .topbar__group--left .topbar__hide-sm { display: none; }
  .masthead__inner { flex-wrap: wrap; gap: 18px; min-height: 0; padding: 14px var(--gutter); }
  .masthead__brand { order: 1; }
  .masthead__toggle { display: grid; order: 2; margin-left: auto; }
  .fitsearch { order: 3; flex-basis: 100%; max-width: none; }
  .masthead__actions { display: none; }

  .nav__inner { flex-wrap: wrap; padding: 0; }
  .nav__burger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 var(--gutter);
    height: 54px;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .nav__list { display: none; width: 100%; flex-direction: column; padding-bottom: 12px; }
  .nav__list.is-open { display: flex; }
  .nav__link { height: 46px; border-top: 1px solid var(--graphite-3); }
  .nav__spacer { display: none; }
  .nav__cta { justify-content: center; }
  .mega {
    position: static;
    width: 100%;
    box-shadow: none;
    border-left: 0; border-right: 0;
    transform: none;
    opacity: 1; visibility: visible;
    display: none;
  }
  .nav__item:hover > .mega { display: none; }
  .mega__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .pagehead__inner { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* --------------------------------------------------------------------------
   9. Mobile banner-adjacent furniture (2026-11-14 follow-up)
   The breadcrumb strip above a page banner and the fitment-search hint were
   wrapping into cramped double lines on 375–414 px phones.
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .crumbs {
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    gap: 3px 6px;
    line-height: 1.6;
  }
  .fitsearch__key::placeholder {
    font-size: 0.64rem;
    letter-spacing: 0.08em;
  }
  .fitsearch__hint {
    font-size: 0.6rem;
    gap: 3px 10px;
    line-height: 1.6;
  }
}
