/* =====================================================
   ARF — Vehicle Listing  (namespace: .arf-listing)
   ===================================================== */

/* ── Hero band ───────────────────────────────────────── */
.vl-hero {
    background: linear-gradient(135deg, #21252f 0%, #171a21 100%);
    padding: 52px 0 44px;
    position: relative;
    overflow: hidden;
}

.vl-hero::before {
    content: '';
    position: absolute;
    top: -140px;
    right: -140px;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(138,26,31,0.22) 0%, transparent 68%);
    pointer-events: none;
}

.vl-hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(138,26,31,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.vl-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(138,26,31,0.2);
    border: 1px solid rgba(138,26,31,0.35);
    border-radius: 100px;
    padding: 0.25rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: rgba(255,255,255,0.65);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.vl-hero-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 2.125rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.375rem;
    line-height: 1.2;
}

.vl-hero-sub {
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.45);
    margin: 0 0 2rem;
}

/* Quick search bar in hero */
.vl-hero-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 0.625rem;
    max-width: 700px;
}

.vl-hero-select {
    height: 44px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 10px;
    color: rgba(255,255,255,0.85);
    font-size: 0.875rem;
    padding: 0 2.25rem 0 0.875rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23ffffff55' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    transition: border-color 0.14s, background-color 0.14s;
    min-width: 0;
}

.vl-hero-select:focus {
    outline: none;
    border-color: rgba(138,26,31,0.6);
    background-color: rgba(255,255,255,0.13);
    box-shadow: 0 0 0 3px rgba(138,26,31,0.18);
}

.vl-hero-select option { background: #21252f; color: #fff; }

.vl-hero-select.has-value {
    border-color: rgba(138,26,31,0.45);
    background-color: rgba(138,26,31,0.12);
}

.vl-hero-clear-btn {
    height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    color: rgba(255,255,255,0.65);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0 1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.13s, color 0.13s;
}

.vl-hero-clear-btn:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

/* ── Main layout ─────────────────────────────────────── */
.vl-section {
    background: #f8f8f9;
    min-height: 60vh;
    padding-bottom: 3rem;
}

.vl-layout {
    display: grid;
    grid-template-columns: 248px 1fr;
    gap: 1.5rem;
    padding-top: 1.75rem;
    align-items: start;
}

/* ── Sidebar ─────────────────────────────────────────── */
.vl-sidebar {
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 16px;
    overflow: hidden;
    position: sticky;
    top: 100px;
}

.vl-sidebar-head {
    padding: 1rem 1.125rem;
    border-bottom: 1px solid #ededed;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vl-sidebar-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #24272c;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vl-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.375rem;
    border-radius: 100px;
    background: #8a1a1f;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1;
}

.vl-clear-all-btn {
    background: none;
    border: none;
    font-size: 0.8125rem;
    color: #8a1a1f;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
    transition: opacity 0.12s;
}
.vl-clear-all-btn:hover { opacity: 0.7; }

.vl-filter-form {
    padding: 1rem 1.125rem;
}

.vl-filter-group {
    margin-bottom: 0.875rem;
}

.vl-filter-label {
    font-size: 0.625rem;
    font-weight: 700;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.3rem;
}

.vl-filter-select {
    width: 100%;
    height: 38px;
    background: #f8f8f9;
    border: 1px solid #ededed;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #24272c;
    padding: 0 2rem 0 0.75rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' fill='%238e8e93' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.625rem center;
    transition: border-color 0.13s, box-shadow 0.13s, background-color 0.13s;
}

.vl-filter-select:focus {
    outline: none;
    border-color: #8a1a1f;
    box-shadow: 0 0 0 3px rgba(138,26,31,0.1);
    background-color: #fff;
}

.vl-filter-select.has-value {
    border-color: rgba(138,26,31,0.4);
    background-color: rgba(138,26,31,0.04);
    color: #8a1a1f;
    font-weight: 500;
}

.vl-filter-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 0.875rem 0;
}

/* Featured toggle */
.vl-featured-label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    background: #f8f8f9;
    border: 1px solid #ededed;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #696665;
    transition: border-color 0.12s, background 0.12s;
    user-select: none;
}

.vl-featured-label input[type="checkbox"] { display: none; }

.vl-toggle-track {
    width: 32px;
    height: 17px;
    border-radius: 100px;
    background: #d2d2d6;
    position: relative;
    transition: background 0.15s;
    flex-shrink: 0;
}

.vl-toggle-thumb {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.22);
}

