/*
 * Vehicle Fitment — storefront.
 * Fonts are inherited from the theme; colours default to the papalexandrakis.com Journal skin and can be
 * changed in one place below.
 */

.vf-finder,
.vf-fit {
  --vf-accent: #e7284d;        /* buttons, step numbers */
  --vf-accent-dark: #c81d3f;
  --vf-ink: #38444f;           /* text */
  --vf-muted: #7a8593;
  --vf-line: #dddddd;
  --vf-soft: #f5f6f8;
  --vf-link: #008add;
  --vf-ok: #23931b;
  --vf-ok-bg: #ecf8ea;
  --vf-no: #c62828;
  --vf-no-bg: #fdeceb;
  --vf-some: #a66a00;
  --vf-some-bg: #fff5e0;
  --vf-radius: 3px;
  color: var(--vf-ink);
  box-sizing: border-box;
}

.vf-finder *,
.vf-fit * {
  box-sizing: border-box;
}

.vf-finder [hidden],
.vf-fit [hidden] {
  display: none !important;
}

/* ── Shared controls ─────────────────────────────────────────────────────── */

.vf-finder .vf-select,
.vf-fit .vf-select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 34px 0 12px;
  border: 1px solid var(--vf-line);
  border-radius: var(--vf-radius);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2338444f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--vf-ink);
  font: inherit;
  font-size: 14px;
  line-height: 42px;
  box-shadow: none;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.vf-finder .vf-select:hover:not(:disabled),
.vf-fit .vf-select:hover:not(:disabled) {
  border-color: #b9c0c9;
}

.vf-finder .vf-select:focus,
.vf-fit .vf-select:focus {
  outline: none;
  border-color: var(--vf-link);
  box-shadow: 0 0 0 3px rgba(0, 138, 221, .15);
}

.vf-finder .vf-select:disabled,
.vf-fit .vf-select:disabled {
  background-color: var(--vf-soft);
  color: #a3abb5;
  cursor: not-allowed;
}

.vf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--vf-radius);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, opacity .15s;
}

.vf-btn--primary {
  background: var(--vf-accent);
  color: #fff !important;
  text-transform: uppercase;
}

.vf-btn--primary:hover:not(:disabled) {
  background: var(--vf-accent-dark);
}

.vf-btn--primary:disabled {
  background: #c9ced5;
  cursor: not-allowed;
}

.vf-btn--ghost {
  height: 34px;
  padding: 0 14px;
  background: #fff;
  border-color: var(--vf-line);
  color: var(--vf-ink) !important;
  font-weight: 600;
}

.vf-btn--ghost:hover {
  border-color: var(--vf-ink);
}

.vf-btn--outline {
  background: #fff;
  border-color: var(--vf-link);
  color: var(--vf-link) !important;
}

.vf-btn--outline:hover {
  background: var(--vf-link);
  color: #fff !important;
}

.vf-btn--link {
  height: auto;
  padding: 6px 4px;
  background: none;
  font-weight: 600;
}

.vf-btn--danger {
  color: var(--vf-no) !important;
}

.vf-btn--sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.vf-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 11px;
  border: 1px solid var(--vf-line);
  border-radius: 999px;
  background: #fff;
  color: var(--vf-ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  list-style: none;
}

/* ── Finder (category / manufacturer bar and widget) ─────────────────────── */

.vf-finder {
  position: relative;
  margin: 0 0 24px;
  padding: 18px 20px 20px;
  border: 1px solid var(--vf-line);
  border-radius: var(--vf-radius);
  background: #fff;
  box-shadow: 0 2px 10px rgba(56, 68, 79, .06);
  overflow: hidden;
}

.vf-finder::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--vf-accent);
}

.vf-finder__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.vf-finder__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(231, 40, 77, .1);
  color: var(--vf-accent);
}

.vf-finder__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.vf-finder__intro {
  margin-top: 2px;
  color: var(--vf-muted);
  font-size: 13px;
  line-height: 1.35;
}

.vf-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin: 0;
}

.vf-step {
  display: block;
  margin: 0;
  font-weight: normal;
}

.vf-step__head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--vf-muted);
}

.vf-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--vf-ink);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0;
  transition: background-color .2s;
}

.vf-step.is-current .vf-step__num {
  background: var(--vf-accent);
}

.vf-step.is-current .vf-step__head {
  color: var(--vf-ink);
}

.vf-step.is-done .vf-step__num {
  background: var(--vf-ok);
  font-size: 0;
}

.vf-step.is-done .vf-step__num::after {
  content: "";
  width: 9px;
  height: 5px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
}

.vf-step.is-waiting {
  opacity: .55;
}

.vf-popular {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--vf-line);
}

.vf-popular__label {
  margin-right: 4px;
  color: var(--vf-muted);
  font-size: 13px;
}

.vf-chip--make {
  cursor: pointer;
  transition: border-color .15s, color .15s, background-color .15s;
}

.vf-chip--make:hover,
.vf-chip--make.is-selected {
  border-color: var(--vf-accent);
  color: var(--vf-accent);
}

.vf-chip--make.is-selected {
  background: rgba(231, 40, 77, .06);
}

.vf-current {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--vf-radius);
  background: var(--vf-ok-bg);
}

.vf-finder.is-active .vf-current {
  margin-bottom: 0;
}

.vf-finder.is-active.is-open .vf-current {
  margin-bottom: 16px;
}

.vf-current--saved {
  background: var(--vf-soft);
}

.vf-current__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: var(--vf-ink);
}

.vf-current__badge--ok {
  background: var(--vf-ok);
  color: #fff;
}

.vf-current__text {
  display: flex;
  flex-direction: column;
  flex: 1 1 200px;
  min-width: 0;
}

