/* ── Favourites Slide-Out Panel ────────────────────────────────── */
.fav-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 92vw;
    height: 100%;
    background: #fff;
    z-index: 1050;
    box-shadow: -4px 0 24px rgba(0,0,0,.18);
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
}

.fav-panel.fav-panel-open {
    transform: translateX(0);
}

.fav-panel-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 1049;
    opacity: 0;
    transition: opacity .28s;
}

.fav-panel-overlay.fav-panel-overlay-show {
    display: block;
    opacity: 1;
}

.fav-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #dee2e6;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    background: #1a2a4a;
    color: #fff;
}

.fav-panel-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    opacity: .85;
}
.fav-panel-close:hover { opacity: 1; }

.fav-panel-viewall {
    font-size: .75rem;
    font-weight: 600;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 4px;
    padding: 2px 8px;
    transition: color .15s, border-color .15s;
}
.fav-panel-viewall:hover {
    color: #fff;
    border-color: rgba(255,255,255,.75);
}

.fav-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.fav-panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    text-align: center;
}

.fav-panel-loading {
    display: flex;
    justify-content: center;
    padding: 24px;
}

.fav-panel-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #fff;
    transition: box-shadow .15s;
}
.fav-panel-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.1); }

/* Row 1: image+info link and the remove button, side by side. Kept as its
   own flex row (rather than flex-wrap on .fav-panel-card) so the carfax
   row below always starts a genuinely new line regardless of this row's
   content width. */
.fav-panel-card-mainrow {
    display: flex;
    align-items: stretch;
}

.fav-panel-card-carfax-row {
    padding: 6px 10px;
    border-top: 1px solid #dee2e6;
}

.fav-panel-card-link {
    display: flex;
    align-items: center;
    flex: 1;
    text-decoration: none;
    color: inherit;
    gap: 0;
    overflow: hidden;
}

.fav-panel-card-img {
    width: 80px;
    height: 72px;
    object-fit: cover;
    flex-shrink: 0;
}

.fav-panel-card-noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.fav-panel-card-info {
    padding: 8px 10px;
    flex: 1;
    min-width: 0;
}

.fav-panel-card-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.fav-panel-card-meta {
    font-size: 0.75rem;
    margin-bottom: 2px;
}

.fav-panel-card-price {
    font-size: 0.8rem;
}

.fav-panel-card-view {
    font-size: 0.72rem;
    color: #0d6efd;
    margin-top: 4px;
    font-weight: 500;
}

.fav-panel-card-remove {
    background: none;
    border: none;
    border-left: 1px solid #dee2e6;
    color: #adb5bd;
    padding: 0 12px;
    cursor: pointer;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: color .12s, background .12s;
}
.fav-panel-card-remove:hover { color: #dc3545; background: #fff5f5; }

.fav-panel-toast {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a2a4a;
    color: #fff;
    font-size: .8rem;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 2px 12px rgba(0,0,0,.22);
    pointer-events: none;
    z-index: 10;
    animation: favPanelToastIn .22s ease forwards;
}
.fav-panel-toast.fav-panel-toast-undo {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}
.fav-panel-toast-undo-btn {
    background: none;
    border: none;
    color: #7eb8ff;
    font-size: .8rem;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    letter-spacing: .02em;
    flex-shrink: 0;
}
.fav-panel-toast-undo-btn:hover {
    color: #aad4ff;
}
.fav-panel-toast.fav-panel-toast-out {
    animation: favPanelToastOut .3s ease forwards;
}
@keyframes favPanelToastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes favPanelToastOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to   { opacity: 0; transform: translateX(-50%) translateY(8px); }
}

/* Social Media Modal Rows */
.mob-social-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px 18px;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    color: #222;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.mob-social-row:last-child {
    border-bottom: none;
}

.mob-social-row:hover,
.mob-social-row:active {
    background: #f9f9f9;
    color: #222;
}

.mob-social-icon {
    font-size: 1.5rem;
    width: 36px;
    text-align: center;
    flex-shrink: 0;
}