.vl-featured-label.is-on .vl-toggle-track { background: #8a1a1f; }
.vl-featured-label.is-on .vl-toggle-thumb { transform: translateX(15px); }
.vl-featured-label.is-on {
    border-color: rgba(138,26,31,0.3);
    background: rgba(138,26,31,0.04);
    color: #24272c;
    font-weight: 500;
}

/* ── Results bar ─────────────────────────────────────── */
.vl-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
    flex-wrap: wrap;
}

.vl-results-count {
    font-size: 0.875rem;
    color: #696665;
    margin: 0;
}

.vl-results-count strong {
    color: #24272c;
    font-weight: 700;
}

.vl-results-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vl-per-page-select {
    height: 34px;
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #24272c;
    padding: 0 1.875rem 0 0.625rem;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' fill='%238e8e93' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    transition: border-color 0.12s;
}
.vl-per-page-select:focus { outline: none; border-color: #8a1a1f; }

.vl-view-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #ededed;
    background: #fff;
    color: #8e8e93;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.vl-view-btn:hover { background: #f4f4f5; border-color: #c8c8c8; color: #24272c; }
.vl-view-btn.is-active { background: #21252f; border-color: #21252f; color: #fff; }

/* Active filter chips */
.vl-chips {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    margin-bottom: 0.875rem;
}

.vl-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(138,26,31,0.06);
    border: 1px solid rgba(138,26,31,0.2);
    border-radius: 100px;
    padding: 0.2rem 0.35rem 0.2rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #8a1a1f;
    white-space: nowrap;
}

.vl-chip-x {
    background: rgba(138,26,31,0.1);
    border: none;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #8a1a1f;
    padding: 0;
    font-size: 0.7rem;
    flex-shrink: 0;
    transition: background 0.1s;
}
.vl-chip-x:hover { background: rgba(138,26,31,0.2); }

/* ── Cards grid ──────────────────────────────────────── */
.vl-cards-wrap { transition: opacity 0.22s; }
.vl-cards-wrap.is-loading { opacity: 0.4; pointer-events: none; }

.vl-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.125rem;
}

.vl-list-mode {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ── Vehicle card overrides ──────────────────────────── */
.arf-listing .box-car-list.style-2 {
    border: 1px solid #ededed;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.arf-listing .box-car-list.style-2:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(36,39,44,0.1);
    border-color: transparent;
}

/* Image panel */
.arf-listing .box-car-list.style-2 .image-group {
    position: relative;
    flex-shrink: 0;
}

.arf-listing .box-car-list.style-2 .img-style {
    height: 196px;
    overflow: hidden;
    background: #f2f2f4;
}

.arf-listing .box-car-list.style-2 .img-style img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.arf-listing .box-car-list.style-2:hover .img-style img { transform: scale(1.05); }

/* Badge overlay */
.arf-listing .box-car-list.style-2 .image-group .top {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.arf-listing .box-car-list.style-2 .image-group .top ul {
    display: flex;
    gap: 5px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.arf-listing .box-car-list.style-2 .flag-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.2rem 0.55rem;
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.2;
    backdrop-filter: blur(6px);
}

.arf-listing .box-car-list.style-2 .flag-tag.style-1 {
    background: rgba(36,39,44,0.74);
    color: #fff;
}

.arf-listing .box-car-list.style-2 .flag-tag.style-1 .icon {
    display: flex;
    align-items: center;
}

.arf-listing .box-car-list.style-2 .flag-tag.success {
    background: #14a077;
    color: #fff;
}

.arf-listing .box-car-list.style-2 .year.flag-tag {
    background: rgba(36,39,44,0.74);
    color: #fff;
}

/* Content */
.arf-listing .box-car-list.style-2 .content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0.875rem 0.875rem 0;
}

.arf-listing .box-car-list.style-2 .inner1 { flex: 1; }

.arf-listing .box-car-list.style-2 .text-address p {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #8a1a1f;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin: 0 0 0.25rem;
}

.arf-listing .box-car-list.style-2 .link-style-1 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0 0 0.625rem;
    line-height: 1.25;
}

