﻿.car-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 9999;
}

.car-modal-content {
    background: #fff;
    width: 100%;
    max-width: 720px;
    border-radius: 18px 18px 0 0;
    padding: 15px;
    animation: slideUp 0.3s ease;
    max-height: 75vh; /* Important */
    display: flex;
    flex-direction: column;
}

.car-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 10px;
}

.scroll-wrap {
    overflow-y: auto;
    padding-right: 4px; /* space for scrollbar */
}

    .scroll-wrap::-webkit-scrollbar {
        width: 6px;
    }

    .scroll-wrap::-webkit-scrollbar-thumb {
        background: #bbb;
        border-radius: 6px;
    }

.car-grid-model {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 10px 15px;

}
/* IMAGE */
.car-card-model img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    border: 1px solid #f1f1f1;
    background: #fff;
    box-sizing: border-box;
}

/* OVERLAY GRADIENT */
.car-card-model::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient( to bottom, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.55) 100% );
    pointer-events: none;
    border-radius: 10px;
}

.car-name-model {
    position: absolute;
    left: 12px;
    bottom: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    z-index: 2; /* IMPORTANT */
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.car-card-model:active {
    transform: scale(0.97);
}
.close-btn {
    background: #f0f0f0;
    border: none;
    color:indianred;
    font-size: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s ease;
    text-decoration:none;
}

    .close-btn:hover {
        background: #e0e0e0;
    }

    .close-btn:active {
        background: #d5d5d5;
        transform: scale(0.92);
    }

/* TABLET */
@media (min-width: 768px) {
    .car-grid-model {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* DESKTOP */
@media (min-width: 1024px) {
    .car-grid-model {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* GLOW ON HOVER */
.car-card-model {
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    /* Hover / Focus (Desktop) */
    .car-card-model:hover,
    .car-card-model:focus {
        transform: translateY(-4px) scale(1.02);
        border-radius: 12px;
        box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25), 0 12px 28px rgba(13, 110, 253, 0.35);
    }
    /* MOBILE TAP EFFECT */
    .car-card-model:active {
        transform: scale(0.96);
        border-radius: 12px;
        box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.35), 0 8px 20px rgba(13, 110, 253, 0.45);
    }
