/*
 * IG Parts listing control layer.
 *
 * Loaded after the host-specific portal skin. It deliberately owns only the
 * customer-type selection state and never affects GoFleet hosts.
 */
body.igparts-site .igparts-page .gofleet-customer-toggle,
body.igparts-site .igparts-page .mmh-customer-toggle {
  width: min(100%, 17rem);
  gap: 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.igparts-site .igparts-page .gofleet-customer-toggle__btn,
body.igparts-site .igparts-page .mmh-customer-toggle__btn {
  flex: 1 1 0;
  min-inline-size: 0;
  border: 1px solid #d7e1f2;
  border-radius: 3px;
  background: #eef4ff;
  color: var(--ig-navy);
  box-shadow: none;
}

body.igparts-site .igparts-page .gofleet-customer-toggle__btn:hover:not(.gofleet-customer-toggle__btn--active),
body.igparts-site .igparts-page .mmh-customer-toggle__btn:hover:not(.mmh-customer-toggle__btn--active) {
  background: #e4edfb;
  color: var(--ig-navy);
}

body.igparts-site .igparts-page .gofleet-customer-toggle__btn--active,
body.igparts-site .igparts-page .mmh-customer-toggle__btn--active {
  border-color: var(--ig-navy);
  background: var(--ig-navy);
  color: var(--ig-white);
  box-shadow: none;
}

body.igparts-site .igparts-page .gofleet-customer-toggle__btn--active .gofleet-customer-toggle__sub,
body.igparts-site .igparts-page .mmh-customer-toggle__btn--active .mmh-customer-toggle__sub {
  color: currentColor;
  opacity: 0.9;
}

/* The shared listing stylesheet retains a legacy green fallback for card hover.
 * Override only the IG Parts listing surface with the approved navy treatment. */
body.igparts-site .igparts-page .mmh-card:hover {
  box-shadow: var(--mmh-shadow-hover), 0 0 20px rgba(0, 26, 114, 0.15);
  border-color: rgba(0, 26, 114, 0.2);
}

/* The vehicle listing uses the full page container, as on the GoFleet listing. */
body.igparts-site .igparts-page--fahrzeuge > .gf-section--tight {
  max-width: 1400px;
}

/* Listing view switch: explicit, equally sized controls in the IG Parts palette. */
body.igparts-site .igparts-page .mmh-listing__toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Keep the listing controls compact; the portal-wide button skin is intentionally
 * overridden here so only this operational toolbar follows the GoFleet density. */
body.igparts-site .igparts-page .mmh-listing__sort-btn {
  min-height: 38px;
  padding: 7px 12px;
  font-size: 14px;
  line-height: 1.2;
}

body.igparts-site .igparts-page .mmh-layout-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid #d7e1f2;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--ig-navy);
  box-shadow: none;
}

body.igparts-site .igparts-page .mmh-layout-toggle > svg {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
}

body.igparts-site .igparts-page .mmh-layout-toggle:hover:not(.mmh-layout-toggle--active) {
  border-color: var(--ig-navy);
  background: #e4edfb;
  color: var(--ig-navy);
}

body.igparts-site .igparts-page .mmh-layout-toggle--active,
body.igparts-site .igparts-page .mmh-layout-toggle--active:hover {
  border-color: var(--ig-navy);
  background: var(--ig-navy);
  color: var(--ig-white);
}

/* Protected staging still serves the legacy gofleet-* toolbar classes. Keep
 * its density and icons identical to the newer local mmh-* variant. */
body.igparts-site .igparts-page .gofleet-listing__toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

body.igparts-site .igparts-page .gofleet-listing__sort-btn {
  min-height: 38px;
  padding: 7px 12px;
  font-size: 14px;
  line-height: 1.2;
}

body.igparts-site .igparts-page .gofleet-layout-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid #d7e1f2;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--ig-navy);
  box-shadow: none;
}

body.igparts-site .igparts-page .gofleet-layout-toggle > svg {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
}