.arf-listing .box-car-list.style-2 .link-style-1 a {
    color: #24272c;
    text-decoration: none;
    transition: color 0.14s;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.arf-listing .box-car-list.style-2:hover .link-style-1 a { color: #8a1a1f; }

/* Spec pills */
.arf-listing .box-car-list.style-2 .icon-box {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
}

.arf-listing .box-car-list.style-2 .icons.flex-three {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.225rem 0.5rem;
    border-radius: 6px;
    background: #f4f4f6;
    font-size: 0.75rem;
    color: #696665;
    border: 1px solid #f0f0f0;
    white-space: nowrap;
}

.arf-listing .box-car-list.style-2 .icons.flex-three i { color: #8e8e93; }

/* Seller footer */
.arf-listing .box-car-list.style-2 .inner2 {
    border-top: 1px solid #f2f2f2;
    margin: 0 -0.875rem;
    padding: 0.625rem 0.875rem 0.875rem;
}

.arf-listing .box-car-list.style-2 .days-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.arf-listing .box-car-list.style-2 .img-author {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex: 1;
    text-decoration: none;
    min-width: 0;
}

.arf-listing .box-car-list.style-2 .img-author img {
    width: 26px !important;
    height: 26px !important;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.arf-listing .box-car-list.style-2 .img-author > div {
    width: 26px !important;
    height: 26px !important;
    border-radius: 50%;
    flex-shrink: 0;
}

.arf-listing .box-car-list.style-2 .img-author span {
    font-size: 0.75rem;
    color: #696665;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.arf-listing .box-car-list.style-2 .chat {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    color: #8e8e93;
    text-decoration: none;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    border: 1px solid #ededed;
    transition: border-color 0.12s, color 0.12s;
    flex-shrink: 0;
}

.arf-listing .box-car-list.style-2 .chat .icon { display: flex; align-items: center; }
.arf-listing .box-car-list.style-2 .chat:hover { border-color: #8a1a1f; color: #8a1a1f; }
.arf-listing .box-car-list.style-2 .days-box > p { display: none; }

/* LIST VIEW MODE card overrides */
.vl-list-mode .box-car-list.style-2 {
    flex-direction: row;
    height: auto;
}

.vl-list-mode .box-car-list.style-2 .image-group {
    width: 200px;
    flex-shrink: 0;
}

.vl-list-mode .box-car-list.style-2 .img-style {
    height: 100%;
    min-height: 140px;
}

.vl-list-mode .box-car-list.style-2 .content {
    flex-direction: row;
    align-items: center;
    gap: 0;
    flex: 1;
    padding: 0.875rem 1rem;
}

.vl-list-mode .box-car-list.style-2 .inner1 {
    flex: 1;
    padding-right: 1rem;
}

.vl-list-mode .box-car-list.style-2 .inner2 {
    border-top: none;
    border-left: 1px solid #f2f2f2;
    margin: -0.875rem 0;
    padding: 0.875rem 0 0.875rem 1rem;
    min-width: 160px;
}

/* ── Empty state ─────────────────────────────────────── */
.vl-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 24px;
    border: 1px dashed #e4e4e4;
    border-radius: 14px;
    background: #fafafa;
}

.vl-empty-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(138,26,31,0.07);
    color: #8a1a1f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.vl-empty-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #24272c;
    margin-bottom: 0.375rem;
}

.vl-empty-sub {
    font-size: 0.875rem;
    color: #696665;
    margin-bottom: 1.25rem;
}

.vl-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    background: #8a1a1f;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity 0.12s;
}
.vl-empty-btn:hover { opacity: 0.87; }

/* ── Mobile filter drawer ────────────────────────────── */
.vl-mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid #ededed;
    background: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    color: #24272c;
    cursor: pointer;
}

.vl-badge-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 100px;
    background: #8a1a1f;
    color: #fff;
    font-size: 0.5625rem;
    font-weight: 700;
    padding: 0 0.3rem;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1199px) {
    .vl-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991px) {
    .vl-layout { grid-template-columns: 1fr; }
    .vl-sidebar {
        position: static;
        display: none;  /* hidden on mobile; shown in offcanvas */
    }
    .vl-sidebar.is-open { display: block; }
    .vl-mobile-filter-btn { display: inline-flex; }
    .vl-hero-bar { grid-template-columns: 1fr 1fr auto; }
}

@media (max-width: 767px) {
    .vl-hero { padding: 36px 0 32px; }
    .vl-hero-title { font-size: 1.625rem; }
    .vl-hero-bar { grid-template-columns: 1fr; }
    .vl-grid { grid-template-columns: 1fr; }
    .vl-list-mode .box-car-list.style-2 { flex-direction: column; }
    .vl-list-mode .box-car-list.style-2 .image-group { width: 100%; }
    .vl-list-mode .box-car-list.style-2 .content { flex-direction: column; padding: 0.875rem 0.875rem 0; }
    .vl-list-mode .box-car-list.style-2 .inner2 {
        border-left: none;
        border-top: 1px solid #f2f2f2;
        margin: 0 -0.875rem;
        padding: 0.625rem 0.875rem 0.875rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .arf-listing .box-car-list.style-2,
    .arf-listing .box-car-list.style-2 .img-style img,
    .vl-cards-wrap,
    .vl-toggle-thumb,
    .vl-toggle-track { transition: none; }
}
