/* =========================================================
   HOMEPAGE - Autoplacevi
   Search + featured vehicles only
   ========================================================= */

.home-search-section {
    padding: 24px 0 34px;
    background:
        radial-gradient(circle at top right, rgba(15, 23, 42, 0.045), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid var(--front-border);
}

.home-search-section .vehicle-filter-card {
    margin-bottom: 0;
}

.home-section {
    padding: 38px 0 70px;
}

.home-featured-section {
    background:
        radial-gradient(circle at top left, rgba(15, 23, 42, 0.035), transparent 34%),
        #f8fafc;
}

.section-heading {
    margin-bottom: 20px;
}

.section-heading span {
    display: inline-flex;
    color: #92400e;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section-heading h2 {
    margin: 8px 0;
    color: var(--front-text);
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: -0.055em;
}

.section-heading p {
    max-width: 720px;
    margin: 0;
    color: var(--front-muted);
    line-height: 1.6;
}

.home-section-heading-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.home-section-heading-row > div {
    min-width: 0;
}

.home-section-heading-row .section-heading {
    margin-bottom: 0;
}

.home-section-link {
    flex: 0 0 auto;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid var(--front-border);
    font-size: 13px;
    font-weight: 950;
    text-decoration: none;
    white-space: nowrap;
}

.home-section-link:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.home-vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    align-items: stretch;
}

.home-featured-grid {
    margin-bottom: 4px;
}

.home-vehicle-card .vehicle-card-image,
.home-vehicle-card .vehicle-card-image > span:not(.vehicle-card-badges) {
    height: 185px;
}

.home-vehicle-card .vehicle-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 6;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    pointer-events: none;
}

.vehicle-card-badges .vehicle-card-seller-badge,
.vehicle-card-featured-badge {
    position: static;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 11px;
    border-radius: 0px;
    font-size: 11px;
    font-style: normal;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.vehicle-card-featured-badge {
    background: #facc15;
    color: #111827;
}

.vehicle-card-badges .vehicle-card-seller-badge {
    background: rgba(15, 23, 42, 0.88);
    color: #ffffff;
}

.home-latest-empty {
    padding: 32px;
    background: #ffffff;
    border: 1px solid var(--front-border);
    border-radius: 14px;
    box-shadow: var(--front-shadow);
}

.home-latest-empty strong {
    display: block;
    margin-bottom: 8px;
    color: var(--front-text);
    font-size: 22px;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.home-latest-empty p {
    margin: 0;
    color: var(--front-muted);
    line-height: 1.6;
}

.vehicle-card.is-frame-promotion,
.vehicle-card.is-badge-promotion,
.vehicle-card.is-pro-promotion,
.vehicle-card.is-top-promotion {
    position: relative;
}

.vehicle-card.is-frame-promotion,
.vehicle-card.is-pro-promotion {
    border-color: #facc15;
    box-shadow: 0 18px 42px rgba(250, 204, 21, 0.20);
}

.vehicle-card.is-frame-promotion::after,
.vehicle-card.is-pro-promotion::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid #facc15;
    pointer-events: none;
}

.vehicle-card.is-badge-promotion,
.vehicle-card.is-top-promotion {
    border-color: #bfdbfe;
}

@media (max-width: 900px) {
    .home-section-heading-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-vehicle-grid {
        grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    }

    .home-vehicle-card .vehicle-card-image,
    .home-vehicle-card .vehicle-card-image > span:not(.vehicle-card-badges) {
        height: 200px;
    }
}

@media (max-width: 700px) {
    .home-search-section {
        padding: 18px 0 26px;
    }

    .home-section {
        padding: 30px 0 56px;
    }

    .section-heading h2 {
        font-size: 28px;
    }

    .home-latest-empty {
        padding: 22px;
    }
}

@media (max-width: 640px) {
    .home-section-link {
        width: 100%;
    }

    .home-vehicle-grid {
        grid-template-columns: 1fr;
    }

    .home-vehicle-card .vehicle-card-image,
    .home-vehicle-card .vehicle-card-image > span:not(.vehicle-card-badges) {
        height: 220px;
    }
}

/* =========================================================
   HOMEPAGE VEHICLE BADGES - compact overlay
   ========================================================= */
.vehicle-card-badges {
    top: 7px;
    left: 7px;
    right: 7px;
    gap: 4px;
}

.vehicle-card-badges .vehicle-card-seller-badge,
.vehicle-card-featured-badge,
.vehicle-card-condition-badge {
    min-height: 20px;
    padding: 0 7px;
    border-radius: 0;
    font-size: 9px;
    line-height: 1;
    letter-spacing: .045em;
    box-shadow: 0 6px 12px rgba(15, 23, 42, .16);
}


/* =========================================================
   HOMEPAGE VEHICLE BADGES - SQUARE FINAL OVERRIDE
   ========================================================= */
.home-vehicle-card .vehicle-card-badge,
.home-vehicle-card .vehicle-card-badges span,
.home-vehicle-card .vehicle-card-featured-badge,
.home-vehicle-card .vehicle-card-seller-badge,
.home-vehicle-card .vehicle-card-condition-badge {
    border-radius: 0 !important;
}

/* =========================================================
   HOMEPAGE CLEAN FEATURED HEADING + CARD PRICE FIX
   ========================================================= */
.home-featured-section .section-heading h2 {
    margin-top: 0;
}

.home-vehicle-card .vehicle-card-price {
    flex: 0 0 auto;
    min-width: 112px;
}

.home-vehicle-card .vehicle-card-price strong {
    white-space: nowrap;
    font-size: 17px;
    line-height: 1;
}

.home-vehicle-card .vehicle-card-badges .vehicle-card-seller-badge,
.home-vehicle-card .vehicle-card-featured-badge,
.home-vehicle-card .vehicle-card-condition-badge,
.home-vehicle-card .vehicle-card-seller-badge {
    border-radius: 0 !important;
}

/* Homepage card footer button alignment */
.home-vehicle-card .vehicle-card-footer {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.home-vehicle-card .vehicle-card-price {
    grid-column: 1 / -1;
    min-width: 0 !important;
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: nowrap;
}

.home-vehicle-card .vehicle-card-price small {
    display: inline-flex;
    flex: 0 0 auto;
    margin: 0;
    font-size: 11px;
    line-height: 1;
    text-transform: none;
    letter-spacing: 0;
}

.home-vehicle-card .vehicle-card-price strong {
    display: inline-flex;
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 18px;
    line-height: 1;
}

.home-vehicle-card .vehicle-card-details,
.home-vehicle-card .vehicle-save-form .vehicle-card-details {
    width: 100%;
    min-height: 38px;
    padding: 0 8px;
    font-size: 11px;
}

/* Fix video badge so it does not become a large placeholder on homepage cards */
.home-vehicle-card .vehicle-card-image > span.vehicle-video-corner-badge {
    width: auto !important;
    height: auto !important;
    min-height: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 9px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    letter-spacing: .05em !important;
}

.home-vehicle-card .vehicle-card-image video.vehicle-card-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
