/* =========================================================
   PRODUCT GALLERY
========================================================= */

.wcepg-gallery {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 16px;
    position: relative;
}


/* =========================================================
   LEFT THUMBNAIL AREA
========================================================= */

.wcepg-thumbnails-wrap {
    order: 1;

    width: 85px;
    flex: 0 0 85px;

    position: relative;

    display: flex;
    flex-direction: column;

    justify-content: center;

    padding: 32px 0;
}


/* =========================================================
   THUMBNAIL VIEWPORT

   Exactly 5 thumbnails visible
========================================================= */

.wcepg-thumbnails {
    width: 85px;

    height: 425px;

    overflow: hidden;

    position: relative;
}


/* Track */

.wcepg-thumbnails-track {
    display: flex;

    flex-direction: column;

    gap: 10px;

    width: 100%;

    transform: translate3d(0, 0, 0);

    transition:
        transform 0.45s cubic-bezier(.22,.61,.36,1);
}


/* =========================================================
   THUMBNAIL
========================================================= */

.wcepg-thumb {
    flex: 0 0 75px;

    width: 75px;
    height: 75px;

    padding: 0;
    margin: 0;

    position: relative;

    overflow: hidden;

    border: 2px solid #ddd;

    background: #fff;

    cursor: pointer;

    transition:
        border-color .25s ease,
        transform .25s ease,
        opacity .25s ease;
}

.wcepg-thumb:hover {
    border-color: #777;
}

.wcepg-thumb.active {
    border-color: #000;
}

.wcepg-thumb img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* =========================================================
   THUMBNAIL ARROWS
========================================================= */

.wcepg-thumb-prev,
.wcepg-thumb-next {
    position: absolute;

    left: 50%;

    transform: translateX(-50%);

    z-index: 20;

    width: 30px;
    height: 30px;

    padding: 0;

    border: 0;

    border-radius: 50%;

    background: rgba(0, 0, 0, .75);

    color: #fff;

    font-size: 18px;

    line-height: 30px;

    display: flex;

    align-items: center;
    justify-content: center;

    cursor: pointer;

    transition:
        background .2s ease,
        opacity .2s ease;
}

.wcepg-thumb-prev:hover,
.wcepg-thumb-next:hover {
    background: #000;
}

.wcepg-thumb-prev {
    top: 0;
}

.wcepg-thumb-next {
    bottom: 0;
}


/* =========================================================
   MAIN GALLERY
========================================================= */

.wcepg-main {
    order: 2;

    flex: 1;

    min-width: 0;

    position: relative;

    overflow: hidden;

    /*
     * Same height for every slide
     */
    height: auto !important;
}


/* =========================================================
   SLIDES CONTAINER
========================================================= */

.wcepg-slides {
    width: 100%;
    height: 100%;

    position: relative;

    overflow: hidden;
}


/* =========================================================
   SMOOTH SLIDES
========================================================= */

.wcepg-slide {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    opacity: 0;

    visibility: hidden;

    transform: translate3d(30px, 0, 0);

    transition:
        opacity .45s ease,
        transform .55s cubic-bezier(.22,.61,.36,1),
        visibility .45s ease;
}

.wcepg-slide.active {
    opacity: 1;

    visibility: visible;

    transform: translate3d(0, 0, 0);

    z-index: 2;
}


/* =========================================================
   IMAGE
========================================================= */

.wcepg-image {
    width: 100%;
    height: 100%;

    padding: 0;
    margin: 0;

    border: 0;

    background: transparent;

    cursor: zoom-in;

    display: flex;

    align-items: center;
    justify-content: center;
}

.wcepg-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}


/* =========================================================
   VIDEO
========================================================= */

.wcepg-video-container {
    width: 100%;
    height: 100%;

    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;
}

.wcepg-video {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    background: #000;
}


/* Video lightbox button */

.wcepg-open-video {
    position: absolute;

    right: 20px;
    bottom: 20px;

    width: 42px;
    height: 42px;

    border: 0;

    border-radius: 50%;

    background: rgba(0,0,0,.7);

    color: #fff;

    cursor: pointer;

    z-index: 5;
}


/* =========================================================
   VIDEO THUMBNAIL
========================================================= */

.wcepg-video-thumb {
    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #222;

    color: #fff;

    font-size: 11px;
}

.wcepg-play {
    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: 30px;
    height: 30px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(0,0,0,.75);

    color: #fff;

    font-size: 13px;

    pointer-events: none;
}


/* =========================================================
   MAIN SLIDER ARROWS
========================================================= */