body.igparts-site .igparts-page .gofleet-layout-toggle:hover:not(.gofleet-layout-toggle--active) {
  border-color: var(--ig-navy);
  background: #e4edfb;
  color: var(--ig-navy);
}

body.igparts-site .igparts-page .gofleet-layout-toggle--active,
body.igparts-site .igparts-page .gofleet-layout-toggle--active:hover {
  border-color: var(--ig-navy);
  background: var(--ig-navy);
  color: var(--ig-white);
}

/* Filter: restore the listing's intended hierarchy after the portal-wide button skin. */
body.igparts-site .igparts-page .mmh-sidebar {
  font-family: Arial, sans-serif;
  color: var(--ig-text);
}

body.igparts-site .igparts-page .mmh-sidebar__title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
}

body.igparts-site .igparts-page .mmh-sidebar__reset {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ig-navy);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: none;
}

body.igparts-site .igparts-page .mmh-sidebar__reset:hover {
  background: transparent;
  color: var(--ig-navy);
  text-decoration: underline;
}

body.igparts-site .igparts-page .mmh-sidebar__section-head {
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid #d7e1f2;
  border-radius: 3px;
  background: #eef4ff;
  color: var(--ig-navy);
  font-family: Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: none;
}

body.igparts-site .igparts-page .mmh-sidebar__section-head:hover {
  background: #e4edfb;
  color: var(--ig-navy);
}

body.igparts-site .igparts-page .mmh-sidebar__chevron {
  color: currentColor;
}

body.igparts-site .igparts-page .mmh-sidebar__check-row {
  min-height: 40px;
  padding: 8px 10px;
}

body.igparts-site .igparts-page .mmh-sidebar__check-label {
  font-family: Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}

body.igparts-site .igparts-page .mmh-sidebar__check-row.is-active .mmh-sidebar__check-label {
  font-weight: 700;
}

body.igparts-site .igparts-page .mmh-sidebar__section-body--padded .mmh-sidebar__select {
  min-height: 44px;
  padding: 8px 32px 8px 12px;
  border-color: #d7e1f2;
  border-radius: 3px;
  background-color: #fff;
  color: var(--ig-text);
  font-family: Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
}

/* Listing introduction shared by Local and protected IG Parts staging. */
body.igparts-site .igparts-page--fahrzeuge {
  padding-top: 2rem;
}

body.igparts-site .igparts-page--fahrzeuge .igparts-listing-lead {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2rem, 3.2vw, 3rem) 0 clamp(1.25rem, 2vw, 1.5rem);
  border-bottom: 1px solid rgba(0, 26, 114, 0.2);
}

body.igparts-site .igparts-listing-lead__headline {
  margin: 0;
  color: var(--ig-navy);
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

body.igparts-site .igparts-listing-lead__intro {
  max-width: 46rem;
  margin: 1rem 0 0;
  color: var(--ig-ink);
  font-size: clamp(1.125rem, 1.8vw, 1.4rem);
  line-height: 1.5;
}

body.igparts-site .igparts-page--fahrzeuge .gf-section--tight {
  padding-top: 1.125rem !important;
}

body.igparts-site .igparts-page--fahrzeuge .igparts-listing__header {
  display: none;
}

body.igparts-site .mmh-sidebar__check-row[hidden] {
  display: flex !important;
}

/*
 * Legacy component parity
 *
 * Protected staging still renders the established gofleet-* listing while
 * Local can render its successor with mmh-* classes.  Keep the visible IG
 * Parts result deliberately identical instead of inheriting the stronger
 * operational borders from either base stylesheet.
 */
body.igparts-site .igparts-page .gofleet-customer-toggle,
body.igparts-site .igparts-page .mmh-customer-toggle {
  gap: 0;
  padding: 4px;
  border: 1px solid rgba(0, 26, 114, 0.10);
  border-radius: 12px;
  background: var(--ig-white);
  box-shadow: 0 5px 14px rgba(0, 26, 114, 0.08);
}

body.igparts-site .igparts-page .gofleet-customer-toggle__btn,
body.igparts-site .igparts-page .mmh-customer-toggle__btn {
  min-height: 60px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ig-text);
  font-size: 13px;
  font-weight: 700;
}