.mob-social-name {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
}

.mob-social-arrow {
    color: #bbb;
    font-size: 0.8rem;
}

/* Mobile responsive header */
@media (max-width: 991px) {
    .header-top-inner {
        justify-content: center;
        gap: 0;
    }
    .header-top-right {
        display: none;
    }
    .header-top {
        padding: 10px 0;
    }
    .mobile-action-bar {
        display: flex;
    }
    /* #mobileActionMenuBtn (the list icon in .mobile-action-bar above)
       already toggles #mainNav — see base.html's shared click handler.
       Keeping this control hidden avoids showing two menu buttons at once. */
    .mobile-menu-toggle {
        display: none;
    }
    .header-nav-bar {
        padding: 0;
        height: 0;
        overflow: visible;
        border: none;
    }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        z-index: 1049;
        border-top: 1px solid #e8e8e8;
        box-shadow: 0 6px 16px rgba(0,0,0,0.12);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    .main-nav.open {
        display: block;
    }
    .main-nav-list {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 0;
    }
    .main-nav-item {
        width: 100%;
    }
    .main-nav-link {
        padding: 12px 20px;
        border-bottom: none;
        border-left: 3px solid transparent;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #333;
    }
    .main-nav-link:hover {
        border-bottom: none;
        border-left-color: var(--accent-color);
        color: var(--accent-color);
        background: rgba(0,0,0,.04);
    }
    .nav-dropdown {
        display: none;
        position: static;
        border: none;
        border-top: none;
        box-shadow: none;
        padding-left: 16px;
        background: #f5f5f5;
    }
    .has-dropdown.open > .nav-dropdown {
        display: block;
    }
    main {
        margin-top: 145px !important;
    }
    .hero-section {
        margin-top: 0 !important;
        min-height: 380px;
    }
}

@media (max-width: 576px) {
    .header-address {
        display: none;
    }
}

.carousel-image-placeholder {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,.15);
}

.btn {
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

footer {
    margin-top: auto;
}

.table-responsive {
    overflow-x: auto;
}

/* Tables pasted into CMS/blog rich-text content (e.g. a warranty coverage
   matrix) have no responsive wrapper from the editor, so on narrow
   viewports they either overflow the page or get clipped by an ancestor's
   overflow:hidden. Force them into their own horizontally-scrollable box. */
.cms-content table,
.post-content table,
.vehicle-rich-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.badge {
    font-weight: 500;
}

@media (max-width: 768px) {
    .carousel-image-placeholder {
        height: 300px !important;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
}

.alert {
    border-radius: 0.5rem;
}

.card-img-top {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.card-img-top-link {
    display: block;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

.inventory-card.card {
    overflow: hidden;
}

/* Inventory grid cards: fixed image height so ALL images in all cards
   sit at the exact same Y-coordinate, preventing the "image of right card
   appearing next to price of left card" scroll illusion */
.inventory-card .card-img-top-link {
    height: 215px;
}

.inventory-card .card-img-top {
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
    object-fit: cover;
}

.inventory-card .card-img-placeholder {
    width: 100%;
    height: 215px;
    aspect-ratio: unset;
}

.card-img-top-link:hover .card-img-top {
    opacity: 0.88;
}

/* Featured inventory cards in horizontal scroll strip */
.featured-inventory-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.featured-inventory-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.35) !important;
}
.featured-scroll::-webkit-scrollbar {
    height: 5px;
}
.featured-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.featured-scroll::-webkit-scrollbar-thumb {
    background: #ffc107;
    border-radius: 10px;
}

.card-title-link {
    color: inherit;
    text-decoration: none;
}

.card-title-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.card-img-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--btn-text);
    border: none;
    font-weight: 600;
    padding: 10px 28px;
    border-radius: 4px;
}
.btn-accent:hover {
    background-color: var(--accent-dark);
    color: var(--btn-text);
}

.btn-outline-accent {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background: transparent;
    font-weight: 600;
    padding: 10px 28px;
    border-radius: 4px;
}
.btn-outline-accent:hover {
    background-color: var(--accent-color);
    color: var(--btn-text);
}

