/* Give listing photos the full width and keep details in reading order. */
.stock-detail-wrap > .vehicle-listing-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    max-width: 1100px;
    margin-inline: auto;
    gap: clamp(1rem, 2.4vw, 2rem) !important;
}

.vehicle-listing-grid .vehicle-listing-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem 1.25rem;
}

.vehicle-listing-grid .vehicle-listing-heading .vehicle-title,
.vehicle-listing-grid .vehicle-listing-heading .detail-price {
    margin: 0 !important;
}

.vehicle-listing-grid .vehicle-listing-heading .detail-price {
    white-space: nowrap;
}

.vehicle-listing-grid > .gallery-panel {
    width: 100%;
    min-width: 0;
    margin: 0;
    justify-self: center;
}

.vehicle-listing-grid .main-gallery-wrapper {
    height: auto !important;
    aspect-ratio: 3 / 2;
    max-height: min(68svh, 670px);
}

.vehicle-listing-grid .main-gallery-slider img {
    object-fit: contain;
}

.vehicle-listing-grid .detail-panel {
    min-width: 0;
}

.vehicle-listing-grid .detail-description {
    margin: 0 0 1.25rem !important;
}

@media (max-width: 640px) {
    .vehicle-listing-grid .main-gallery-wrapper {
        aspect-ratio: 4 / 3;
    }

    .vehicle-listing-grid > .gallery-panel {
        padding: .5rem !important;
    }
}
