.product-gallery {
    width: 600px;
    min-width: 600px;
    padding-right: 15px;
    top: 100px;
    position: sticky !important;
    z-index: 2;
}

.product-gallery-preview-wrap {
    margin-bottom: 12px;
    border: 1px solid $color-gray-lite;
    border-radius: $radius-default;

    &.visible-variation-image {
        .product-gallery-preview {
            opacity: 0;
            visibility: hidden;
        }
    }

    .variation-image {
        position: absolute;
        left: 50%;
        top: 50%;
        max-height: 100%;
        max-width: 100%;
        transform: translate(-50%, -50%);
        z-index: 1;
    }
}

.product-gallery-preview {
    transition: $transition-default;

    &:not(.slick-initialized) {
        .gallery-preview-slide {
            &:not(:first-child) {
                display: none;
            }
        }
    }

    .slick-next,
    .slick-prev {
        background: var(--color-primary-transparent);
        width: 30px;
        height: 30px;
        border-radius: 50%;
        transition: $transition-default;

        &::before {
            color: #fff;
        }

        &:hover {
            background: var(--color-primary);
        }
    }

    .slick-next {
        right: 15px;
    }

    .slick-prev {
        left: 15px;
    }

    .gallery-preview-slide {
        position: relative;
    }

    .gallery-preview-item {
        position: relative;
        display: flex;
        width: 100%;
        padding-bottom: 85%;
        background: $color-white;
        transition: none;
        cursor: crosshair;

        > img {
            position: absolute;
            left: 50%;
            top: 50%;
            max-height: 100%;
            max-width: 100%;
            transform: translate(-50%, -50%);
        }

        .image-placeholder {
            width: 130px;
        }
    }

    .gallery-view-icon {
        position: absolute;
        top: 15px;
        right: 15px;
        height: 30px;
        width: 30px;
        display: none;
        justify-content: center;
        align-items: center;
        color: $color-white;
        background: var(--color-primary);
        border-radius: $radius-full;
        z-index: 1;
        transform: rotateY(180deg);
        transition: none;
        cursor: pointer;

        > i {
            font-size: 16px;
            transition: none;
        }
    }
}

.product-gallery-thumbnail {
    .slick-list {
        margin: 0 -6px;
    }

    .slick-current {
        .gallery-thumbnail-item {
            border-color: $color-default;
            border-color: var(--color-primary);
        }
    }

    .slick-arrow {
        height: 22px;
        width: 22px;
        background: $color-default-transparent;
        background: var(--color-primary-transparent);
        border-radius: $radius-full;
        transition: $transition-default;

        &:hover {
            background: $color-default;
            background: var(--color-primary);
        }

        &:before {
            color: $color-white;

            &:hover {
                color: $color-white;
            }
        }
    }

    .slick-prev,
    .slick-next {
        &:before {
            font-size: 10px;
        }
    }

    .slick-prev {
        left: 10px;
        right: auto;
    }

    .slick-next {
        right: 10px;
        left: auto;
    }

    .gallery-thumbnail-item {
        position: relative;
        margin: 0 6px;
        padding-bottom: 75%;
        border: 1px solid $color-gray-lite;
        border-radius: $radius-default;
        overflow: hidden;
        transition: $transition-default;
        cursor: pointer;

        img {
            position: absolute;
            left: 50%;
            top: 50%;
            max-height: 100%;
            max-width: 100%;
            transform: translate(-50%, -50%);
        }

        .image-placeholder {
            max-height: 60%;
            max-width: 60%;
        }
    }
}

@media screen and (max-width: 1600px) {
    .product-gallery {
        width: 500px;
        min-width: 500px;
    }
}

@media screen and (max-width: $xl) {
    .product-gallery {
        width: 430px;
        min-width: 430px;
    }
}

@media screen and (max-width: $lg) {
    .product-gallery {
        width: 578px;
        min-width: 578px;
        padding-right: 15px;
        position: unset !important;
        z-index: unset;
    }

    .product-gallery-preview {
        .gallery-view-icon {
            display: flex;
        }
    }
}

@media screen and (max-width: 600px) {
    .product-gallery {
        width: 100%;
        min-width: 100%;
        padding-right: 0;
    }
}

@media screen and (max-width: $sm) {
    .product-gallery-preview-wrap {
        border: unset;
    }

    .product-gallery-preview {
        .slick-next,
        .slick-prev {
            background: var(--color-primary);
            width: 30px;
            height: 30px;
            border-radius: 50%;
            transition: $transition-default;

            &::before {
                color: #fff;
            }

            &:hover {
                background: var(--color-primary-hover);
            }
        }

        .gallery-view-icon {
            top: 0;
            right: 0;
        }

        .slick-next {
            right: 0px;
        }

        .slick-prev {
            left: 0px;
        }
    }
}
