/* ==========================================================================
   CarMarketplace — Modern Theme
   ========================================================================== */

:root {
    --navy-950: #0b1220;
    --navy-900: #0f1c30;
    --navy-800: #16273f;
    --navy-700: #1e3a5f;
    --blue-500: #2f6fed;
    --blue-600: #1f56c9;
    --amber-500: #f5a623;
    --amber-600: #e0930f;
    --green-500: #1aa260;
    --green-600: #148a51;
    --red-500: #e14343;
    --grey-100: #f5f6f8;
    --grey-200: #eceff3;
    --grey-400: #c7ccd4;
    --grey-600: #6b7686;
    --grey-800: #2d3543;
    --radius: 10px;
    --shadow-sm: 0 1px 3px rgba(15, 28, 48, .08);
    --shadow-md: 0 6px 20px rgba(15, 28, 48, .10);
    --shadow-lg: 0 14px 34px rgba(15, 28, 48, .16);
}

* { box-sizing: border-box; }

html, body {
    background-color: var(--grey-100);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    color: var(--grey-800);
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5 {
    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
    font-weight: 600;
    color: var(--navy-900);
}

a { color: var(--blue-600); }
a:hover, a:focus { color: var(--blue-500); text-decoration: none; }

/* ---------------------------------------------------------------------- */
/* Top utility bar + Navbar                                               */
/* ---------------------------------------------------------------------- */

.topbar {
    background: var(--navy-950);
    color: #9fb2ca;
    font-size: 12.5px;
    padding: 6px 0;
}
.topbar a { color: #cfe0f7; margin-left: 14px; }
.topbar a:hover { color: #fff; }
.topbar i { margin-right: 5px; }

.navbar-brand-wrap {
    background: var(--navy-900);
    padding: 0;
    border: 0;
    margin-bottom: 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow .25s ease, padding .25s ease;
}
.navbar-brand-wrap.is-scrolled { box-shadow: var(--shadow-lg); }

.navbar-brand-wrap .navbar {
    background: transparent;
    border: 0;
    margin-bottom: 0;
    min-height: 64px;
}
.navbar-brand-wrap .navbar-header { display: flex; align-items: center; }
.site-logo {
    display: inline-flex;
    align-items: center;

    padding: 12px 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: #fff !important;
    letter-spacing: .3px;
}
.site-logo .logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--amber-500), #ff7847);
    border-radius: 8px;
    color: #1a1a1a;
    font-size: 16px;
}
.site-logo .logo-badge i { color: #14202f; }
.site-logo span.brand-sub { color: var(--amber-500); }

.navbar-brand-wrap .nav > li > a {
    color: #c6d3e5 !important;
    font-weight: 500;
    font-size: 14.5px;
    padding: 22px 16px;
    transition: color .15s ease;
}
.navbar-brand-wrap .nav > li > a i { margin-right: 6px; color: #6f8bb3; font-size: 13px; }
.navbar-brand-wrap .nav > li > a:hover,
.navbar-brand-wrap .nav > li > a:focus {
    background: transparent !important;
    color: #fff !important;
}
.navbar-brand-wrap .nav > li.active > a { color: var(--amber-500) !important; }

.btn-post-ad {
    display: inline-block;
    margin: 14px 0 0 10px;
    background: linear-gradient(135deg, var(--red-500), #c62828) !important;
    color: #fff !important;
    padding: 9px 20px !important;
    border-radius: 30px !important;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(225, 67, 67, .35);
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn-post-ad:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(225, 67, 67, .45);
    color: #fff !important;
}
.btn-post-ad i { margin-right: 6px; }

.navbar-link-btn {
    background: none;
    border: none;
    color: #c6d3e5;
    padding: 15px;
    cursor: pointer;
    font-weight: 500;
}
.navbar-link-btn:hover { color: #fff; text-decoration: none; }

.navbar-toggle { border-color: #33445c; margin-top: 18px; }
.navbar-toggle .icon-bar { background-color: #cfe0f7; }
.navbar-brand-wrap .navbar-collapse { border-color: #22344c; }

/* ---------------------------------------------------------------------- */
/* Layout                                                                  */
/* ---------------------------------------------------------------------- */

.main-container {
    margin-top: 30px;
    margin-bottom: 50px;
    min-height: 500px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.section-heading h3 {
    margin: 0;
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-heading h3 i { color: var(--amber-500); font-size: 19px; }
.section-heading .view-all { font-size: 13.5px; font-weight: 600; }

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */

.hero-search {
    position: relative;
    background:
        radial-gradient(circle at 92% -12%, rgba(245,166,35,.25), transparent 45%),
        radial-gradient(circle at 8% 118%, rgba(47,111,237,.30), transparent 45%),
        linear-gradient(120deg, var(--navy-950) 0%, var(--navy-700) 55%, #274a78 100%);
    color: #fff;
    padding: 56px 40px 90px;
    border-radius: 14px;
    /*margin-bottom: 60px;*/
    isolation: isolate;
}

.hero-icon-drift {
    position: absolute;
    top: 18px;
    right: 6%;
    font-size: 130px;
    color: rgba(255,255,255,.06);
    transform: rotate(-8deg);
    animation: driftCar 6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes driftCar {
    0%, 100% { transform: translateY(0) rotate(-8deg); }
    50% { transform: translateY(-14px) rotate(-6deg); }
}

.hero-row {
    display: flex;
    align-items: center;
    gap: 30px;
}
.hero-copy { flex: 1 1 480px; min-width: 0; }
.hero-art { flex: 0 0 380px; max-width: 380px; }
.hero-art img { width: 100%; height: auto; display: block; filter: drop-shadow(0 20px 30px rgba(0,0,0,.25)); }

@media (max-width: 991px) {
    .hero-art { display: none; }
}

.hero-search .eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 12px;
    color: var(--amber-500);
    font-weight: 700;
    margin-bottom: 10px;
}
.hero-search h2 {
    color: #fff;
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 8px;
    max-width: 620px;
}
.hero-search p { color: #c6d3e5; font-size: 15.5px; max-width: 560px; }

.hero-stats { margin-top: 22px; display: flex; gap: 34px; flex-wrap: wrap; }
.hero-stats .stat-num { font-family: 'Poppins', sans-serif; font-size: 22px; font-weight: 700; color: #fff; }
.hero-stats .stat-label { font-size: 12px; color: #9fb2ca; text-transform: uppercase; letter-spacing: .5px; }

.search-card {
    position: static;
    margin-top:40px;
    left: 40px;
    right: 40px;
    bottom: -38px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 18px 22px;
    color: var(--grey-800);
}
.search-card .form-control {
    height: 44px;
    border-radius: 8px;
    border: 1px solid var(--grey-200);
    box-shadow: none;
}
.search-card .form-control:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(47,111,237,.15);
}
.search-card .input-icon-wrap { position: relative; }
.search-card .input-icon-wrap i {
    position: absolute;
    left: 13px;
    top: 14px;
    color: var(--grey-600);
    z-index: 5;
    pointer-events: none;
}
.search-card .input-icon-wrap .form-control { padding-left: 34px; }
.search-card .input-icon-wrap select.form-control { padding-left: 34px; }

.btn-search-cta {
    height: 44px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--green-500), var(--green-600));
    color: #fff;
    font-weight: 600;
    width: 100%;
    box-shadow: 0 4px 12px rgba(26,162,96,.35);
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn-search-cta:hover, .btn-search-cta:focus {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(26,162,96,.45);
    color: #fff;
}
.btn-search-cta i { margin-right: 6px; }

@media (max-width: 767px) {
    .search-card { position: static; margin-top: -55px; }
    .hero-search { padding-bottom: 40px; margin-bottom: 90px; }
    .search-card > .row > div { margin-bottom: 10px; }
}

/* ---------------------------------------------------------------------- */
/* Category tiles                                                          */
/* ---------------------------------------------------------------------- */

.category-strip { margin-bottom: 45px; }
.category-tile {
    display: block;
    background: #fff;
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    text-align: center;
    padding: 22px 10px 16px;
    margin-bottom: 18px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
    text-decoration: none;
}
.category-tile .cat-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eaf1ff, #dbe8ff);
    color: var(--blue-600);
    font-size: 20px;
    transition: background .18s ease;
}
.category-tile:hover .cat-icon { background: linear-gradient(135deg, var(--amber-500), #ff9d3d); color: #fff; }
.category-tile .cat-label { font-size: 13.5px; font-weight: 600; color: var(--grey-800); }

/* ---------------------------------------------------------------------- */
/* Car cards                                                               */
/* ---------------------------------------------------------------------- */

.car-card {
    background: #fff;
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    margin-bottom: 22px;
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
    position: relative;
    height: 100%;
}
.car-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.car-card .car-img-wrap { position: relative; overflow: hidden; }
.car-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    background: #ddd;
    display: block;
    transition: transform .4s ease;
}
.car-card:hover img { transform: scale(1.06); }
.car-card .car-img-wrap .featured-flag {
    position: absolute;
    top: 10px;
    left: 0;
    background: var(--red-500);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 0 4px 4px 0;
}
.car-card .car-card-body { padding: 14px 16px 16px; }
.car-card .price {
    color: var(--green-600);
    font-weight: 700;
    font-size: 19px;
    font-family: 'Poppins', sans-serif;
}
.car-card .car-title { font-weight: 600; margin-bottom: 3px; font-size: 15px; }
.car-card .car-title a { color: var(--grey-800); }
.car-card .car-meta { color: var(--grey-600); font-size: 12.5px; margin-top: 6px; }
.car-card .car-meta i { margin-right: 4px; color: var(--grey-400); }

/* list-view variant for BrowseCars toggle */
.cars-grid.list-view .col-md-4 { width: 100%; float: none; }
.cars-grid.list-view .car-card { display: flex; flex-direction: row; }
.cars-grid.list-view .car-img-wrap { width: 240px; flex: 0 0 240px; }
.cars-grid.list-view .car-card img { height: 100%; min-height: 150px; }
.cars-grid.list-view .car-card-body { flex: 1; }

/* ---------------------------------------------------------------------- */
/* Rotator / carousel (jQuery driven)                                     */
/* ---------------------------------------------------------------------- */

.car-rotator { position: relative; padding: 0 6px; }
.car-rotator-viewport { overflow: hidden; }
.car-rotator-track {
    display: flex;
    transition: transform .45s cubic-bezier(.22,.61,.36,1);
}
.car-rotator-track > .rotator-slide {
    flex: 0 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
}
.car-rotator-nav {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--grey-200);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: var(--navy-800);
    transition: background .15s ease, color .15s ease;
}
.car-rotator-nav:hover { background: var(--amber-500); color: #fff; }
.car-rotator-nav.prev { left: -14px; }
.car-rotator-nav.next { right: -14px; }
.car-rotator-dots { text-align: center; margin-top: 14px; }
.car-rotator-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--grey-400);
    margin: 0 4px;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
.car-rotator-dots span.active { background: var(--amber-500); transform: scale(1.25); }

@media (max-width: 767px) {
    .car-rotator-nav { display: none; }
}

/* ---------------------------------------------------------------------- */
/* Filter sidebar (BrowseCars)                                            */
/* ---------------------------------------------------------------------- */

.filter-card {
    background: #fff;
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    padding: 20px;
    position: sticky;
    top: 84px;
}
.filter-card h4 {
    font-size: 16px;
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--grey-200);
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-card h4 i { color: var(--amber-500); }
.filter-card label { font-size: 12.5px; font-weight: 600; color: var(--grey-600); text-transform: uppercase; letter-spacing: .3px; }

.results-toolbar {
    background: #fff;
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.view-toggle button {
    border: 1px solid var(--grey-200);
    background: #fff;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    color: var(--grey-600);
    cursor: pointer;
}
.view-toggle button.active { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.view-toggle button:first-child { border-radius: 6px 0 0 6px; }
.view-toggle button:last-child { border-radius: 0 6px 6px 0; margin-left: -1px; }

.sort-select {
    height: 36px;
    border-radius: 6px;
    border: 1px solid var(--grey-200);
    padding: 0 10px;
    font-size: 13.5px;
    color: var(--grey-800);
}

/* ---------------------------------------------------------------------- */
/* Car details page                                                        */
/* ---------------------------------------------------------------------- */

.gallery-main {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: #e7eaef;
    box-shadow: var(--shadow-sm);
    margin-bottom: 10px;
}
.gallery-main img { width: 100%; display: block; max-height: 460px; object-fit: cover; cursor: zoom-in; }
.gallery-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery-thumbs img {
    width: 84px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: .75;
    transition: opacity .15s ease, border-color .15s ease;
}
.gallery-thumbs img:hover { opacity: 1; }
.gallery-thumbs img.active-thumb { border-color: var(--amber-500); opacity: 1; }

.detail-title-row h2 { margin-top: 0; margin-bottom: 6px; font-size: 26px; }
.detail-location { color: var(--grey-600); font-size: 13.5px; margin-bottom: 10px; }
.detail-location i { color: var(--amber-500); margin-right: 4px; }

.label.badge-condition, .label.badge-sold {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.badge-condition { background-color: var(--green-500); color: #fff; }
.badge-sold { background-color: var(--red-500); color: #fff; margin-left: 6px; }

.detail-title-row h3.price {
    color: var(--green-600);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    margin-top: 12px;
}

.spec-table { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.spec-table td { padding: 10px 14px; font-size: 13.5px; }
.spec-table td:first-child { color: var(--grey-600); width: 44%; }
.spec-table td:first-child i { color: var(--amber-500); width: 18px; margin-right: 8px; }

.seller-card {
    background: #fff;
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 84px;
}
.seller-card .seller-name { font-weight: 700; font-size: 15.5px; margin-bottom: 4px; }
.seller-card .seller-tag {
    display: inline-block;
    background: #fff6e0;
    color: var(--amber-600);
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    margin-bottom: 10px;
    letter-spacing: .3px;
}
.btn-reveal-phone {
    width: 100%;
    background: linear-gradient(135deg, var(--green-500), var(--green-600));
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 11px;
    font-weight: 600;
    margin-bottom: 10px;
    cursor: pointer;
    transition: box-shadow .15s ease;
}
.btn-reveal-phone:hover { box-shadow: 0 4px 14px rgba(26,162,96,.35); }
.btn-reveal-phone i { margin-right: 7px; }
.btn-send-message {
    width: 100%;
    background: #fff;
    border: 1px solid var(--grey-200);
    color: var(--grey-800);
    border-radius: 8px;
    padding: 11px;
    font-weight: 600;
    margin-bottom: 16px;
}
.btn-send-message i { margin-right: 7px; color: var(--blue-600); }

.safety-tips {
    background: var(--grey-100);
    border-radius: 8px;
    padding: 14px;
    font-size: 12.5px;
    color: var(--grey-600);
    margin-top: 14px;
}
.safety-tips strong { color: var(--grey-800); display: block; margin-bottom: 6px; }
.safety-tips ol { padding-left: 18px; margin-bottom: 0; }

.detail-section-title {
    border-bottom: 2px solid var(--amber-500);
    padding-bottom: 8px;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.detail-section-title i { color: var(--amber-500); }

/* ---------------------------------------------------------------------- */
/* Forms / auth cards                                                      */
/* ---------------------------------------------------------------------- */

.form-card {
    background: #fff;
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    padding: 30px 32px;
    box-shadow: var(--shadow-sm);
}
.form-card h2 { display: flex; align-items: center; gap: 10px; font-size: 24px; }
.form-card h2 i { color: var(--amber-500); }
.form-card .form-group label { font-weight: 600; font-size: 13px; color: var(--grey-800); }
.form-card .form-control, .form-group .form-control {
    border-radius: 7px;
    border: 1px solid var(--grey-200);
    box-shadow: none;
}
.form-card .form-control:focus, .form-group .form-control:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(47,111,237,.13);
}

.btn-warning, .btn.btn-warning {
    background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
    border: 0;
    font-weight: 600;
    border-radius: 7px;
    box-shadow: 0 4px 12px rgba(245,166,35,.3);
}
.btn-warning:hover, .btn.btn-warning:hover {
    background: linear-gradient(135deg, var(--amber-600), #c97a08);
    box-shadow: 0 6px 16px rgba(245,166,35,.4);
}

fieldset.form-section { border: 0; padding: 0; margin: 0 0 8px; }
.form-section-title {
    font-size: 13.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--blue-600);
    margin: 22px 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-section-title:first-child { margin-top: 0; }
.form-section-title i { color: var(--amber-500); }

/* ---------------------------------------------------------------------- */
/* Table pages (MyListings)                                                */
/* ---------------------------------------------------------------------- */

.table-modern {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.table-modern th {
    background: var(--navy-900);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    border: 0 !important;
}
.table-modern td { vertical-align: middle !important; font-size: 13.5px; }
.status-pill {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.status-active { background: #e6f7ee; color: var(--green-600); }
.status-sold { background: #fdeaea; color: var(--red-500); }

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.site-footer {
    background: var(--navy-950);
    color: #9fb2ca;
    padding: 50px 0 0;
    margin-top: 60px;
    font-size: 13.5px;
}
.site-footer h5 {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 16px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 9px; }
.site-footer a { color: #9fb2ca; }
.site-footer a:hover { color: var(--amber-500); }
.footer-newsletter { display: flex; margin-top: 4px; }
.footer-newsletter input {
    flex: 1;
    border: 1px solid #23344b;
    background: #14233a;
    color: #fff;
    padding: 9px 12px;
    border-radius: 6px 0 0 6px;
    font-size: 13px;
}
.footer-newsletter button {
    border: 0;
    background: var(--green-500);
    color: #fff;
    padding: 0 16px;
    border-radius: 0 6px 6px 0;
    font-weight: 600;
    cursor: pointer;
}
.footer-social { margin-top: 16px; }
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #14233a;
    margin-right: 8px;
    transition: background .15s ease;
}
.footer-social a:hover { background: var(--amber-500); color: #14233a; }
.footer-subrow {
    border-top: 1px solid #1c2c42;
    margin-top: 34px;
    padding-top: 26px;
}
.footer-subrow h5 { font-size: 12px; }
.footer-subrow ul li { margin-bottom: 6px; font-size: 12.5px; }
.footer-bottom {
    border-top: 1px solid #1c2c42;
    margin-top: 30px;
    padding: 18px 0;
    text-align: center;
    font-size: 12.5px;
    color: #7189a6;
}

/* ---------------------------------------------------------------------- */
/* Back to top                                                             */
/* ---------------------------------------------------------------------- */

#backToTop {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--navy-900);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    cursor: pointer;
    border: 0;
    transition: background .15s ease, transform .15s ease;
}
#backToTop:hover { background: var(--amber-500); transform: translateY(-2px); }

/* ---------------------------------------------------------------------- */
/* Misc                                                                    */
/* ---------------------------------------------------------------------- */

.required-star { color: var(--red-500); }
.text-muted { color: var(--grey-600) !important; }

.fade-in-up {
    animation: fadeInUp .5s ease both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--grey-100); }
::-webkit-scrollbar-thumb { background: var(--grey-400); border-radius: 5px; }

/* ---------------------------------------------------------------------- */
/* Accessibility: skip link, focus states, reduced motion                 */
/* ---------------------------------------------------------------------- */

.skip-link {
    position: absolute;
    left: 10px;
    top: -60px;
    background: var(--amber-500);
    color: var(--navy-950);
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13.5px;
    z-index: 2000;
    transition: top .15s ease;
}
.skip-link:focus {
    top: 10px;
    color: var(--navy-950);
    outline: 2px solid var(--navy-950);
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.car-card a:focus-visible,
.category-tile:focus-visible {
    outline: 3px solid var(--blue-500);
    outline-offset: 2px;
    border-radius: 3px;
}
#mainContent:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------------------------------------------------------------------- */
/* Smooth navigation: top progress bar + nav underline + page transitions */
/* ---------------------------------------------------------------------- */

#pageProgress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--amber-500), var(--blue-500));
    z-index: 2001;
    transition: width .3s ease, opacity .3s ease;
    opacity: 0;
}
#pageProgress.active { opacity: 1; }

.nav-primary-wrap { position: relative; }
.nav-indicator {
    position: absolute;
    bottom: 0;
    height: 3px;
    background: var(--amber-500);
    border-radius: 3px 3px 0 0;
    transition: left .28s cubic-bezier(.65,0,.35,1), width .28s cubic-bezier(.65,0,.35,1), opacity .2s ease;
    opacity: 0;
    left: 0;
    width: 0;
}
.nav-indicator.visible { opacity: 1; }

.page-fade {
    animation: pageFadeIn .45s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
body.is-leaving .page-fade {
    animation: pageFadeOut .18s ease both;
}
@keyframes pageFadeOut {
    to { opacity: 0; transform: translateY(-6px); }
}

/* ---------------------------------------------------------------------- */
/* Empty states (illustrations)                                           */
/* ---------------------------------------------------------------------- */

.empty-state-card {
    text-align: center;
    padding: 50px 20px 60px;
    background: #fff;
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
}
.empty-state-card img { max-width: 260px; width: 100%; height: auto; margin-bottom: 18px; }
.empty-state-card h3 { font-size: 19px; margin-bottom: 6px; }
.empty-state-card p { max-width: 380px; margin: 0 auto 18px; }

/* ---------------------------------------------------------------------- */
/* Card hover actions: favorite / quick view                              */
/* ---------------------------------------------------------------------- */

.card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 5;
    opacity: 0;
    transform: translateX(6px);
    transition: opacity .18s ease, transform .18s ease;
}
.car-card:hover .card-actions,
.car-card .card-actions.force-show { opacity: 1; transform: translateX(0); }
@media (max-width: 767px) { .card-actions { opacity: 1; transform: none; } }

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 0;
    background: rgba(16,24,38,.55);
    color: #fff;
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background .15s ease, transform .12s ease;
}
.icon-btn:hover { background: var(--amber-500); color: #14202f; }
.icon-btn.btn-fav.is-fav, .icon-btn.btn-fav-detail.is-fav { background: var(--red-500); color: #fff; }
.icon-btn.btn-fav.is-fav i, .icon-btn.btn-fav-detail.is-fav i { font-weight: 900; }
.icon-btn.pop { animation: iconPop .35s ease; }
@keyframes iconPop {
    0% { transform: scale(1); }
    40% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

.nav-fav-link { position: relative; }
.nav-fav-badge {
    position: absolute;
    top: 8px;
    right: 4px;
    background: var(--red-500);
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    min-width: 15px;
    height: 15px;
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}
.nav-fav-badge.show { display: flex; }

/* ---------------------------------------------------------------------- */
/* Compare tool                                                            */
/* ---------------------------------------------------------------------- */

.compare-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--grey-600);
    margin-top: 10px;
    cursor: pointer;
    user-select: none;
}
.compare-check input { accent-color: var(--blue-500); width: 15px; height: 15px; cursor: pointer; }

.compare-tray {
    position: fixed;
    left: 50%;
    bottom: -100px;
    transform: translateX(-50%);
    background: var(--navy-900);
    color: #fff;
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 1200;
    transition: bottom .3s cubic-bezier(.34,1.56,.64,1);
    max-width: 92vw;
}
.compare-tray.show { bottom: 24px; }
.compare-tray .tray-slots { display: flex; gap: 8px; }
.compare-tray .tray-slot {
    width: 34px; height: 34px; border-radius: 8px;
    border: 1.5px dashed #3a4a63;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; color: #6f8bb3;
}
.compare-tray .tray-slot.filled {
    border-style: solid; border-color: var(--amber-500);
    background: rgba(245,166,35,.12); color: var(--amber-500); font-weight: 700;
}
.compare-tray button.tray-compare {
    background: var(--amber-500); color: #14202f; border: 0; border-radius: 8px;
    padding: 9px 16px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.compare-tray button.tray-compare:disabled { opacity: .4; cursor: not-allowed; }
.compare-tray button.tray-clear {
    background: transparent; border: 0; color: #9fb2ca; font-size: 12.5px; cursor: pointer; text-decoration: underline;
}

/* ---------------------------------------------------------------------- */
/* Modal shell (quick view + compare)                                     */
/* ---------------------------------------------------------------------- */

.modal-overlay {
    position: fixed; inset: 0; background: rgba(10,14,22,.65);
    display: none; align-items: center; justify-content: center;
    z-index: 1500; padding: 20px; opacity: 0; transition: opacity .2s ease;
}
.modal-overlay.open { display: flex; opacity: 1; }
.modal-box {
    background: #fff; border-radius: 16px; max-width: 720px; width: 100%;
    max-height: 88vh; overflow-y: auto; position: relative;
    transform: translateY(16px) scale(.98); transition: transform .22s cubic-bezier(.22,.61,.36,1);
    box-shadow: 0 30px 70px rgba(0,0,0,.4);
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }
.modal-close {
    position: absolute; top: 14px; right: 14px; width: 34px; height: 34px;
    border-radius: 50%; background: var(--grey-100); border: 0; cursor: pointer;
    display: flex; align-items: center; justify-content: center; color: var(--grey-800); z-index: 5;
}
.modal-close:hover { background: var(--grey-200); }

.qv-img { width: 100%; height: 280px; object-fit: cover; border-radius: 16px 16px 0 0; background: var(--grey-200); }
.qv-body { padding: 24px 28px 28px; }
.qv-body h3 { font-size: 21px; margin-bottom: 4px; }
.qv-meta { color: var(--grey-600); font-size: 13px; margin-bottom: 14px; }
.qv-price { font-size: 24px; font-weight: 700; color: var(--green-600); font-family: 'Poppins', sans-serif; margin-bottom: 18px; }
.qv-actions { display: flex; gap: 10px; }

.compare-modal-body { padding: 26px 28px; }
.compare-modal-body h3 { margin-bottom: 18px; }
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td {
    padding: 12px 14px; border-bottom: 1px solid var(--grey-200); font-size: 13.5px; text-align: left; vertical-align: top;
}
.compare-table th:first-child, .compare-table td:first-child { color: var(--grey-600); width: 130px; font-weight: 600; }
.compare-table .cmp-price { color: var(--green-600); font-weight: 700; }
.compare-table img { width: 100%; max-width: 140px; height: 90px; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }

/* ---------------------------------------------------------------------- */
/* Toasts                                                                  */
/* ---------------------------------------------------------------------- */

#toastStack {
    position: fixed; bottom: 24px; left: 24px; z-index: 2200;
    display: flex; flex-direction: column-reverse; gap: 10px;
}
.toast {
    background: var(--navy-900); color: #fff; padding: 12px 18px; border-radius: 10px;
    font-size: 13.5px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px;
    opacity: 0; transform: translateY(10px); transition: opacity .2s ease, transform .2s ease;
    max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast i { color: var(--amber-500); }

/* ---------------------------------------------------------------------- */
/* Live search box (Browse Cars sidebar)                                  */
/* ---------------------------------------------------------------------- */

.live-search-wrap { position: relative; margin-bottom: 18px; }
.live-search-wrap i {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--grey-400);
}
.live-search-wrap input {
    width: 100%; height: 42px; border-radius: 8px; border: 1px solid var(--grey-200);
    padding: 0 14px 0 34px; font-size: 13.5px;
}
.live-search-wrap input:focus { border-color: var(--blue-500); outline: none; box-shadow: 0 0 0 3px rgba(47,111,237,.13); }
.live-search-count { font-size: 11.5px; color: var(--grey-600); margin-top: 6px; display: block; }
.car-card.js-hidden { display: none !important; }

/* ---------------------------------------------------------------------- */
/* Animated counters (just ensures no layout shift pre-JS)                */
/* ---------------------------------------------------------------------- */
.stat-num { min-width: 60px; display: inline-block; }

/* ---------------------------------------------------------------------- */
/* Testimonials                                                           */
/* ---------------------------------------------------------------------- */

.testimonial-section { margin: 70px 0; }
.testimonial-rotator {
    position: relative;
    background: linear-gradient(135deg, var(--navy-950), var(--navy-700));
    border-radius: 18px;
    padding: 44px 50px;
    color: #fff;
    overflow: hidden;
    min-height: 220px;
}
.testimonial-rotator::before {
    content: "\201C";
    position: absolute; top: -10px; left: 22px; font-size: 140px; font-family: Georgia, serif;
    color: rgba(245,166,35,.15); line-height: 1;
}
.testimonial-slide {
    display: none; position: relative; z-index: 2;
}
.testimonial-slide.active { display: block; animation: pageFadeIn .5s ease both; }
.testimonial-slide p { font-size: 18px; line-height: 1.6; max-width: 640px; color: #e7edf6; }
.testimonial-author { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.testimonial-avatar {
    width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-family: 'Poppins', sans-serif; color: #14202f;
}
.testimonial-author .name { font-weight: 700; font-size: 14px; }
.testimonial-author .role { font-size: 12px; color: #9fb2ca; }
.testimonial-dots { position: absolute; bottom: 20px; right: 30px; z-index: 3; }
.testimonial-dots span {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.25);
    margin-left: 6px; cursor: pointer; transition: background .15s ease;
}
.testimonial-dots span.active { background: var(--amber-500); }
@media (max-width: 640px) { .testimonial-rotator { padding: 34px 26px; } }

/* ---------------------------------------------------------------------- */
/* FAQ accordion                                                          */
/* ---------------------------------------------------------------------- */

.faq-item {
    background: #fff; border: 1px solid var(--grey-200); border-radius: 10px;
    margin-bottom: 10px; overflow: hidden;
}
.faq-question {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; cursor: pointer; font-weight: 600; font-size: 14.5px;
}
.faq-question i { color: var(--grey-600); transition: transform .2s ease; }
.faq-item.open .faq-question i { transform: rotate(45deg); color: var(--amber-500); }
.faq-answer { padding: 0 18px; max-height: 0; overflow: hidden; transition: max-height .25s ease, padding .25s ease; color: var(--grey-600); font-size: 13.5px; line-height: 1.6; }
.faq-item.open .faq-answer { padding: 0 18px 18px; }

/* ---------------------------------------------------------------------- */
/* Category tab browser (Category / City / Make / Model / Budget / Body)  */
/* ---------------------------------------------------------------------- */

.cat-strip-section {
    background: var(--grey-100);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 45px;
    padding: 34px calc(50vw - 50% + 15px) 40px calc(50vw - 50% + 15px);
    box-sizing: border-box;
}
@media (min-width: 1200px) {
    .cat-strip-section { padding-left: calc(50vw - 585px + 15px); padding-right: calc(50vw - 585px + 15px); }
}
@media (min-width: 992px) and (max-width: 1199px) {
    .cat-strip-section { padding-left: calc(50vw - 485px + 15px); padding-right: calc(50vw - 485px + 15px); }
}
@media (min-width: 768px) and (max-width: 991px) {
    .cat-strip-section { padding-left: calc(50vw - 375px + 15px); padding-right: calc(50vw - 375px + 15px); }
}
.cat-strip-title { font-size: 21px; margin-bottom: 16px; }

.cat-tabs {
    display: flex;
    gap: 28px;
    border-bottom: 1px solid var(--grey-200);
    margin-bottom: 22px;
    overflow-x: auto;
}
.cat-tab {
    background: none;
    border: 0;
    padding: 0 0 12px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--grey-600);
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}
.cat-tab.active { color: var(--navy-900); }
.cat-tab.active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 3px;
    background: var(--blue-500);
    border-radius: 3px 3px 0 0;
}

.cat-carousel { position: relative; }
.cat-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--grey-200);
    background: #fff;
    color: var(--grey-600);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: var(--shadow-sm);
}
.cat-arrow:hover { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.cat-arrow.prev { left: -18px; }
.cat-arrow.next { right: -18px; }

.cat-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
@media (max-width: 991px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }

.cat-grid-tile {
    background: #fff;
    border: 1px solid var(--grey-200);
    border-radius: 10px;
    text-align: center;
    padding: 22px 8px 16px;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.cat-grid-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--blue-500); }
.cat-grid-tile i { font-size: 26px; color: var(--grey-800); margin-bottom: 12px; display: block; }
.cat-grid-tile:hover i { color: var(--blue-500); }
.cat-grid-tile .cat-grid-label { font-size: 13px; font-weight: 600; color: var(--grey-800); }

.cat-dots { text-align: center; margin-top: 20px; }
.cat-dots span {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: var(--grey-400); margin: 0 4px; cursor: pointer; transition: background .15s ease;
}
.cat-dots span.active { background: var(--blue-500); }

/* ---------------------------------------------------------------------- */
/* Car Details — breadcrumb, quick nav, gallery controls, trust strip     */
/* ---------------------------------------------------------------------- */

.breadcrumb-row { font-size: 12.5px; color: var(--grey-600); margin-bottom: 16px; }
.breadcrumb-row a { color: var(--grey-600); }
.breadcrumb-row a:hover { color: var(--blue-500); }
.breadcrumb-row span { color: var(--grey-800); font-weight: 600; }

.quick-nav {
    position: sticky;
    top: 84px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    align-items: center;
}
.quick-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--grey-600);
    text-align: center;
    width: 60px;
}
.quick-nav a i { font-size: 17px; color: var(--grey-400); transition: color .15s ease; }
.quick-nav a:hover, .quick-nav a:hover i { color: var(--blue-500); }

.gallery-overlay-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 6;
}
.gallery-overlay-actions .icon-btn { position: static; }

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 0;
    background: rgba(16,24,38,.5);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 6;
    transition: background .15s ease;
}
.gallery-arrow:hover { background: rgba(16,24,38,.8); }
.gallery-arrow.prev { left: 12px; }
.gallery-arrow.next { right: 12px; }

.financing-note {
    font-size: 12.5px;
    color: var(--grey-600);
    margin-top: 6px;
}
.financing-note i { color: var(--amber-500); margin-right: 5px; }

.managed-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(47,111,237,.1);
    color: var(--blue-600);
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    margin-top: 10px;
}

.trust-badges {
    display: flex;
    justify-content: space-between;
    background: #fff;
    border: 1px solid var(--grey-200);
    border-radius: 10px;
    padding: 16px 10px;
    margin: 16px 0;
}
.trust-badges > div { text-align: center; flex: 1; }
.trust-badges i {
    display: block;
    width: 38px; height: 38px;
    line-height: 38px;
    border-radius: 50%;
    background: var(--grey-100);
    color: var(--blue-600);
    margin: 0 auto 8px;
}
.trust-badges span { font-size: 11px; color: var(--grey-600); font-weight: 600; }

.secondary-actions { display: flex; gap: 10px; margin-top: 14px; }
.btn-outline-mini {
    flex: 1;
    text-align: center;
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    padding: 9px 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--grey-600);
}
.btn-outline-mini:hover { border-color: var(--blue-500); color: var(--blue-600); }
.btn-outline-mini i { margin-right: 5px; }

/* ---------------------------------------------------------------------- */
/* Advertisement slots (Google AdSense placeholders)                       */
/* ---------------------------------------------------------------------- */

.ad-slot {
    position: relative;
    background: repeating-linear-gradient(45deg, var(--grey-100), var(--grey-100) 10px, var(--grey-200) 10px, var(--grey-200) 20px);
    border: 1px dashed var(--grey-400);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.ad-slot-label {
    position: absolute;
    top: 6px;
    left: 12px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--grey-600);
    font-weight: 700;
    z-index: 2;
    background: rgba(255,255,255,.85);
    padding: 1px 7px;
    border-radius: 20px;
}
.ad-creative-link { display: block; width: 100%; line-height: 0; }
.ad-creative { width: 100%; height: auto; display: block; }

.ad-slot-leaderboard { min-height: 90px; margin: 34px 0; }
.ad-slot-rectangle { min-height: 250px; max-width: 300px; margin: 0 auto 20px auto; }
.ad-slot-skyscraper { min-height: 400px; max-width: 300px; margin: 0 auto 20px auto; }

.ad-sidebar-card {
    background: #fff;
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 14px;
    margin-bottom: 24px;
}
