/* Vehicle selector page: keep the wizard and results readable at every width. */
.page-header {
    background: #192a33;
    padding: 46px 0 48px;
    text-align: left;
}

.page-header h1 {
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: -.055em;
    line-height: 1.08;
    margin-bottom: 12px;
}

.page-header p {
    max-width: 650px;
    margin: 0;
    color: #d9e0e1;
    line-height: 1.6;
}

.vehicle-selection { padding: 32px 0 80px; }

.vehicle-selection .selection-form {
    max-width: 1160px;
    margin-inline: auto;
    padding: clamp(24px, 3vw, 40px);
    border-radius: 16px;
    box-shadow: 0 16px 44px rgba(20, 36, 44, .08);
}

.vehicle-selection .selection-form h2 {
    margin: 0 0 24px;
    text-align: center;
    font-size: clamp(23px, 2.5vw, 30px);
    font-weight: 750;
    letter-spacing: -.045em;
}

.vehicle-selection .step-indicator {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    max-width: none;
    margin: 0 0 28px;
    padding: 16px 0 18px;
    border-block: 1px solid var(--gray-200);
}

.vehicle-selection .step-indicator::before {
    top: 32px;
    left: 10%;
    right: 10%;
    background: var(--gray-200);
}

.vehicle-selection .step { width: 100%; min-width: 0; padding: 0 3px; }
.vehicle-selection .step > span { width: 32px; height: 32px; margin-bottom: 8px; }
.vehicle-selection .step-labels { min-width: 0; width: 100%; }
.vehicle-selection .step-label { color: var(--gray-700); font-size: 12px; font-weight: 700; }
.vehicle-selection .step-value { max-width: 100%; min-height: 0; font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
.vehicle-selection .selected-vehicle-summary { display: none; }

.vehicle-selection .form-content { min-height: 0; margin-bottom: 0; }
.vehicle-selection .form-step > h3 { margin: 0 0 18px; text-align: center; font-size: 19px; font-weight: 700; }
.vehicle-selection .parts-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.vehicle-selection .parts-heading h3 { margin: 0; font-size: 19px; font-weight: 700; }
.vehicle-selection #changeVehicleBtn { padding: 8px 0; border: 0; border-bottom: 1px solid var(--primary-red); background: transparent; color: var(--gray-900); font-size: 12px; font-weight: 750; white-space: nowrap; cursor: pointer; }
.vehicle-selection #changeVehicleBtn:hover { color: var(--primary-red-dark); }

.vehicle-selection .brand-grid,
.vehicle-selection .model-grid,
.vehicle-selection .engine-grid,
.vehicle-selection .year-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: none;
    gap: 11px;
    margin: 0;
}

.vehicle-selection .brand-btn,
.vehicle-selection .model-btn,
.vehicle-selection .engine-btn { flex: 0 0 145px; }
.vehicle-selection .year-btn { flex: 0 0 82px; }

.vehicle-selection .brand-btn,
.vehicle-selection .model-btn,
.vehicle-selection .engine-btn,
.vehicle-selection .year-btn {
    width: auto;
    min-width: 0;
    min-height: 54px;
    padding: 11px;
    border: 1px solid var(--gray-300);
    border-radius: 9px;
    color: var(--gray-900);
    background: #fff;
    box-shadow: none;
    line-height: 1.25;
}

.vehicle-selection .brand-btn.selected,
.vehicle-selection .model-btn.selected,
.vehicle-selection .engine-btn.selected,
.vehicle-selection .year-btn.selected { color: #fff; }

.vehicle-selection .form-navigation { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--gray-200); }
.vehicle-selection .form-navigation:has(#prevBtn:disabled) { display: none; }
.vehicle-selection #prevBtn { min-height: 44px; padding: 10px 19px; border-radius: 8px; background: var(--gray-800); font-size: 13px; }

.vehicle-selection .parts-filters { padding: 16px; background: #f9f8f6; }
.vehicle-selection .filters-row { grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(110px, 1fr)) auto; gap: 9px; }
.vehicle-selection .filter-group { min-width: 0; }
.vehicle-selection .search-input,
.vehicle-selection .filter-select { width: 100%; min-width: 0; height: 44px; border: 1px solid var(--gray-300); border-radius: 7px; font-size: 13px; }
.vehicle-selection .clear-filters-btn { min-height: 44px; padding: 10px 14px; border-radius: 7px; }
.vehicle-selection .parts-results { max-width: none; padding-top: 8px; }
/* The "Also suitable" grid (.universal-parts) sits after the pagination, outside
   .parts-results, and must lay out exactly like the vehicle's own parts. */
.vehicle-selection .parts-results .parts-grid,
.vehicle-selection .universal-parts .parts-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }

@media (max-width: 768px) {
    .page-header { padding: 28px 0 30px; }
    .page-header h1 { font-size: 30px; }
    .page-header p { font-size: 13px; line-height: 1.5; }
    .vehicle-selection { padding: 14px 0 50px; }
    .vehicle-selection > .container { padding-inline: 0; }
    .vehicle-selection .selection-form { padding: 18px 12px 20px; border-inline: 0; border-radius: 0; box-shadow: none; }
    .vehicle-selection .selection-form h2 { margin-bottom: 15px; font-size: 21px; }
    .vehicle-selection .step-indicator { gap: 0; margin-bottom: 18px; padding: 13px 0 12px; }
    .vehicle-selection .step-indicator::before { top: 27px; }
    .vehicle-selection .step { min-width: 0; padding: 0 1px; }
    .vehicle-selection .step > span { width: 28px; height: 28px; margin-bottom: 6px; }
    .vehicle-selection .step-labels { min-height: 0; }
    .vehicle-selection .step-label { font-size: 10px; }
    .vehicle-selection .step-value { display: none; }
    .vehicle-selection .selected-vehicle-summary:not([hidden]) {
        display: block;
        margin: -4px 0 18px;
        padding: 9px 11px;
        border-radius: 7px;
        background: #f9f3f0;
        color: var(--gray-800);
        font-size: 11px;
        font-weight: 650;
        line-height: 1.4;
    }
    .vehicle-selection .form-step > h3 { margin-bottom: 12px; font-size: 17px; }
    .vehicle-selection .parts-heading { margin-bottom: 12px; }
    .vehicle-selection .parts-heading h3 { font-size: 17px; }
    .vehicle-selection .brand-grid,
    .vehicle-selection .model-grid,
    .vehicle-selection .engine-grid { gap: 8px; }
    .vehicle-selection .year-grid { gap: 7px; }
    .vehicle-selection .brand-btn,
    .vehicle-selection .model-btn,
    .vehicle-selection .engine-btn { flex-basis: calc((100% - 16px) / 3); }
    .vehicle-selection .year-btn { flex-basis: calc((100% - 28px) / 5); }
    .vehicle-selection .brand-btn,
    .vehicle-selection .model-btn,
    .vehicle-selection .engine-btn,
    .vehicle-selection .year-btn { min-height: 46px; padding: 8px 5px; font-size: 12px; border-radius: 7px; }
    .vehicle-selection .form-navigation { margin-top: 18px; padding-top: 14px; margin-bottom: 0 !important; padding-bottom: 0 !important; }
    .vehicle-selection .nav-btn { min-height: 44px !important; padding: 10px 15px !important; }
    .vehicle-selection .parts-filters { padding: 11px; }
    .vehicle-selection .filters-row { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 8px; }
    .vehicle-selection .filters-row .filter-group:first-child { grid-column: 1 / -1; }
    .vehicle-selection .search-input,
    .vehicle-selection .filter-select { height: 42px; font-size: 12px; padding-inline: 9px; }
    .vehicle-selection .clear-filters-btn { min-height: 42px; padding: 8px; font-size: 12px; }
    .vehicle-selection .results-summary { flex-direction: row; gap: 8px; font-size: 11px; }
    .vehicle-selection .parts-results .parts-grid,
    .vehicle-selection .universal-parts .parts-grid { padding: 0; }
}