.vf-current__label {
  color: var(--vf-muted);
  font-size: 12px;
}

.vf-current__bike {
  font-size: 16px;
  line-height: 1.3;
}

.vf-current__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Widget in a narrow column: one step per row */
.vf-finder--widget .vf-steps {
  grid-template-columns: 1fr;
}

.vf-finder--widget .vf-steps__submit {
  width: 100%;
}

@media (max-width: 991px) {
  .vf-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .vf-steps__submit {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .vf-finder {
    padding: 16px 14px;
  }

  .vf-finder__title {
    font-size: 16px;
  }

  .vf-steps {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .vf-current__actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* ── Product page: compatibility card ────────────────────────────────────── */

.vf-fit {
  margin: 0 0 18px;
  border: 1px solid var(--vf-line);
  border-radius: var(--vf-radius);
  background: #fff;
  font-size: 14px;
}

.vf-fit__head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--vf-line);
}

.vf-fit__icon {
  display: inline-flex;
  color: var(--vf-accent);
}

.vf-fit__title {
  font-size: 15px;
  font-weight: 700;
}

.vf-fit__count {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--vf-soft);
  color: var(--vf-muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.vf-fit__status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 12px 14px 0;
  padding: 10px 12px;
  border-radius: var(--vf-radius);
  background: var(--vf-soft);
  transition: background-color .2s;
}

.vf-fit__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  color: var(--vf-muted);
}

.vf-fit__badge .vf-ico {
  display: none;
}

.vf-fit__status .vf-ico--q,
.vf-fit__status.is-fits .vf-ico--ok,
.vf-fit__status.is-no .vf-ico--no,
.vf-fit__status.is-some .vf-ico--some {
  display: block;
}

.vf-fit__status.is-fits .vf-ico--q,
.vf-fit__status.is-no .vf-ico--q,
.vf-fit__status.is-some .vf-ico--q {
  display: none;
}

.vf-fit__text {
  flex: 1 1 160px;
  font-weight: 600;
  line-height: 1.35;
}

.vf-fit__status [data-vf-check] {
  margin-left: auto;
}

.vf-fit__status.is-fits { background: var(--vf-ok-bg); color: var(--vf-ok); }
.vf-fit__status.is-fits .vf-fit__badge { background: var(--vf-ok); color: #fff; }
.vf-fit__status.is-no { background: var(--vf-no-bg); color: var(--vf-no); }
.vf-fit__status.is-no .vf-fit__badge { background: var(--vf-no); color: #fff; }
.vf-fit__status.is-some { background: var(--vf-some-bg); color: var(--vf-some); }
.vf-fit__status.is-some .vf-fit__badge { background: var(--vf-some); color: #fff; }

.vf-fit__status.is-fits [data-vf-check],
.vf-fit__status.is-no [data-vf-check],
.vf-fit__status.is-some [data-vf-check] {
  border-color: transparent;
  background: transparent;
  color: inherit !important;
  text-decoration: underline !important;
  padding: 0 4px;
}

.vf-fit__check {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 8px;
  margin: 10px 14px 0;
}

.vf-fit__check .vf-select,
.vf-fit__check .vf-btn {
  height: 38px;
  line-height: 36px;
}

.vf-fit__search {
  position: relative;
  margin: 12px 14px 0;
  color: var(--vf-muted);
}

.vf-fit__search svg {
  position: absolute;
  top: 50%;
  left: 11px;
  transform: translateY(-50%);
}

.vf-fit__search input {
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0 10px 0 32px;
  border: 1px solid var(--vf-line);
  border-radius: var(--vf-radius);
  font: inherit;
  font-size: 13px;
  color: var(--vf-ink);
}

.vf-fit__search input:focus {
  outline: none;
  border-color: var(--vf-link);
}

.vf-fit__groups {
  padding: 4px 14px 14px;
}

.vf-fit__group {
  margin-top: 12px;
}

.vf-fit__make {
  margin-bottom: 7px;
  color: var(--vf-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.vf-fit__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.vf-chip--model {
  background: var(--vf-soft);
  border-color: transparent;
}

.vf-chip__name {
  font-weight: 600;
}

.vf-chip__years {
  color: var(--vf-muted);
  font-size: 12px;
  white-space: nowrap;
}

.vf-chip__note {
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff;
  color: var(--vf-muted);
  font-size: 11px;
}

.vf-chip--model.is-match {
  background: var(--vf-ok-bg);
  border-color: var(--vf-ok);
  color: var(--vf-ok);
}

.vf-chip--model.is-match .vf-chip__years {
  color: inherit;
}

.vf-fit__groups.is-collapsed .is-extra:not(.is-match) {
  display: none;
}

.vf-fit__groups.is-collapsed .vf-fit__group.is-extra.has-match {
  display: block;
}

.vf-fit__groups.is-searching .vf-chip--model,
.vf-fit__groups.is-searching .vf-fit__group {
  display: none;
}

.vf-fit__groups.is-searching .vf-chip--model.is-found {
  display: inline-flex;
}

.vf-fit__groups.is-searching .vf-fit__group.is-found {
  display: block;
}

.vf-fit__empty {
  margin: 0 14px 14px;
  color: var(--vf-muted);
  font-size: 13px;
}

.vf-fit__more {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid var(--vf-line);
  border-radius: 0 0 var(--vf-radius) var(--vf-radius);
  background: #fff;
  color: var(--vf-link);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.vf-fit__more:hover {
  background: var(--vf-soft);
}

@media (max-width: 600px) {
  .vf-fit__check {
    grid-template-columns: 1fr;
  }

  .vf-fit__status [data-vf-check] {
    margin-left: 34px;
  }
}