body.igparts-site .igparts-page .gofleet-customer-toggle__btn:hover:not(.gofleet-customer-toggle__btn--active),
body.igparts-site .igparts-page .mmh-customer-toggle__btn:hover:not(.mmh-customer-toggle__btn--active) {
  background: #f4f7fb;
  color: var(--ig-navy);
}

body.igparts-site .igparts-page .gofleet-customer-toggle__btn--active,
body.igparts-site .igparts-page .mmh-customer-toggle__btn--active {
  border: 0;
  background: var(--ig-navy);
  box-shadow: none;
}

body.igparts-site .igparts-page .gofleet-listing__toolbar,
body.igparts-site .igparts-page .mmh-listing__toolbar {
  min-height: 48px;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid #e1e6ed;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.igparts-site .igparts-page .gofleet-listing__sort-btn,
body.igparts-site .igparts-page .mmh-listing__sort-btn {
  min-height: auto;
  padding: 6px 9px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #4b5056;
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
}

body.igparts-site .igparts-page .gofleet-listing__sort-btn:hover,
body.igparts-site .igparts-page .mmh-listing__sort-btn:hover,
body.igparts-site .igparts-page .gofleet-listing__sort-btn--active,
body.igparts-site .igparts-page .mmh-listing__sort-btn--active {
  background: transparent;
  color: var(--ig-navy);
  font-weight: 700;
}

body.igparts-site .igparts-page .gofleet-layout-toggle,
body.igparts-site .igparts-page .mmh-layout-toggle {
  width: 34px;
  height: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4b5056;
}

body.igparts-site .igparts-page .gofleet-layout-toggle:hover:not(.gofleet-layout-toggle--active),
body.igparts-site .igparts-page .mmh-layout-toggle:hover:not(.mmh-layout-toggle--active) {
  border: 0;
  background: #f4f7fb;
}

body.igparts-site .igparts-page .gofleet-layout-toggle--active,
body.igparts-site .igparts-page .gofleet-layout-toggle--active:hover,
body.igparts-site .igparts-page .mmh-layout-toggle--active,
body.igparts-site .igparts-page .mmh-layout-toggle--active:hover {
  border: 0;
  background: var(--ig-navy);
  color: var(--ig-white);
}

body.igparts-site .igparts-page .gofleet-sidebar,
body.igparts-site .igparts-page .mmh-sidebar {
  border: 1px solid rgba(0, 26, 114, 0.08);
  border-radius: 14px;
  background: var(--ig-white);
  box-shadow: 0 10px 24px rgba(0, 26, 114, 0.06);
}

body.igparts-site .igparts-page .gofleet-sidebar__header,
body.igparts-site .igparts-page .mmh-sidebar__header {
  padding-bottom: 14px;
  border-bottom: 1px solid #e1e6ed;
}

body.igparts-site .igparts-page .gofleet-sidebar__title,
body.igparts-site .igparts-page .mmh-sidebar__title {
  color: var(--ig-navy);
}

body.igparts-site .igparts-page .gofleet-sidebar__reset,
body.igparts-site .igparts-page .mmh-sidebar__reset {
  border: 0;
  background: transparent;
  color: #4b5056;
  font-weight: 500;
}

body.igparts-site .igparts-page .gofleet-sidebar__section,
body.igparts-site .igparts-page .mmh-sidebar__section {
  border-bottom: 1px solid #e1e6ed;
}

body.igparts-site .igparts-page .gofleet-sidebar__section-head,
body.igparts-site .igparts-page .mmh-sidebar__section-head {
  min-height: 44px;
  padding: 13px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #4b5056;
  font-size: 15px;
  font-weight: 500;
}

body.igparts-site .igparts-page .gofleet-sidebar__section-head:hover,
body.igparts-site .igparts-page .mmh-sidebar__section-head:hover {
  background: transparent;
  color: var(--ig-navy);
}

body.igparts-site .igparts-page .gofleet-sidebar__check-row,
body.igparts-site .igparts-page .mmh-sidebar__check-row {
  min-height: 36px;
  padding: 6px 0;
}

body.igparts-site .igparts-page .gofleet-sidebar__check-label,
body.igparts-site .igparts-page .mmh-sidebar__check-label {
  color: #4b5056;
  font-size: 14px;
}

body.igparts-site .igparts-page .gofleet-sidebar__section-body--padded .gofleet-sidebar__select,
body.igparts-site .igparts-page .mmh-sidebar__section-body--padded .mmh-sidebar__select {
  min-height: 38px;
  border: 1px solid #dfe5ed;
  border-radius: 7px;
  background: var(--ig-white);
  color: #4b5056;
  font-size: 14px;
}

/*
 * Server staging still serves the established gofleet-* renderer.  Its base
 * rules carry stronger operational borders than the newer local renderer, so
 * target the real server IDs directly.  This keeps the visual contract scoped
 * to IG Parts while leaving GoFleet and every other host untouched.
 */
body.igparts-site .igparts-page--fahrzeuge #gofleet-sidebar {
  border: 1px solid rgba(0, 26, 114, 0.08) !important;
  border-radius: 14px !important;
  background: var(--ig-white) !important;
  box-shadow: 0 10px 24px rgba(0, 26, 114, 0.06) !important;
}

