/* MFT Vehicle Fitment — homepage / hook widget */
.mft-fitment-search {
  --mft-fit-accent: #c41e3a;
  --mft-fit-accent-hover: #a01830;
  --mft-fit-border: #e2e8f0;
  --mft-fit-bg: #ffffff;
  --mft-fit-muted: #64748b;
  --mft-fit-radius: 8px;
  --mft-fit-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);

  margin: 0 0 1.5rem;
  font-family: inherit;
}

.mft-fitment-search__card {
  background: var(--mft-fit-bg);
  border: 1px solid var(--mft-fit-border);
  border-radius: var(--mft-fit-radius);
  box-shadow: var(--mft-fit-shadow);
  padding: 1.25rem 1.5rem 1.5rem;
}

.mft-fitment-search__title {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.02em;
}

.mft-fitment-search__subtitle {
  margin: -0.5rem 0 1rem;
  font-size: 0.875rem;
  color: var(--mft-fit-muted);
}

.mft-fitment-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0.625rem;
  width: 100%;
}

.mft-fitment-field {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mft-fitment-field--action {
  flex: 0 0 auto;
  min-width: auto;
}

.mft-fitment-field__label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mft-fit-muted);
  line-height: 1.2;
  white-space: nowrap;
}

.mft-fitment-select,
.mft-fitment-search .mft-size-input {
  display: block;
  width: 100%;
  height: 42px;
  padding: 0 2rem 0 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: #1e293b;
  background-color: #f8fafc;
  border: 1px solid var(--mft-fit-border);
  border-radius: 6px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.mft-fitment-search .mft-size-input {
  background-image: none;
  padding-right: 0.75rem;
}

.mft-fitment-select:hover:not(:disabled),
.mft-fitment-search .mft-size-input:hover {
  border-color: #cbd5e1;
  background-color: #fff;
}

.mft-fitment-select:focus,
.mft-fitment-search .mft-size-input:focus {
  outline: none;
  border-color: var(--mft-fit-accent);
  box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.15);
  background-color: #fff;
}

.mft-fitment-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background-color: #f1f5f9;
}

.mft-fitment-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}

.mft-fitment-btn--primary {
  color: #fff;
  background: var(--mft-fit-accent);
}

.mft-fitment-btn--primary:hover:not(:disabled) {
  background: var(--mft-fit-accent-hover);
}

.mft-fitment-btn--primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mft-fitment-btn--secondary {
  color: #1e293b;
  background: #f1f5f9;
  border: 1px solid var(--mft-fit-border);
}

.mft-fitment-btn--secondary:hover {
  background: #e2e8f0;
}

.mft-fitment-divider {
  border: 0;
  border-top: 1px solid var(--mft-fit-border);
  margin: 1.25rem 0;
}

.mft-fitment-size-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0.625rem;
}

.mft-fitment-size-toolbar .mft-fitment-field {
  flex: 1 1 auto;
  max-width: 280px;
}

.mft-fitment-status {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid var(--mft-fit-border);
}

/* Tablet: allow wrap if needed */
@media (max-width: 1199px) {
  .mft-fitment-toolbar {
    flex-wrap: wrap;
  }

  .mft-fitment-field {
    flex: 1 1 calc(33.333% - 0.5rem);
    min-width: 140px;
  }

  .mft-fitment-field--action {
    flex: 1 1 100%;
  }

  .mft-fitment-field--action .mft-fitment-btn {
    width: 100%;
  }
}

/* Mobile */
@media (max-width: 575px) {
  .mft-fitment-search__card {
    padding: 1rem;
  }

  .mft-fitment-toolbar,
  .mft-fitment-size-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .mft-fitment-field,
  .mft-fitment-size-toolbar .mft-fitment-field {
    flex: 1 1 100%;
    max-width: none;
  }

  .mft-fitment-btn {
    width: 100%;
  }
}