.wcepg-arrow {
    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    z-index: 10;

    width: 45px !important;
    height: 45px !important;

    padding: 0 !important;

    border: 0 !important;

    border-radius: 50% !important;

    background: rgba(0,0,0,.55) !important;

    color: #fff !important;

    font-size: 32px !important;

    line-height: 40px !important;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;
}

.wcepg-arrow:hover {
    background: rgba(0,0,0,.8);
}

.wcepg-prev {
    left: 15px;
}

.wcepg-next {
    right: 15px;
}


/* =========================================================
   LIGHTBOX
========================================================= */

.wcepg-lightbox {
    display: none;

    position: fixed;

    inset: 0;

    z-index: 999999;

    opacity: 0;
}

.wcepg-lightbox.active {
    display: block;

    animation: wcepgLightboxIn .3s ease forwards;
}

@keyframes wcepgLightboxIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


.wcepg-overlay {
    position: absolute;

    inset: 0;

    background: rgba(0,0,0,.94);
}


/* =========================================================
   LIGHTBOX CONTENT
========================================================= */

.wcepg-lightbox-content {
    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%) scale(.96);

    max-width: 90vw;
    max-height: 90vh;

    display: flex;

    align-items: center;
    justify-content: center;

    transition:
        transform .35s cubic-bezier(.22,.61,.36,1);
}

.wcepg-lightbox.active .wcepg-lightbox-content {
    transform: translate(-50%, -50%) scale(1);
}


.wcepg-lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 2px;
}


.wcepg-lightbox-content video {
    max-width: 90vw;
    max-height: 85vh;

    width: auto;
    height: auto;

    background: #000;
}


/* =========================================================
   LIGHTBOX CLOSE
========================================================= */

.wcepg-close {
    position: absolute;

    top: 15px;
    right: 25px;

    z-index: 10;

    width: 50px;
    height: 50px;

    padding: 0;

    border: 0;

    background: transparent;

    color: #fff;

    font-size: 50px;

    line-height: 45px;

    cursor: pointer;

    transition:
        transform .2s ease;
}

.wcepg-close:hover {
    transform: rotate(90deg);
}


/* =========================================================
   LIGHTBOX ARROWS
========================================================= */

.wcepg-lightbox-prev,
.wcepg-lightbox-next {
    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    z-index: 10;

    width: 50px;
    height: 50px;

    padding: 0;

    border: 0;

    border-radius: 50%;

    background: rgba(255,255,255,.18);

    color: #fff;

    font-size: 35px;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;
}

.wcepg-lightbox-prev:hover,
.wcepg-lightbox-next:hover {
    background: rgba(255,255,255,.35);
}

.wcepg-lightbox-prev {
    left: 20px;
}

.wcepg-lightbox-next {
    right: 20px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1024px) {

    .wcepg-main {
        height: 550px;
    }

    .wcepg-thumbnails-wrap {
        width: 70px;
        flex-basis: 70px;
    }

    .wcepg-thumbnails {
        width: 70px;
        height: 350px;
    }

    .wcepg-thumb {
        flex-basis: 60px;

        width: 60px;
        height: 60px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .wcepg-gallery {
        display: flex;

        flex-direction: column;

        gap: 10px;
    }


    /* Main */

    .wcepg-main {
        order: 1;

        width: 100%;

        height: 450px;
    }


    /* Thumbnail area */

    .wcepg-thumbnails-wrap {
        order: 2;

        width: 100%;

        height: 75px;

        padding: 0 35px;

        display: block;
    }


    /* Horizontal thumbnail viewport */

    .wcepg-thumbnails {
        width: 100%;

        height: 75px;

        overflow: hidden;
    }


    .wcepg-thumbnails-track {
        flex-direction: row;

        gap: 10px;

        transition:
            transform .45s cubic-bezier(.22,.61,.36,1);
    }


    .wcepg-thumb {
        flex: 0 0 65px;

        width: 65px;
        height: 65px;
    }


    /* Thumbnail arrows */

    .wcepg-thumb-prev,
    .wcepg-thumb-next {
        top: 50%;

        bottom: auto;

        transform: translateY(-50%);
    }

    .wcepg-thumb-prev {
        left: 0;
    }

    .wcepg-thumb-next {
        left: auto;

        right: 0;
    }


    /* Main arrows */

    .wcepg-arrow {
        width: 36px;
        height: 36px;

        font-size: 25px;
    }

    .wcepg-prev {
        left: 8px;
    }

    .wcepg-next {
        right: 8px;
    }


    /* Lightbox */

    .wcepg-lightbox-prev,
    .wcepg-lightbox-next {
        width: 38px;
        height: 38px;

        font-size: 27px;
    }

    .wcepg-lightbox-prev {
        left: 5px;
    }

    .wcepg-lightbox-next {
        right: 5px;
    }

}