body.igparts-site .igparts-page--fahrzeuge #gofleet-listing-toolbar {
  min-height: 48px !important;
  padding: 0 0 12px !important;
  border: 0 !important;
  border-bottom: 1px solid #e1e6ed !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.igparts-site .igparts-page--fahrzeuge #gofleet-listing-grid .gofleet-card {
  border: 1px solid rgba(0, 26, 114, 0.08) !important;
  border-radius: 14px !important;
  background: var(--ig-white) !important;
  box-shadow: 0 10px 24px rgba(0, 26, 114, 0.06) !important;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease !important;
  overflow: hidden !important;
}

/* The legacy staging renderer only animated the image.  Keep the movement on
 * the card itself so the entire listing item has the same calm lift as Local. */
body.igparts-site .igparts-page--fahrzeuge #gofleet-listing-grid .gofleet-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(0, 26, 114, 0.16) !important;
  box-shadow: 0 16px 32px rgba(0, 26, 114, 0.14) !important;
}

body.igparts-site .igparts-page--fahrzeuge #gofleet-listing-toolbar .gofleet-layout-toggle,
body.igparts-site .igparts-page--fahrzeuge #gofleet-listing-toolbar .gofleet-layout-toggle--active {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #4b5056 !important;
  box-shadow: none !important;
}

/* The listing title lives in the shared page content, not in a duplicated
 * database block.  Reveal and format that stable source consistently. */
