/**
 * Vehicle Gallery Component
 *
 * @package Vroomo
 */


/* ==========================================================================
   Base
   ========================================================================== */

.vehicle-gallery {
    width: 100%;
}


/* ==========================================================================
   Main Preview
   ========================================================================== */

.vehicle-gallery__preview {
    position: relative;
    width: 60% !important;
    max-width: 900px;
    overflow: hidden;
    border-radius: 12px;
    background-color: #f5f5f5;
}


/**
 * Image container
 */

.vehicle-gallery__image {
    position: relative;
    width: 100%;
    height: auto !important;
    display: flex;
    justify-content: center;
    align-items:center;
    aspect-ratio: 16 / 9;
}


/**
 * Main image
 */

.vehicle-gallery__main-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
    transition:
        opacity .25s ease,
        transform .35s ease;
}


/* ==========================================================================
   Image Counter
   ========================================================================== */

.vehicle-gallery__counter {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 30px;
    background: rgba(0, 0, 0, .55);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    backdrop-filter: blur(5px);
}


.vehicle-gallery__separator {
    opacity: .7;
}


/* ==========================================================================
   Navigation Arrows
   ========================================================================== */

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, .45);
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition:
        background .25s ease,
        transform .25s ease,
        opacity .25s ease;
}



.gallery-arrow:hover {
    background: rgba(0, 0, 0, .75);
}



.gallery-arrow:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}



.gallery-arrow--prev {
    left: 20px;
}



.gallery-arrow--next {
    right: 20px;
}


/* ==========================================================================
   Thumbnails
   ========================================================================== */

.vehicle-gallery__thumbs {

    display: flex;
   /*align-items: center;
    justify-content: center;*/
    gap: 12px;

    margin-top: 20px;
    overflow-x: auto;
    /*padding-bottom: 5px;*/
    /*scroll-behavior: smooth;
    scrollbar-width: thin;*/
}


/**
 * Hide scrollbar on Webkit browsers
 */

.vehicle-gallery__thumbs::-webkit-scrollbar {
    height: 5px;
}


.vehicle-gallery__thumbs::-webkit-scrollbar-track {
    background: transparent;
}

.vehicle-gallery__thumbs::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.25);
    border-radius: 10px;
}


/* ==========================================================================
   Thumbnail Button
   ========================================================================== */

.gallery-thumb {
    flex: 0 0 auto;
    width: 90px;
    height: 65px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    opacity: .65;
    transition:
        border-color .25s ease,
        opacity .25s ease,
        transform .25s ease;
}



.gallery-thumb:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.gallery-thumb:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}


/**
 * Active thumbnail
 */

.gallery-thumb.is-active {
    border-color: #000;
    opacity: 1;
}


/**
 * Thumbnail image
 */

.gallery-thumb__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}


/* ==========================================================================
   Loading / Transition State
   ========================================================================== */

.vehicle-gallery.is-changing
.vehicle-gallery__main-image {

    opacity: .5;
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .vehicle-gallery__image {
        aspect-ratio: 4 / 3;
    }

    .vehicle-gallery__preview {
        width: 100%;
    }

    .vehicle-gallery__counter {
        top: 12px;
        right: 12px;
        padding: 7px 12px;
        font-size: 13px;
    }

    .gallery-arrow {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .gallery-arrow--prev {

        left: 10px;

    }

    .gallery-arrow--next {

        right: 10px;

    }

    .gallery-thumb {

        width: 75px;

        height: 55px;

    }

}



/* ==========================================================================
   Small Mobile
   ========================================================================== */

@media (max-width: 480px) {

    .vehicle-gallery__thumbs {

        gap: 8px;

    }

    .gallery-thumb {

        width: 65px;

        height: 48px;

    }

}