/* ===== HERO ===== */

.landing-hero {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 40%, #3b82f6 100%);
    color: #fff;
    padding: 3.5rem 1rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.landing-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    position: relative;
}

.landing-hero p {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 1.5rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.landing-hero .hero-search {
    max-width: 540px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
    position: relative;
}

.landing-hero .hero-search input {
    flex: 1;
    padding: 0.85rem 1.2rem;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.landing-hero .hero-search button {
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s;
    box-shadow: 0 4px 12px rgba(239,68,68,0.4);
}

.landing-hero .hero-search button:hover {
    background: var(--accent-dark);
}

/* ===== CATEGORY PILLS ===== */

.category-pills {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: -1.25rem auto 2rem;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.5rem;
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.category-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    text-decoration: none;
}

.category-pill.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.category-pill .pill-count {
    font-weight: 400;
    opacity: 0.7;
    font-size: 0.8rem;
}

.category-pill.active .pill-count {
    opacity: 0.85;
}

/* ===== SECTIONS ===== */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
}

.section-link {
    font-size: 0.88rem;
    font-weight: 500;
}

/* ===== LISTING GRID ===== */

.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* ===== LISTING LIST ===== */

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

.listing-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow 0.2s, transform 0.2s;
}

.listing-row:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    text-decoration: none;
    color: var(--text);
}

.listing-row-img {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg);
}

.listing-row-content {
    flex: 1;
    min-width: 0;
}

.listing-row-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listing-row-meta {
    color: var(--text-muted);
    font-size: 0.78rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.15rem;
}

.listing-row-meta span {
    background: var(--bg);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    white-space: nowrap;
}

.listing-row-location {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.listing-row-price {
    flex-shrink: 0;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-dark);
    text-align: right;
}

/* ===== VIEW TOGGLE ===== */

.view-toggle {
    padding: 0.4rem 0.75rem;
    font-size: 1.1rem;
    line-height: 1;
}

.view-toggle.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ===== LISTING CARD ===== */

.listing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    display: block;
    color: var(--text);
}

.listing-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--text);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 200px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 3rem;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.listing-card:hover .card-img img {
    transform: scale(1.05);
}

.img-count-badge {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-weight: 500;
}

.featured-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--warning);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sold-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
}

.card-body {
    padding: 0.9rem 1rem 1rem;
}

.card-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.15rem;
}

.card-title {
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.35rem;
    color: var(--text);
}

.card-meta {
    color: var(--text-muted);
    font-size: 0.8rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.3rem;
}

.card-meta span {
    background: var(--bg);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

.card-location {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.car-placeholder {
    font-size: 3rem;
    opacity: 0.3;
}

/* ===== LANDING PAGE LAYOUT ===== */

.landing-section {
    padding: 1.5rem 0;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .landing-hero h1 {
        font-size: 1.6rem;
    }

    .landing-hero p {
        font-size: 0.95rem;
    }

    .landing-hero .hero-search {
        flex-direction: column;
    }

    .category-pills {
        margin: -1rem 0.5rem 1.5rem;
    }

    .category-pill {
        padding: 0.55rem 1rem;
        font-size: 0.82rem;
    }

    .listing-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .listing-grid {
        grid-template-columns: 1fr;
    }

    .landing-hero {
        padding: 2rem 1rem 1.5rem;
    }

    .landing-hero h1 {
        font-size: 1.35rem;
    }
}
