@keyframes lookMoveUp {
	from {
		opacity: 0;
        pointer-events: none;
        top: calc(100% + 30px);
	}

	to {
		opacity: 1;
        pointer-events: auto;
        top: calc(100% + 15px);
	}
}

@keyframes lookMoveDown {
    from {
		opacity: 0;
        pointer-events: none;
        bottom: calc(100% + 30px);
	}

	to {
		opacity: 1;
        pointer-events: auto;
        bottom: calc(100% + 15px);
	}
}

.glozin-lookbook-carousel {
    .swiper-button {
        --gz-arrow-top: 50% !important;
    }
}

.glozin-lookbook-carousel__product {
    top: 40%;
    inset-inline-start: 40%;
    cursor: pointer;

    &.active{
        .glozin-lookbook-carousel__product-inner {
            opacity: 1;
            pointer-events: auto;
            top: calc(100% + 15px);
           animation: lookMoveUp 0.4s ease-in-out;
        }

        .glozin-lookbook-carousel__arrow {
            opacity: 1;
            pointer-events: auto;
        }

        .glozin-lookbook-carousel__button {
            --gz-button-bg-color: var(--gz-color-primary);
            --gz-button-color: var(--gz-color-light);
            --gz-button-color-hover: var(--gz-color-light);
            --gz-button-bg-color-hover: var(--gz-color-primary);
            --gz-button-border-color-hover: var(--gz-color-primary);

            .glozin-svg-icon {
                transform: rotate(45deg);
            }
        }
    }
}

.glozin-lookbook-carousel__product-inner {
    min-width: 290px;
    opacity: 0;
    pointer-events: none;
    top: calc(100% + 30px);

    &:after {
        content: "";
        height: 0;
        position: absolute;
        width: 0;
        top: 1px;
        left: 50%;
        -webkit-transform: translateX(-50%) translateY(-100%);
        transform: translate(-50%) translateY(-100%);
        border: solid transparent;
        border-width: 7px;
        border-bottom-color: var(--gz-color-light);
        will-change: transform;
    }
}

.glozin-lookbook-carousel__product-image {
    max-width: 62px;

    &::before {
        padding-bottom: var(--product-image-ratio-percent);
    }
}

.glozin-lookbook-carousel {
    ul.products {
        display: block;
        width: 100%;
        margin: 0;

        li {
            padding: 0;
            margin: 0;
        }
    }

    .gz-product-list-item {
        gap: 10px;
    }

    .product__summary {
        gap: 2px;
    }

    .product-thumbnail {
        --gz-image-rounded: 5px;

        max-width: 60px;
    }

    .glozin-rating {
        margin-top: 5px;
    }

    .product__title {
        font-size: 14 / 16 * 1rem;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        display: -webkit-box;
        overflow: hidden;
    }
}

.glozin-lookbook-carousel__arrow {
    opacity: 0;
    bottom: -35px;

    &::before {
        pointer-events: none;
        content: '';
        display: inline-block;
        width: 16px;
        height: 16px;
        background-color: var(--gz-color-light);
        transform: rotate(45deg);
    }
}

.glozin-lookbook-carousel__button-wrapper {
    width: 40px;
    height: 40px;

    &:after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        display: block;
        -webkit-animation: ripple 1s ease infinite;
        animation: ripple 2s ease infinite;
        border-radius: 50%;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 800px;
        perspective: 800px;
        background-color: rgba( 255, 255, 255, .8 );
    }
}

.glozin-lookbook-carousel__button {
    --gz-button-width: 30px;
    --gz-button-height: 30px;
    --gz-button-font-size: 10px;
    --gz-button-color-hover: var(--gz-color-dark);
    --gz-button-bg-color-hover: var(--gz-color-light);
    --gz-button-border-color-hover: var(--gz-color-light);

    .glozin-svg-icon {
        transition: 0.2s;
    }
}

.glozin-lookbook-carousel__position-top {
    &.active {
        .glozin-lookbook-carousel__product-inner {
            top: auto;
            bottom: calc(100% + 15px);
            animation: lookMoveDown 0.4s ease-in-out;
        }
    }

    .glozin-lookbook-carousel__product-inner {
        top: auto;
        bottom: calc(100% + 30px);

        &:after {
            top: auto;
            bottom: 1px;
            transform: translate(-50%) translateY(100%) rotate(180deg);
        }
    }
}

.lookbook-carousel-modal {
    &.modal {
        --gz-modal-container-padding: 0;
        --gz-modal-content-padding-y: 15px;
        --gz-modal-content-padding-x: 15px;
    }

    .glozin-lookbook-carousel__close {
        --gz-button-bg-color-hover: transparent;
        --gz-button-border-color-hover: transparent;
    }

    .gz-product-list-item {
        gap: 15px;
    }

    .product-thumbnail {
        --gz-image-rounded: 10px;

        max-width: 30%;
    }

    .product__summary {
        > a {
            padding-inline-end: 25px;
        }
    }

    .product__title {
        font-size: 15 / 16 * 1rem;
    }
}

@media (max-width: 991px) {
    .glozin-lookbook-carousel {
        .product__summary {
            padding-inline-end: 30px;
        }
    }
}

@media (min-width: 768px) {
    .lookbook-carousel-modal {
        &.modal {
            --gz-modal-content-width: 390px;
        }
    }
}