/**
 * Carzoon – Similar Cars & Recently Viewed
 * File: css/carzoon-car-sections.css
 *
 * Matches the design reference exactly.
 * Relies on CSS custom properties already defined in carzoon-single.css / motor-base.css.
 */

/* ════════════════════════════════════════════════════════════════
   SHARED LABEL / HEADER
════════════════════════════════════════════════════════════════ */
.czsc-label {
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--czblue, #1a3c6b);
    margin: 0 0 4px;
}

.czsc-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
}

/* ════════════════════════════════════════════════════════════════
   SIMILAR CARS SECTION
════════════════════════════════════════════════════════════════ */
.czsc-similar-section {
    /*background: #f3f5f8;*/
    padding: 52px 0 60px;
    margin-top: 0;
}

.czsc-section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    font-style: normal;
    color: var(--czblue, #1a3c6b);
    margin: 0;
    line-height: 1.15;
}

/* 4-column grid → 2 on tablet → 1 on mobile */
.czsc-cars-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

@media (max-width: 1024px) {
    .czsc-cars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px) {
    .czsc-cars-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Card ────────────────────────────────────────────────────── */
.czsc-car-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .07);
    display: flex;
    flex-direction: column;
    transition: box-shadow .22s ease, transform .22s ease;
}

.czsc-car-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, .13);
    transform: translateY(-2px);
}

.czsc-car-card__img {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f0f2f5;
}

.czsc-car-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.czsc-car-card:hover .czsc-car-card__img img {
    transform: scale(1.03);
}

.czsc-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0b8c4;
}

.czsc-car-card__body {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.czsc-car-card__name {
    font-size: .92rem;
    font-weight: 800;
    color: var(--czblue, #1a3c6b);
    line-height: 1.3;
}

.czsc-car-card__price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.czsc-car-card__price {
    font-size: 1.05rem;
    font-weight: 900;
    color: #003399;
}

.czsc-car-card__monthly {
    font-size: .72rem;
    font-weight: 700;
    color: var(--czgray-mid, #7a8899);
}

.czsc-car-card__location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .72rem;
    color: var(--czgray-mid, #7a8899);
    font-weight: 600;
}

.czsc-car-card__location svg {
    flex-shrink: 0;
    color: var(--czblue, #1a3c6b);
}

.czsc-car-card__btn {
    display: block;
    margin-top: auto;
    padding: 9px 14px;
    border: 1.5px solid var(--czblue, #1a3c6b);
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--czblue, #1a3c6b) !important;
    background: transparent;
    text-align: center;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
    margin-top: 10px;
}

.czsc-car-card__btn:hover {
    background: var(--czblue, #1a3c6b);
    color: #fff !important;
}

/* ════════════════════════════════════════════════════════════════
   RECENTLY VIEWED SECTION
════════════════════════════════════════════════════════════════ */
.czrv-section {
    background: #fff;
    padding: 48px 0 56px;
    border-top: 1px solid #e8ecf1;
}

.czrv-header {
    margin-bottom: 24px;
}

.czrv-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    font-style: normal;
    color: var(--czblue, #1a3c6b);
    margin: 0;
    line-height: 1.15;
}

/* 4-column grid → 2 tablet → 1 mobile */
.czrv-cars-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 1024px) {
    .czrv-cars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px) {
    .czrv-cars-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Compact card ────────────────────────────────────────────── */
.czrv-car-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fb;
    border-radius: 12px;
    padding: 12px;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.czrv-car-card:hover {
    border-color: var(--czblue, #1a3c6b);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .09);
    transform: translateY(-1px);
}

.czrv-car-card__img {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #e8ecf1;
}

.czrv-car-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.czrv-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0b8c4;
}

.czrv-car-card__body {
    flex: 1;
    min-width: 0;
}

.czrv-car-card__name {
    font-size: .82rem;
    font-weight: 800;
    color: var(--czblue, #1a3c6b);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.czrv-car-card__price-row {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-top: 3px;
}

.czrv-car-card__price {
    font-size: .9rem;
    font-weight: 700;
    color: var(--czblue, #1a3c6b);
}

.czrv-car-card__monthly {
    font-size: .68rem;
    font-weight: 700;
    color: var(--czgray-mid, #7a8899);
}
