.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    transition: box-shadow 200ms ease-out, transform 200ms var(--ease-out), opacity 120ms ease-out;

    &:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-card-hover);
    }

    &.is-draft {
        opacity: 0.6;

        &:hover,
        &:focus-within {
            opacity: 1;
        }
    }

    .product-card-image a {
        display: block;
    }

    .product-card-image img {
        display: block;
        width: 100%;
    }

    .vehicle-image-slider {
        width: 100%;
        background-color: #c8cfd9;
        transition: background-color 80ms ease-out;

        &.swiper-initialized {
            background-color: var(--navy-deep);
        }

        /* Only the photo on show grows into the vehicle page, never one swiped out of view */
        &.swiper-initialized .swiper-slide-active img,
        &:not(.swiper-initialized) .swiper-slide:first-child img {
            view-transition-name: var(--transition-name);

            /* While the lot re-sorts, the whole card moves instead */
            :root.is-sorting & {
                view-transition-name: none;
            }
        }
    }
}

.is-sorting .product-card {
    view-transition-name: var(--card-transition-name);
}

.vehicle-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--navy);
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
}

.product-card-body {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    gap: 14px;
    padding: 20px 22px 22px;
}

.product-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.product-card-year-make {
    font-size: 15px;
    color: var(--ink-soft);
}

.product-card-model {
    margin-top: 2px;
    font-weight: 800;
    font-size: 22px;
    line-height: 1.2;
    color: var(--navy);
}

.product-card-price {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 24px;
    color: var(--red);
    white-space: nowrap;
}

.product-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    padding-top: 14px;
    border-top: 1px solid var(--rule);
    font-size: 15px;
    line-height: 1.35;

    dt {
        font-size: 13px;
        color: var(--ink-soft);
    }

    dd {
        font-weight: 700;
    }
}

.product-card-link {
    margin-top: auto;
    min-height: 46px;
    font-size: 16px;
}

@media (width < 900px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