body.igparts-site .igparts-page--fahrzeuge .gf-page-h1--sr {
  clip: auto;
  clip-path: none;
  width: auto;
  height: auto;
  overflow: visible;
  position: static;
  white-space: normal;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 0;
  color: var(--ig-navy);
  font-size: clamp(2.25rem, 4vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

body.igparts-site .igparts-page--fahrzeuge > .gf-section--tight > p:first-child {
  max-width: 46rem;
  margin: 0.85rem 0 1.8rem;
  color: var(--ig-text);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.5;
}

/* One shared geometry keeps introduction, controls and vehicle results aligned. */
body.igparts-site .igparts-page--fahrzeuge {
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
}

body.igparts-site .igparts-page--fahrzeuge .gf-page-h1--sr {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

body.igparts-site .igparts-page--fahrzeuge .gofleet-listing {
  max-width: none;
  margin: 0;
  margin-top: 0;
  padding-left: 0;
  padding-right: 0;
}

/* Compact IG Parts listing entry spacing. */
body.igparts-site .igparts-page--fahrzeuge .gofleet-listing {
  padding-top: 20px !important;
}

@media (max-width: 700px) {
  body.igparts-site .igparts-page--fahrzeuge {
    width: min(100% - 32px, 1240px);
  }
}

/* Compact IG Parts customer-type selection. */
body.igparts-site .igparts-page .gofleet-customer-toggle,
body.igparts-site .igparts-page .mmh-customer-toggle {
  gap: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--ig-line-neutral) !important;
  border-radius: var(--ig-radius) !important;
  background: var(--ig-white) !important;
  box-shadow: none !important;
  overflow: hidden;
}

body.igparts-site .igparts-page .gofleet-customer-toggle__btn,
body.igparts-site .igparts-page .mmh-customer-toggle__btn {
  min-height: 48px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--ig-navy) !important;
  box-shadow: none !important;
}

body.igparts-site .igparts-page .gofleet-customer-toggle__btn + .gofleet-customer-toggle__btn,
body.igparts-site .igparts-page .mmh-customer-toggle__btn + .mmh-customer-toggle__btn {
  border-left: 1px solid var(--ig-line-neutral) !important;
}

body.igparts-site .igparts-page .gofleet-customer-toggle__btn--active,
body.igparts-site .igparts-page .mmh-customer-toggle__btn--active {
  background: var(--ig-navy) !important;
  color: var(--ig-white) !important;
  box-shadow: none !important;
}

body.igparts-site .igparts-page .gofleet-customer-toggle__btn:focus-visible,
body.igparts-site .igparts-page .mmh-customer-toggle__btn:focus-visible {
  outline: 2px solid var(--ig-cyan) !important;
  outline-offset: -2px !important;
}

/* Fully visible IG Parts listing vehicles. */
body.igparts-site .igparts-page--fahrzeuge .gofleet-card__image {
  background: var(--ig-white) !important;
}

/* Borderless IG Parts listing image stage. */
body.igparts-site .igparts-page--fahrzeuge .gofleet-card__image {
  border: 0 !important;
}

body.igparts-site .igparts-page--fahrzeuge .gofleet-card__image img,
body.igparts-site .igparts-page--fahrzeuge .gofleet-card:hover .gofleet-card__image img {
  object-fit: contain !important;
  object-position: center !important;
  padding: 12px !important;
  transform: none !important;
}

/* IG Parts listing empty state. */
body.igparts-site .igparts-page--fahrzeuge #gofleet-listing-empty {
  background: var(--ig-surface) !important;
  border: 1px solid var(--ig-line-neutral) !important;
  border-radius: var(--ig-radius) !important;
  color: var(--ig-text) !important;
  box-shadow: none !important;
}

body.igparts-site .igparts-page--fahrzeuge #gofleet-listing-empty svg {
  color: var(--ig-navy) !important;
  opacity: 1 !important;
}

body.igparts-site .igparts-page--fahrzeuge #gofleet-listing-empty h3 {
  color: var(--ig-navy) !important;
}

body.igparts-site .igparts-page--fahrzeuge #gofleet-listing-empty p {
  color: var(--ig-text) !important;
}

body.igparts-site .igparts-page--fahrzeuge .gofleet-listing__empty-reset {
  border: 1px solid var(--ig-navy) !important;
  border-radius: var(--ig-radius) !important;
  background: var(--ig-navy) !important;
  color: var(--ig-white) !important;
  box-shadow: none !important;
}

body.igparts-site .igparts-page--fahrzeuge .gofleet-listing__empty-reset:hover {
  background: #002997 !important;
  box-shadow: none !important;
}

body.igparts-site .igparts-page--fahrzeuge .gofleet-listing__empty-reset:focus-visible {
  outline: 2px solid var(--ig-cyan) !important;
  outline-offset: 2px !important;
}
