:root {
  --ijd-fitment-gold: #d7ad2c;
  --ijd-fitment-gold-soft: #f2d87e;
  --ijd-fitment-surface: #11151d;
  --ijd-fitment-surface-raised: #181d27;
  --ijd-fitment-line: rgba(255, 255, 255, .11);
  --ijd-fitment-muted: #9aa3b2;
  --ijd-fitment-text: #f7f8fa;
  --ijd-fitment-green: #2ecc86;
  --ijd-fitment-orange: #f59e0b;
  --ijd-fitment-red: #ef4444;
}

.ijd-fitment {
  position: relative;
  width: 100%;
  margin: 18px 0 24px;
  padding: 18px;
  color: var(--ijd-fitment-text);
  background: var(--ijd-fitment-surface);
  border: 1px solid var(--ijd-fitment-line);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .18);
}

.ijd-fitment__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  margin-bottom: 15px;
}

.ijd-fitment__head-icon,
.ijd-fitment__saved-icon {
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--ijd-fitment-gold-soft);
  background: rgba(215, 173, 44, .1);
  border: 1px solid rgba(215, 173, 44, .22);
  border-radius: 12px;
  font-size: 19px;
}

.ijd-fitment__intro { min-width: 0; }

.ijd-fitment__eyebrow {
  display: block;
  margin-bottom: 2px;
  color: var(--ijd-fitment-gold-soft);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.ijd-fitment h2 {
  margin: 0;
  color: var(--ijd-fitment-text);
  font-size: clamp(18px, 1.45vw, 23px);
  line-height: 1.15;
  letter-spacing: -.025em;
}

.ijd-fitment__head p {
  margin: 4px 0 0;
  color: var(--ijd-fitment-muted);
  font-size: 12px;
  line-height: 1.4;
}

.ijd-fitment__control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  color: #cbd2dc;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.ijd-fitment__control i { color: var(--ijd-fitment-green); font-size: 13px; }

.ijd-fitment__saved {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  color: #e8fff4;
  background: linear-gradient(105deg, rgba(46, 204, 134, .08), rgba(46, 204, 134, .025));
  border: 1px solid rgba(46, 204, 134, .22);
  border-radius: 13px;
  overflow: visible;
}

.ijd-fitment__saved[hidden] { display: none; }
.ijd-fitment__saved-icon { flex: 0 0 auto; color: #8ff0bc; background: rgba(46, 204, 134, .1); border-color: rgba(46, 204, 134, .2); }
.ijd-fitment__saved-copy { display: grid; flex: 1 1 180px; min-width: 0; gap: 2px; }
.ijd-fitment__saved-copy small {
  color: #83d9ac;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ijd-fitment__saved-copy strong {
  overflow: hidden;
  color: #f5fff9;
  font-size: 13px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ijd-fitment__saved-metrics {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, auto);
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 10px;
}
.ijd-fitment__saved-metrics > span {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 7px 10px;
  border-right: 1px solid rgba(255, 255, 255, .075);
}
.ijd-fitment__saved-metrics > span:last-child { border-right: 0; }
.ijd-fitment__saved-metrics small { color: #8791a1; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.ijd-fitment__saved-metrics strong { overflow: hidden; color: #f3f5f7; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.ijd-fitment__wheel-shortcuts {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ijd-fitment__wheel-shortcuts > small {
  color: #8791a1;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ijd-fitment__wheel-links,
.ijd-fitment__tire-links {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 5px;
  overflow: visible;
}
.ijd-fitment__wheel-links::-webkit-scrollbar,
.ijd-fitment__tire-links::-webkit-scrollbar { display: none; }
.ijd-fitment__wheel-link,
.ijd-fitment__tire-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 9px;
  color: #dce3ea;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 780;
  line-height: 1;
  text-decoration: none;
  transition: color .18s, background .18s, border-color .18s, transform .18s;
}
.ijd-fitment__wheel-link:hover,
.ijd-fitment__tire-link:hover { color: #fff; border-color: rgba(215, 173, 44, .46); transform: translateY(-1px); }
.ijd-fitment__wheel-link.is-active {
  color: #17150d;
  background: #d7ad2c;
  border-color: #e4c24d;
}

.ijd-fitment__result-count {
  display: grid;
  min-width: 70px;
  gap: 1px;
  text-align: center;
}
.ijd-fitment__result-count[hidden] { display: none; }
.ijd-fitment__result-count strong { color: #fff; font-size: 18px; line-height: 1; }
.ijd-fitment__result-count small { color: #8f98a7; font-size: 9px; white-space: nowrap; }

.ijd-fitment__actions { display: inline-flex; align-items: center; gap: 6px; }
.ijd-fitment__change,
.ijd-fitment__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 13px;
  color: #f6f7f9;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 10px;
  cursor: pointer;
  font: 750 11px/1 inherit;
  white-space: nowrap;
  transition: background .18s, border-color .18s;
}
.ijd-fitment__change:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); }
.ijd-fitment__clear {
  padding: 0 10px;
  color: #aab2bd;
  background: transparent;
  border-color: transparent;
}
.ijd-fitment__clear:hover { color: #ffd0d0; background: rgba(239, 68, 68, .08); border-color: rgba(239, 68, 68, .18); }
.ijd-fitment__change:disabled { opacity: .55; cursor: wait; }

.ijd-fitment__tire-shortcuts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, .025);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 12px;
}
.ijd-fitment__tire-shortcuts[hidden] { display: none; }
.ijd-fitment__tire-label { display: inline-flex; align-items: center; gap: 9px; min-width: 160px; }
.ijd-fitment__tire-label > i { color: var(--ijd-fitment-gold-soft); font-size: 18px; }
.ijd-fitment__tire-label > span { display: grid; gap: 1px; }
.ijd-fitment__tire-label small { color: #7f8998; font-size: 8px; font-weight: 750; text-transform: uppercase; }
.ijd-fitment__tire-label strong { color: #eef1f5; font-size: 11px; white-space: nowrap; }
.ijd-fitment__tire-link { min-height: 32px; padding: 0 10px; color: #d9e0e8; }
.ijd-fitment__all-tires {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  color: #f1cf67;
  background: rgba(215, 173, 44, .07);
  border: 1px solid rgba(215, 173, 44, .18);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.ijd-fitment__all-tires:hover { color: #ffe49a; background: rgba(215, 173, 44, .12); }
.ijd-fitment__all-tires[hidden] { display: none; }

.ijd-fitment__form {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr .72fr 1.15fr .85fr minmax(145px, auto);
  gap: 9px;
  align-items: end;
}

.ijd-fitment__field { display: grid; min-width: 0; gap: 5px; }
.ijd-fitment__field > span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #b7bfcb;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.ijd-fitment__field > span b {
  display: inline-grid;
  width: 15px;
  height: 15px;
  place-items: center;
  color: #13161c;
  background: #d7b33e;
  border-radius: 50%;
  font-size: 8px;
}
.ijd-fitment__field > span small { color: #737d8d; font-weight: 650; letter-spacing: 0; text-transform: none; }
.ijd-fitment select {
  width: 100%;
  height: 42px;
  padding: 0 31px 0 11px;
  color: #f5f6f8;
  background: var(--ijd-fitment-surface-raised);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 9px;
  outline: none;
  font: 650 12px/1.2 inherit;
  transition: border-color .18s, box-shadow .18s, opacity .18s;
}
.ijd-fitment select:focus { border-color: #b99a34; box-shadow: 0 0 0 3px rgba(215, 173, 44, .1); }
.ijd-fitment select:disabled { opacity: .42; cursor: not-allowed; }
.ijd-fitment select option { color: #fff; background: #171c25; }

.ijd-fitment__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  color: #17150d;
  background: #d7ad2c;
  border: 1px solid #e4bf44;
  border-radius: 9px;
  box-shadow: none;
  cursor: pointer;
  font: 850 12px/1 inherit;
  white-space: nowrap;
  transition: background .18s, transform .18s, opacity .18s;
}
.ijd-fitment__submit:hover:not(:disabled) { background: #e2bb3c; transform: translateY(-1px); }
.ijd-fitment__submit:disabled { color: #7d7352; background: #302b1f; border-color: #413821; opacity: .68; cursor: not-allowed; }

.ijd-fitment__specs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .075);
}
.ijd-fitment__specs[hidden] { display: none; }
.ijd-fitment__specs > span:not(.ijd-fitment__spec-ok) {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, .035);
  border-radius: 7px;
}
.ijd-fitment__specs small { color: var(--ijd-fitment-muted); font-size: 8px; text-transform: uppercase; }
.ijd-fitment__specs strong { color: #fff; font-size: 10px; }
.ijd-fitment__spec-ok { margin-left: auto; color: #80dfa9; font-size: 10px; font-weight: 750; }

.ijd-fitment__help { margin-top: 9px; color: #7f8999; font-size: 9px; }
.ijd-fitment__help summary { width: fit-content; cursor: pointer; color: #8f98a7; font-weight: 700; }
.ijd-fitment__help p { max-width: 900px; margin: 6px 0 0; line-height: 1.5; }

.ijd-fitment.is-selected:not(.is-editing) {
  padding: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #121821, #0e131a);
  border-color: rgba(46, 204, 134, .2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}
.ijd-fitment.is-selected:not(.is-editing) .ijd-fitment__head,
.ijd-fitment.is-selected:not(.is-editing) .ijd-fitment__form,
.ijd-fitment.is-selected:not(.is-editing) .ijd-fitment__specs,
.ijd-fitment.is-selected:not(.is-editing) .ijd-fitment__help { display: none; }
.ijd-fitment.is-selected:not(.is-editing) .ijd-fitment__saved { margin: 0; background: transparent; border: 0; border-radius: 0; }
.ijd-fitment.is-selected:not(.is-editing) .ijd-fitment__tire-shortcuts { margin: 0; border-width: 1px 0 0; border-radius: 0; }

.ijd-fitment.is-selected.is-editing .ijd-fitment__head { display: none; }
.ijd-fitment.is-selected.is-editing .ijd-fitment__saved { margin-bottom: 13px; }
.ijd-fitment.is-selected.is-editing .ijd-fitment__tire-shortcuts { display: none; }

.ijd-fitment--catalog { margin: 0; }
.ijd-fitment--catalog.is-selected:not(.is-editing) { border-radius: 14px; }

.ijd-fitment-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.ijd-fitment-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
}
.ijd-fitment-badge--perfect { color: #d5ffea; background: rgba(32, 201, 121, .16); border-color: rgba(32, 201, 121, .32); }
.ijd-fitment-badge--factory { color: #fff1bb; background: rgba(212, 175, 55, .14); border-color: rgba(212, 175, 55, .3); }
.ijd-fitment-badge--conditional { color: #ffdda0; background: rgba(245, 158, 11, .14); border-color: rgba(245, 158, 11, .3); }
.ijd-fitment-badge--review { color: #d7deea; background: rgba(148, 163, 184, .14); border-color: rgba(148, 163, 184, .28); }
.ijd-fitment-badge--danger { color: #ffd5d5; background: rgba(239, 68, 68, .14); border-color: rgba(239, 68, 68, .28); }

body.light-mode .ijd-fitment-badge--perfect,
body.light-theme .ijd-fitment-badge--perfect,
body:not(.dark-mode) .ijd-fitment-badge--perfect { color: #046c3d; background: #d1fae5; border-color: #6ee7b7; }

body.light-mode .ijd-fitment-badge--factory,
body.light-theme .ijd-fitment-badge--factory,
body:not(.dark-mode) .ijd-fitment-badge--factory { color: #713f12; background: #fef9c3; border-color: #fde047; }

body.light-mode .ijd-fitment-badge--conditional,
body.light-theme .ijd-fitment-badge--conditional,
body:not(.dark-mode) .ijd-fitment-badge--conditional { color: #9a3412; background: #ffedd5; border-color: #fdba74; }

body.light-mode .ijd-fitment-badge--review,
body.light-theme .ijd-fitment-badge--review,
body:not(.dark-mode) .ijd-fitment-badge--review { color: #334155; background: #f1f5f9; border-color: #cbd5e1; }

body.light-mode .ijd-fitment-badge--danger,
body.light-theme .ijd-fitment-badge--danger,
body:not(.dark-mode) .ijd-fitment-badge--danger { color: #991b1b; background: #fee2e2; border-color: #fca5a5; }

.ijd-fitment-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 9px;
  color: #765a11;
  background: #fff8da;
  border: 1px solid #e7cc67;
  border-radius: 8px;
  cursor: pointer;
  font: 800 10px/1.2 inherit;
}

.ijd-fitment-modal {
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 6, 10, .78);
  backdrop-filter: blur(8px);
}
.ijd-fitment-modal[hidden] { display: none; }
.ijd-fitment-modal__dialog { position: relative; width: min(1080px, 100%); max-height: calc(100vh - 36px); overflow: auto; }
.ijd-fitment-modal__close {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  background: #252b36;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
}
.ijd-fitment-modal .ijd-fitment { margin: 0; padding-top: 20px; }
.ijd-fitment-result {
  margin: 10px 0;
  padding: 12px 14px;
  color: #dbe3ee;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
}

body.light-mode .ijd-fitment,
body.light-theme .ijd-fitment {
  --ijd-fitment-surface: #ffffff;
  --ijd-fitment-surface-raised: #f5f6f8;
  --ijd-fitment-line: #dfe3e8;
  --ijd-fitment-muted: #687180;
  --ijd-fitment-text: #171b22;
  color: #171b22;
  box-shadow: 0 9px 28px rgba(26, 33, 45, .08);
}
body.light-mode .ijd-fitment h2,
body.light-theme .ijd-fitment h2,
body.light-mode .ijd-fitment select,
body.light-theme .ijd-fitment select { color: #171b22; }
body.light-mode .ijd-fitment select option,
body.light-theme .ijd-fitment select option { color: #171b22; background: #fff; }
body.light-mode .ijd-fitment__field > span,
body.light-theme .ijd-fitment__field > span { color: #515b6a; }
body.light-mode .ijd-fitment__control,
body.light-theme .ijd-fitment__control { color: #4f5968; background: #f6f7f8; border-color: #e2e5e9; }
body.light-mode .ijd-fitment.is-selected:not(.is-editing),
body.light-theme .ijd-fitment.is-selected:not(.is-editing) { background: linear-gradient(135deg, #fff, #fbfcfc); }
body.light-mode .ijd-fitment__saved-copy strong,
body.light-theme .ijd-fitment__saved-copy strong,
body.light-mode .ijd-fitment__saved-metrics strong,
body.light-theme .ijd-fitment__saved-metrics strong,
body.light-mode .ijd-fitment__result-count strong,
body.light-theme .ijd-fitment__result-count strong { color: #172019; }
body.light-mode .ijd-fitment__saved-metrics,
body.light-theme .ijd-fitment__saved-metrics { border-color: #dfe7e2; }
body.light-mode .ijd-fitment__saved-metrics > span,
body.light-theme .ijd-fitment__saved-metrics > span { border-color: #dfe7e2; }
body.light-mode .ijd-fitment__change,
body.light-theme .ijd-fitment__change { color: #29313b; background: #f5f7f6; border-color: #dce3df; }
body.light-mode .ijd-fitment__clear,
body.light-theme .ijd-fitment__clear { color: #6d7681; background: transparent; border-color: transparent; }
body.light-mode .ijd-fitment__clear:hover,
body.light-theme .ijd-fitment__clear:hover { color: #a12c2c; background: #fff1f1; border-color: #f1d0d0; }
body.light-mode .ijd-fitment__wheel-link,
body.light-theme .ijd-fitment__wheel-link,
body.light-mode .ijd-fitment__tire-link,
body.light-theme .ijd-fitment__tire-link { color: #34404c; background: #fff; border-color: #dce2e6; }
body.light-mode .ijd-fitment__wheel-link.is-active,
body.light-theme .ijd-fitment__wheel-link.is-active { color: #17150d; background: #d7ad2c; border-color: #c79c17; }
body.light-mode .ijd-fitment__tire-shortcuts,
body.light-theme .ijd-fitment__tire-shortcuts { background: #fafbfb; border-color: #e3e7e5; }
body.light-mode .ijd-fitment__tire-label strong,
body.light-theme .ijd-fitment__tire-label strong { color: #29313a; }
body.light-mode .ijd-fitment__all-tires,
body.light-theme .ijd-fitment__all-tires { color: #765a11; background: #fffaf0; border-color: #eadcae; }

@media (max-width: 1180px) {
  .ijd-fitment__form { grid-template-columns: repeat(3, 1fr); }
  .ijd-fitment__submit { grid-column: span 1; }
  .ijd-fitment__saved { grid-template-columns: auto minmax(190px, 1fr) minmax(250px, 1.2fr) minmax(150px, .8fr) auto; }
  .ijd-fitment__result-count { display: none; }
  .ijd-fitment__actions { grid-column: auto; }
}

@media (max-width: 820px) {
  .ijd-fitment { padding: 14px; border-radius: 13px; }
  .ijd-fitment__head { grid-template-columns: auto minmax(0, 1fr); }
  .ijd-fitment__control { display: none; }
  .ijd-fitment__form { grid-template-columns: 1fr 1fr; }
  .ijd-fitment__submit { grid-column: 1 / -1; min-height: 44px; }
  .ijd-fitment__saved { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 11px; }
  .ijd-fitment__saved-metrics { grid-column: 1 / 3; grid-row: 2; }
  .ijd-fitment__wheel-shortcuts { grid-column: 3; grid-row: 2; }
  .ijd-fitment__actions { grid-column: 3; grid-row: 1; }
  .ijd-fitment.is-selected.is-editing .ijd-fitment__saved-metrics { display: none; }
  .ijd-fitment.is-selected.is-editing .ijd-fitment__wheel-shortcuts { display: none; }
  .ijd-fitment__change,
  .ijd-fitment__clear { min-height: 44px; }
  .ijd-fitment__tire-shortcuts { grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
  .ijd-fitment__tire-label { grid-column: 1; min-width: 0; }
  .ijd-fitment__tire-links { grid-column: 1 / -1; grid-row: 2; }
  .ijd-fitment__all-tires { grid-column: 2; grid-row: 1; }
  .ijd-fitment__spec-ok { width: 100%; margin-left: 0; }
}

@media (max-width: 480px) {
  .ijd-fitment__head-icon { width: 36px; height: 36px; }
  .ijd-fitment__head p { font-size: 11px; }
  .ijd-fitment__saved-icon { display: none; }
  .ijd-fitment__saved { grid-template-columns: minmax(0, 1fr) auto; }
  .ijd-fitment__saved-metrics { grid-column: 1 / -1; }
  .ijd-fitment__wheel-shortcuts { grid-column: 1 / -1; grid-row: 3; }
  .ijd-fitment__actions { grid-column: 2; grid-row: 1; }
  .ijd-fitment__saved-metrics > span { padding: 7px 6px; }
  .ijd-fitment__saved-copy strong { font-size: 12px; }
  .ijd-fitment__change,
  .ijd-fitment__clear { width: 42px; padding: 0; }
  .ijd-fitment__actions button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .ijd-fitment__tire-shortcuts { padding: 10px 11px; }
  .ijd-fitment__all-tires { min-height: 40px; padding: 0 9px; }
}

@media (max-width: 350px) {
  .ijd-fitment__form { grid-template-columns: 1fr; }
  .ijd-fitment__submit { grid-column: auto; }
}
