/**
 * Single Product
 */

@import "shop/single-product/gallery";
@import "shop/single-product/compare";
@import "shop/single-product/wishlist";
@import "shop/single-product/items";
@import "shop/single-product/quantity";
@import "shop/single-product/tabs";
@import "shop/single-product/review";
@import "shop/single-product/related";
@import "shop/single-product/product-layout-default";
@import "shop/single-product/product-type";

.woocommerce-product-gallery {
    .flex-control-thumbs li {
        position: relative;

        img {
            opacity: 0;
            position: absolute;
        }

        span {
            transition: background-color 0.4s;
            display: block;
            width: 100%;
            height: 100%;
            background-color: #d8d8d8;
        }

        .flex-active + span {
            background-color: var(--rz-background-color-primary);
        }

        .razzi-i-video {
            display: none;
        }
    }


}

.single-product {
    div.product {
        .product-gallery-summary {
			.woocommerce-product-gallery__wrapper {
				.woocommerce-product-gallery__image {
					display: none;

					&:first-child {
						display: block;
					}
				}
			}
		}

        .entry-summary {
            width: 100%;
        }

        .woocommerce-product-gallery {
            margin-left: -15px;
            margin-right: -15px;
            width: calc(100% + 30px);
            .woocommerce-product-gallery__image {
                a, img {
                    margin: 0 auto;
                }

                a {
                    display: flex;
                }
            }

            .razzi-video-wrapper{
                &.video-youtube,
                &.video-vimeo {
                    padding-bottom: inherit;

                    iframe {
                        position: static;
                    }
                }
            }

            .flex-direction-nav {
                display: block;
            }
        }

        .summary-top-box {
            margin-bottom: 15px;
        }

        .entry-summary {
            padding-left: 0;
            margin-top: 40px;

            .woocommerce-review-link {
                font-size: 14px;
            }

            .meta-cat {
                display: inline-block;
            }

            .product_title {
                font-size: 24px;
                line-height: 1.2;
                margin-bottom: 5px;
            }

            .price {
                font-size: 18px;
            }

            .star-rating {
                font-size: 14px;
            }
        }

        .flex-control-nav {
            position: absolute;
            width: 100%;
            display: flex;
            justify-content: center;
            text-align: center;
            padding: 0;
            line-height: 0;
            bottom: 20px;
            margin: 0;

            li {
                display: inline-block;
                margin: 0 3px;

                &:last-child {
                    margin-right: 0;
                }

                a {
                    border-radius: 50%;
                    display: block;
                    width: 8px;
                    height: 8px;
                    text-indent: -9999em;
                    background-color: #d8d8d8;
                }

                .flex-active {
                    background-color: var(--rz-background-color-primary);
                }
            }
        }

        .product-button-wrapper {
            > * {
                width: 100%;
            }

            .quantity {
                margin-right: 0;

                .qty-dropdown,
                .current {
                    width: inherit;
                    text-align: center;
                }

                .qty-options {
                    text-align: center;
                }
            }

            .rz-atc-group {
                display: flex;
                flex-direction: column;
                width: 100%;

                .buy_now_button {
                    margin-top: 15px;
                }
            }

            p.cart {
                .single_add_to_cart_button {
                    width: 100%;
                }
            }

            .single_add_to_cart_button {
                margin-right: 0;
                line-height: 54px;
            }
        }

        &.has-buy-now .entry-summary {
            padding-left: 0;
        }

       .rz-wishlist-button .rz-loop_button,
       .rz-compare-button .rz-loop_button {
           display: flex;
           align-items: center;
           justify-content: center;

           .wcboost-products-compare-button__text,
           .wcboost-wishlist-button__text,
           .loop_button-text {
               display: block;
               margin-right: 10px;
           }
       }

        &.product-type-variable {
            form.cart:not(.variations_form) {
                .variations {
                    tr {
                        display: flex;
                        justify-content: space-between;
                        align-items: center;
                        margin-bottom: 40px;

                        td.label,
                        td.value {
                            margin: 0;
                        }

                        td.label {
                            font-size: 18px;

                            .wcboost-variation-swatches__selected-label {
                                display: none;
                            }
                        }

                        td.value {
                            flex: 0 1 70%;
                        }
                    }
                }
            }
        }

        .woocommerce-tabs {
			margin-top: 50px;

            ul.tabs {
                white-space: nowrap;
                overflow: hidden;
                overflow-x: auto;
                justify-content: flex-start;

                li:first-child {
                    padding-left: 0;
                }
            }

            .panel {
                padding: 0;
            }

            .razzi-tab-wrapper {
                position: relative;

                > a {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    padding: 14px 0;
                    color: var( --rz-color-dark );
                    font-weight: 500;
                    text-transform: uppercase;
                    font-size: 15px;

                    &:after {
                        content: '';
                        top: 0;
                        bottom: auto;
                        left: 0;
                        right: 0;
                        background-color: var( --rz-border-color-light );
                        width: 100%;
                        position: absolute;
                        height: 1px;
                        transition: .5s;
                    }

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

                    &.active {
                        color: inherit;

                        > .razzi-svg-icon {
                            -webkit-transform: rotate(180deg);
                            -moz-transform: rotate(180deg);
                            -o-transform: rotate(180deg);
                            -ms-transform: rotate(180deg);
                            transform: rotate(180deg);
                            transition: .3s;
                        }
                    }

                    .razzi-svg-icon {
                        font-size: 20px;
                    }
                }

                &:last-child {
                    position: relative;

                    &:after {
                        content: '';
                        position: absolute;
                        bottom: 0;
                        background-color: var( --rz-border-color-light );
                        opacity: 1;
                        width: 100%;
                        height: 1px;
                    }

                    .panel-content {
                        padding-bottom: 0;
                    }
                }

                .panel-content {
                    display: none;
                    padding: 10px 0 30px 0;
                }

                &.description_tab {
                    .panel-content {
                        padding-bottom: 0;

                        p:first-child {
                            margin-top: 0;
                        }
                    }
                }

                .woocommerce-Reviews {
                    ol.commentlist li {
                        padding: 20px 15px;

                        img.avatar {
                            max-width: 60px;
                        }

                        .comment-text {
                            margin: 0 0 0 20px;
                        }
                    }

                    .comment-respond {
                        padding-top: 0;

                        .comment-reply-title {
                            margin: 0;
                        }

                        .comment-form-rating {
                            margin-top: 35px;
                        }
                    }

                    .star-rating {
                        font-size: 12px;
                    }

                    p.stars a {
                        display: inline-block;
                        font-weight: 400;
                        padding: 0;

                        &:after {
                            display: none;
                        }
                    }
                }
            }

            &.wc-tabs--opened {
                .razzi-tab-wrapper .panel-content {
                    display: block;
                }
            }

            &.wc-tabs-first--opened {
                .razzi-tab-wrapper:first-child .panel-content {
                    display: block;
                }
            }

            &.wc-tabs-all--opened {
                .razzi-tab-wrapper .panel-content {
                    display: block;
                }
            }
        }

        .woocommerce-Reviews {
            ol.commentlist {
                li {
                    padding: 20px;

                    img.avatar {
                        display: none;
                    }

                    .comment-text {
                        margin-left: 0;
                    }
                }
            }

           .comment-respond {
               padding-top: 0;

               .comment-reply-title {
                   font-size: 21px;
                   margin: 0;
               }

               .comment-form-email,
                .comment-form-author {
                    width: 100%;
                }
           }
        }

        .rz-wishlist-button {
            margin-right: 0;

            &.show-wishlist-title {
                .rz-loop_button {
                    justify-content: center;
                }
            }

            + .rz-compare-button {
                margin-left: 0;
            }
        }

        .rz-compare-button {
            margin-left: 0;
            &.show-compare-title {
                .rz-loop_button {
                    justify-content: center;
                    margin: 0;
                }
            }
        }

        .summary-price-box {
            flex-wrap: wrap;
        }
    }

    .single-product-sidebar {
        margin-top: 60px;
    }
}

.pswp .razzi-video-wrapper iframe, .pswp .razzi-video-wrapper .wp-video {
    height: auto;
}

.woocommerce {
    .deal {
        margin: 30px 0;
    }

    .deal-expire-date,
    .deal-sold {
        flex-direction: column;
    }

    .deal-expire-text,
    .deal-expire-countdown,
    .deal-progress {
        width: 100%;

        br {
            display: none;
        }
    }

    .deal-sold-text {
        display: none;
    }
}

.razzi-product-taxonomy-infor {
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.razzi-product-taxonomy-infor__image {
    margin: 0 0 20px 0;
}

.single-product div.product .woocommerce-product-gallery__thumbs-carousel {
    &.swiper-container-initialized {
        position: absolute;
        left: 0;
        right: 0;
        top: auto;
        bottom: 25px;
    }

    .flex-control-nav {
        position: static;

        .swiper-slide  {
            width: 8px !important;
            height: 8px !important;
            overflow: hidden;
            border-radius: 50%;
            margin: 0 6px;
            img {
                opacity: 0;
            }

            &:hover {
                img {
                    opacity: 0;
                }
            }
        }
    }

    .rz-swiper-button {
        display: none;
    }
}