.car-thumbnails {

    gap: 10px;
    margin-top: 20px;
}

.thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.3s;
}

.thumbnail:hover {
    border-color: #333;
}

/* Video thumbnails hold a muted, preload="metadata" <video> (shows its own
   first frame natively - no server-side thumbnail generation) with a play
   icon layered on top - same treatment as the Classic layout and the admin
   gallery uploader preview. */
.thumbnail-video {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #222;
    overflow: hidden;
}

.thumbnail-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-play-icon {
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

#lightbox-media {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 2000;
}

.lightbox-content {
    position: relative;
}

#lightbox-image {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 5px;
}

.close-lightbox {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

.prev, .next {
    position: absolute;
    top: 50%;
    font-size: 30px;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    cursor: pointer;
    padding: 10px;
}

.prev { left: 10px; }
.next { right: 10px; }