.section-title-center {
    text-align: center;
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: #222;
}

.section-desc-center {
    text-align: center;
    color: #666;
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: 0.95rem;
}

.section-title {
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    color: #222;
}

/* ── Finance / Trade-In two-column CTA sections ─────────────────────────── */
.finance-simple-section,
.trade-in-section {
    padding: 60px 0;
}

.finance-simple-section {
    background: #f4f6f9;
}

.trade-in-section {
    background: #fff;
}

.finance-simple-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.finance-simple-grid-reverse .finance-simple-text {
    order: 2;
}

.finance-simple-grid-reverse .finance-simple-visual {
    order: 1;
}

.finance-simple-grid p {
    color: #555;
    line-height: 1.8;
    font-size: 0.95rem;
}

/* Icon-badge visual filling the second grid column -- gives these
   sections real two-column weight instead of a centered wall of text. */
.finance-simple-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.finance-simple-visual-badge {
    display: flex;
    align-items: center;
    justify-content: center;
}

.finance-simple-visual-badge i {
    font-size: 10rem;
    color: var(--accent-color);
    line-height: 1;
}

.finance-simple-visual-photo {
    width: 100%;
    max-width: 480px;
    height: 340px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

@media (max-width: 900px) {
    .finance-simple-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    /* Same stacking order on mobile for both sections regardless of the
       desktop-only left/right reverse -- text first, icon badge after. */
    .finance-simple-grid-reverse .finance-simple-text,
    .finance-simple-grid-reverse .finance-simple-visual,
    .finance-simple-text,
    .finance-simple-visual {
        order: initial;
    }
    .finance-simple-visual-badge i {
        font-size: 5rem;
    }
    .finance-simple-visual-photo {
        max-width: 100%;
        height: 220px;
    }
    .finance-trust-icons {
        grid-template-columns: 1fr;
        text-align: left;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }
    .about-home-ctas {
        justify-content: center;
    }
}

.finance-trust-icons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 20px;
    margin: 16px 0 20px;
}

.finance-trust-icons span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.finance-trust-icons i {
    color: var(--accent-color);
}

/* ── 4-Step Buying Process ──────────────────────────────────────────────── */
.buy-steps-section {
    padding: 60px 0;
    background: #f4f6f9;
}

.buy-steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 30px;
}

.buy-step-item {
    text-align: center;
    background: #fff;
    border-radius: 8px;
    padding: 24px 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.buy-step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    color: var(--btn-text, #fff);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.buy-step-item h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.buy-step-item p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0;
}

/* ── FAQ + Final CTA ─────────────────────────────────────────────────────── */
.faq-section {
    padding: 60px 0;
    background: #f8f9fb;
}

.faq-section .accordion {
    max-width: 820px;
    margin: 0 auto;
}

.faq-accordion .accordion-item {
    background: #fff;
    border: 1px solid #eceef1;
    border-radius: 12px !important;
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease;
}

.faq-accordion .accordion-item:last-child {
    margin-bottom: 0;
}

.faq-accordion .accordion-item:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.faq-accordion .accordion-button {
    font-weight: 700;
    font-size: 1rem;
    padding: 18px 22px;
    color: #1f2937;
}

.faq-section .accordion-button:not(.collapsed) {
    color: var(--accent-color);
    background-color: #fff;
    box-shadow: none;
}

.faq-section .accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0,0,0,.125);
}

.faq-accordion .accordion-body {
    padding: 0 22px 22px;
    color: #555;
    line-height: 1.75;
    font-size: 0.95rem;
    white-space: pre-line;
}

@media (max-width: 576px) {
    .faq-accordion .accordion-button {
        font-size: 0.92rem;
        padding: 15px 18px;
    }
    .faq-accordion .accordion-body {
        padding: 0 18px 18px;
        font-size: 0.9rem;
    }
}

.final-cta-section {
    padding: 60px 0;
    background: #f4f6f9;
}

