/* 车辆选择、收藏、车库和详情页面，沿用首页颜色与 Inter 字体。 */

/* ---------- 头部车辆入口 ---------- */

.vehicle-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    align-self: center;
    margin-top: 4px;
    padding: 0.32rem 0.7rem;
    border: 1px solid var(--th-border);
    border-radius: 999px;
    background: var(--th-surface);
    color: var(--th-navy);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    cursor: pointer;
    transition: .16s ease;
}

.vehicle-chip-main { display: inline-flex; align-items: center; gap: 0.35rem; min-width: 0; max-width: 100%; }
.vehicle-chip-main #vehicle-chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vehicle-chip-main i {
    color: var(--th-blue);
    font-size: 13px;
}

.brand-line { text-decoration: none; }
.vehicle-chip-action { display: none; }

.vehicle-chip:hover,
.vehicle-chip:focus-visible {
    border-color: #93c5fd;
    background: #f8fbff;
    box-shadow: 0 6px 16px #0f172a0d;
    transform: translateY(-1px);
    outline: none;
}

.vehicle-chip.is-selected {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.vehicle-chip.is-selected i {
    color: #16a34a;
}

.vehicle-my-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: center;
    margin-top: 4px;
    color: var(--th-navy);
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.vehicle-my-link i {
    color: var(--th-blue);
}

.vehicle-my-link:hover {
    color: var(--th-blue);
    text-decoration: underline;
}

.directory-intro { position: relative; }
.vf-account-menu { position: absolute; z-index: 20; top: 23px; right: 24px; color: var(--th-navy); font-size: 12px; }
.vf-account-menu summary { cursor: pointer; list-style: none; }
.vf-account-menu summary::-webkit-details-marker { display: none; }
.vf-account-menu summary::after { content: "⌄"; margin-left: 5px; color: var(--th-muted); }
.vf-account-menu[open] { min-width: 168px; padding: 10px; border: 1px solid var(--th-border); border-radius: 10px; background: #fff; box-shadow: 0 12px 28px #10243e20; }
.vf-account-menu[open] summary { padding: 4px 8px 9px; color: var(--th-muted); }
.vf-account-menu button { width: 100%; padding: 10px 8px; border: 0; border-top: 1px solid var(--th-border); background: #fff; color: var(--th-navy); text-align: left; font-weight: 700; cursor: pointer; }
.vf-account-menu button:hover, .vf-account-menu button:focus-visible { color: var(--th-blue); background: #f8fbff; }
.vf-header-sign-in { position: absolute; top: 23px; right: 24px; padding: 0; border: 0; background: transparent; color: var(--th-blue); font-size: 12px; font-weight: 700; cursor: pointer; }
.vf-header-sign-in:hover, .vf-header-sign-in:focus-visible { text-decoration: underline; }

/* ---------- 页面内选车、VIN 解析、Google 搜索 ---------- */

#header.navbar.sticky-top { position: static !important; }
.vehicle-header-home > .directory-intro { grid-template-columns: 205px minmax(0, 1fr); align-items: start; column-gap: 24px; padding-top: 32px; text-align: left; }
.vehicle-header-home .vehicle-header-top { min-height: 42px; align-content: start; }
.vehicle-header-home .brand-line { align-self: center; justify-content: flex-start; margin-top: 0; }
.vehicle-header-home .vehicle-chip { flex-direction: column; align-items: flex-start; width: 100%; margin-top: 0; max-width: 100%; padding: 7px 10px; border-radius: 8px; }
.vehicle-header-home .vehicle-chip-action { display: block; color: var(--th-blue); font-size: 10px; font-weight: 700; }
.vehicle-header-home .vehicle-my-link { margin-top: 0; max-width: 100%; }
.vehicle-header-home .search-area { container-type: inline-size; }
.vehicle-tabs { gap: 6px; margin-bottom: 12px; border-bottom-color: var(--th-border); }
.vehicle-tabs .nav-link { margin-bottom: -1px; padding: 10px 16px; border-radius: 8px 8px 0 0; color: var(--th-muted); font-size: 13px; font-weight: 700; }
.vehicle-tabs .nav-link:hover, .vehicle-tabs .nav-link:focus-visible { border-color: transparent transparent #bfdbfe; color: var(--th-blue); }
.vehicle-tabs .nav-link.active { border-color: var(--th-border) var(--th-border) #fff; background: #fff; color: var(--th-blue); font-weight: 800; }
.vehicle-tab-content { min-height: 48px; }
.vehicle-select-row, .vehicle-vin-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 8px; align-items: start; }
.vehicle-select-row .form-select, .vehicle-vin-row .form-control { min-height: 48px; font-size: 12px; }
.vehicle-vin-row { grid-template-columns: minmax(0, 1fr) auto auto; }
.vehicle-tab-content .search-button { white-space: nowrap; }
.vehicle-tab-content .search-button:disabled { opacity: .55; transform: none; box-shadow: none; }
.vf-review { margin-top: 10px; text-align: left; font-size: 12px; }
.vf-login-open .modal-backdrop.show { opacity: .55; backdrop-filter: blur(3px); }
.vf-login-modal { z-index: 1060; }
.vf-login-modal .modal-dialog { max-width: 420px; }
.vf-login-modal .modal-content { border: 0; border-radius: 14px; box-shadow: 0 24px 65px #10243e30; }
.vf-login-modal .modal-body { position: relative; padding: 48px 38px 34px; text-align: center; }
.vf-login-close { position: absolute; z-index: 2; top: 22px; right: 22px; opacity: .55; }
.vf-login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 26px; color: #10243e; font-size: 28px; font-weight: 900; letter-spacing: -.04em; }
.vf-login-brand img { flex: none; width: 36px; height: 36px; }
.vf-login-brand > span > span { color: var(--th-blue); }
.vf-login-modal h2 { margin: 0 0 22px; color: #10243e; font-size: 20px; font-weight: 800; }
.vf-login-vehicle { display: flex; justify-content: center; align-items: center; gap: 8px; margin: -8px 0 20px; color: #1d4ed8; font-size: 12px; font-weight: 700; }
.vf-login-field-label { color: #10243e; font-size: 13px; font-weight: 700; text-align: left; }
.vf-login-email-form .form-control, .vf-login-code-form .form-control { min-height: 46px; font-size: 14px; }
.vf-login-code-form { margin-top: 14px; }
.vf-login-code-form #favorite-send-code { min-height: 46px; white-space: nowrap; font-size: 13px; font-weight: 750; }
.vf-login-code-form #favorite-email-login { width: 100%; min-height: 44px; margin-top: 10px; font-size: 14px; font-weight: 750; }
.vf-code-actions { display: flex; justify-content: space-between; gap: 12px; }
.vf-login-resend { padding: 2px 0; border: 0; background: none; color: var(--th-blue); font-size: 12px; font-weight: 700; }
.vf-login-resend:disabled { color: var(--th-muted); cursor: default; }
.vf-login-note { margin: 12px 0 0; font-size: 12px; }
.vf-login-divider { display: flex; align-items: center; gap: 12px; margin: 30px 0 18px; color: var(--th-muted); font-size: 12px; }
.vf-login-divider::before, .vf-login-divider::after { content: ""; flex: 1; height: 1px; background: var(--th-border); }
.vf-google-login { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--th-muted); font-size: 12px; }
.vf-google-button { display: flex; justify-content: center; align-items: center; min-width: 44px; min-height: 44px; }
.vf-google-fallback { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #d7deea; border-radius: 50%; background: #fff; color: #8b97a9; font-size: 20px; }
@media (max-width: 575.98px) {
    .vf-login-modal .modal-dialog { margin: 12px; }
    .vf-login-modal .modal-body { padding: 46px 22px 28px; }
}
@container (max-width: 570px) {
    .vehicle-select-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vehicle-select-row .search-button { grid-column: 2; justify-self: end; }
    .vehicle-vin-row { grid-template-columns: minmax(0, 1fr) auto auto; }
    .vehicle-vin-row #vf-vin-input { grid-column: 1 / -1; }
    .vehicle-vin-row #vf-vin-lookup { grid-column: 2; }
    .vehicle-vin-row #vf-use-vin { grid-column: 3; }
}
@container (max-width: 360px) {
    .vehicle-select-row { grid-template-columns: minmax(0, 1fr); }
    .vehicle-select-row .search-button { grid-column: 1; }
}
@media (max-width: 767.98px) {
    .vf-account-menu { top: 18px; right: 16px; }
    .vf-header-sign-in { top: 18px; right: 16px; }
    .vehicle-header-home > .directory-intro { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
}
@media (max-width: 575.98px) {
    .vehicle-header-home > .directory-intro { padding-top: 20px; }
    .vehicle-tabs { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
}

.vf-review-card {
    border: 1px solid #edf1f5;
    border-radius: 9px;
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.5rem;
    background: #fbfcfe;
}

.vf-review-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.12rem 0;
}

.vf-review-row span {
    color: var(--th-muted);
}

.vf-review-row strong {
    color: var(--th-navy);
}

.vf-google-button {
    min-height: 44px;
}

/* ---------- 轻提示 ---------- */

.vf-toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
    max-width: 320px;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    background: var(--th-navy);
    color: #fff;
    font-size: 12px;
    box-shadow: 0 10px 24px #0f172a40;
    opacity: 0;
    pointer-events: none;
    transform: translateY(0.5rem);
    transition: opacity .2s ease, transform .2s ease;
}

.vf-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.vf-toast.vf-toast-error {
    background: #b91c1c;
}

/* 车库空态 */
.vf-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 34px 16px;
    border: 1px solid var(--th-border);
    border-radius: 9px;
    background: #fbfcfe;
}

.vf-empty i {
    font-size: 26px;
    color: var(--th-muted);
}

.vf-empty h2 {
    margin: 12px 0 6px;
    color: var(--th-navy);
    font-size: 16px;
    font-weight: 850;
}

.vf-empty p {
    margin: 0 auto 14px;
    max-width: 420px;
    color: var(--th-muted);
    font-size: 11px;
    line-height: 1.5;
}

.vf-empty .guide-entry-link {
    flex-basis: auto;
    min-height: 40px;
    padding: 0 18px;
}

.vf-empty .text-danger {
    font-size: 12px;
}

/* 加载态 */
.vf-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
}

/* ---------- Compact header for garage and detail pages ---------- */
.vehicle-header-compact > .directory-intro {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: left;
}
.vehicle-header-compact .brand-line { margin-top: 0; }
.vehicle-header-compact .vehicle-chip { margin-top: 0; min-width: 245px; max-width: 300px; align-items: flex-start; flex-direction: column; gap: 2px; border-radius: 8px; padding: 8px 12px; background: #f8fbff; }
.vehicle-header-compact .vehicle-chip.is-selected { border-color: #dbe3ee; color: var(--th-navy); }
.vehicle-header-compact .vehicle-chip-main i { display: none; }
.vehicle-header-compact .vehicle-chip-action { display: block; color: var(--th-blue); font-size: 10px; font-weight: 700; }
.vehicle-page-nav { display: flex; align-items: center; gap: 28px; padding-right: 110px; }
.vehicle-page-nav a { color: var(--th-muted); font-size: 12px; text-decoration: none; }
.vehicle-page-nav a:hover, .vehicle-page-nav a:focus-visible { color: var(--th-blue); }
.vehicle-page-nav .vf-nav-current { color: var(--th-blue); font-weight: 800; }

/* ---------- My vehicles ---------- */
.vf-section-eyebrow { color: var(--th-blue); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.vf-garage-page { padding-top: 48px; padding-bottom: 100px; }
.vf-garage-page h1, .vf-details-page h1 { margin: 10px 0 8px; color: var(--th-navy); font-size: clamp(28px, 3vw, 34px); font-weight: 850; }
.vf-garage-intro { margin-bottom: 24px; color: var(--th-muted); font-size: 14px; }
.vf-garage-success { margin-bottom: 24px; padding: 14px 18px; border: 1px solid #a7dfb6; border-radius: 9px; background: #eaf7ef; color: #166534; font-size: 13px; font-weight: 700; }
.vf-garage-shell { border: 1px solid #dbe3ee; border-radius: 12px; background: #fff; padding: 26px 30px; }
.vf-garage-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.vf-garage-toolbar span { color: var(--th-muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.vf-garage-toolbar a { color: var(--th-blue); font-size: 12px; font-weight: 750; text-decoration: none; }
.vf-garage-toolbar a:hover { text-decoration: underline; }
.vf-garage-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--th-border); }
.vf-garage-row:last-child { border-bottom: 0; }
.vf-garage-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.vf-garage-name-line h2 { margin: 0; color: var(--th-navy); font-size: 19px; font-weight: 800; }
.vf-current-badge { border-radius: 5px; padding: 5px 9px; background: #e8f7eb; color: #166534; font-size: 11px; font-weight: 800; }
.vf-garage-vehicle p { margin: 5px 0 0; color: var(--th-muted); font-size: 12px; }
.vf-garage-row-actions { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.vf-saved-label { color: #166534; font-size: 12px; font-weight: 800; }
.vf-use-saved, .vf-edit-vehicle { border: 0; border-radius: 8px; padding: 10px 13px; background: #f0f4fd; color: var(--th-blue); font-size: 12px; font-weight: 800; text-decoration: none; }
.vf-use-saved:hover, .vf-edit-vehicle:hover { background: #dbeafe; color: #1d4ed8; }
.vf-garage-footnote { margin-top: 20px; color: var(--th-muted); font-size: 12px; }

/* ---------- Add vehicle details ---------- */
.vf-details-page { padding-top: 32px; padding-bottom: 100px; }
.vf-breadcrumb { color: var(--th-blue); font-size: 12px; font-weight: 700; text-decoration: none; }
.vf-breadcrumb span { margin: 0 4px; }
.vf-details-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 18px 0 26px; }
.vf-details-heading p { margin: 0; color: var(--th-muted); font-size: 13px; }
.vf-details-actions { display: flex; gap: 10px; white-space: nowrap; }
.vf-details-actions .btn { min-width: 98px; padding: 10px 16px; font-size: 12px; font-weight: 750; }
.vf-identity-card { padding: 22px; border: 1px solid #bcd2fc; border-radius: 9px; background: #eaf1ff; }
.vf-identity-grid { display: flex; flex-wrap: wrap; gap: 16px 36px; margin: 20px 0 14px; }
.vf-identity-grid div { min-width: 82px; }
.vf-identity-grid span { display: block; margin-bottom: 5px; color: var(--th-muted); font-size: 10px; }
.vf-identity-grid strong { color: var(--th-navy); font-size: 14px; }
.vf-identity-card p { margin: 0; color: var(--th-muted); font-size: 11px; }
.vf-detail-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.vf-detail-panel { padding: 22px; border: 1px solid #dbe3ee; border-radius: 10px; background: #fff; }
.vf-detail-panel h2 { margin: 0 0 5px; color: var(--th-navy); font-size: 18px; font-weight: 800; }
.vf-detail-panel > p { margin-bottom: 22px; color: var(--th-muted); font-size: 12px; }
.vf-detail-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.vf-field-full { grid-column: 1 / -1; }
.vf-field label { display: block; margin-bottom: 7px; color: var(--th-navy); font-size: 12px; font-weight: 750; }
.vf-field .form-control { min-height: 42px; border-color: #d6e0ee; font-size: 13px; }
.vf-field textarea.form-control { min-height: 88px; }
.vf-more-details { margin-top: 18px; }
.vf-more-details summary { color: var(--th-blue); font-size: 12px; font-weight: 750; cursor: pointer; }
.vf-more-details[open] .vf-detail-fields { margin-top: 18px; }
.vf-fitment-note { margin-top: 18px; text-align: center; color: var(--th-muted); font-size: 12px; }

@media (max-width: 767.98px) {
    .vehicle-header-compact > .directory-intro { grid-template-columns: minmax(0, 1fr); }
    .vehicle-page-nav { gap: 16px; padding-right: 0; }
    .vf-detail-columns { grid-template-columns: 1fr; }
    .vf-details-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 575.98px) {
    .vf-garage-page { padding-top: 30px; }
    .vf-garage-shell { padding: 18px; }
    .vf-garage-row { align-items: flex-start; flex-direction: column; gap: 14px; }
    .vf-garage-row-actions { width: 100%; justify-content: space-between; }
    .vf-detail-panel { padding: 18px; }
    .vf-detail-fields { grid-template-columns: 1fr; }
    .vf-field-full { grid-column: auto; }
    .vf-details-actions { width: 100%; }
    .vf-details-actions .btn { flex: 1; }
}
