/*
* @author  Agence Dn'D <contact@dnd.fr>
* @license https://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
* @link    https://www.dnd.fr/
*/

.section-product-push-2-columns {
    &.sgenshop-custom {
        .main-content-product-push-2-columns {
            display: flex;
            flex-direction: column;
            width: 100%;
            @media (min-width: 767.98px) {
                flex-direction: row;
            }

            &.reverse {
                .right-column {
                    @media (min-width: 767.98px) {
                        order: -1;
                    }
                }
            }

            .left-column {
                position: relative;
                width: 100%;
                @media (min-width: 767.98px) {
                    width: 50%;
                }

                .image-left-container {
                    height: 100%;

                    @media (max-width: 767.98px) {
                        max-height: 640px;
                        overflow: hidden;
                    }

                    img {
                        height: 100%;
                    }
                }

                .image-left-container.image-without-video {
                    @media (min-width: 767.98px) {
                        overflow: hidden;
                    }

                    img {
                        @media (min-width: 767.98px) {
                            transition: transform 1s ease;
                            width: 100%;
                            object-fit: cover;
                        }
                    }
                }

                &:hover {
                    .image-left-container:not(.image-without-video) {
                        @media (min-width: 767.98px) {
                            visibility: hidden;
                            opacity: 0;
                        }
                    }

                    .video-toggle {
                        @media (min-width: 767.98px) {
                            display: block;
                        }
                    }

                    .image-left-container.image-without-video {
                        img {
                            @media (min-width: 767.98px) {
                                transform: scale(1.1);
                            }
                        }
                    }
                }

                .text-overlay {
                    z-index: 4;
                }

                .text-overlay__inner {
                    position: sticky;
                    top: 60px;
                    padding-bottom: 40%;

                    @media (min-width: 767.98px) {
                        top: 80px;
                    }
                }

                .video-toggle {
                    display: none;
                    z-index: 5;
                }

                .image-left-container {
                    position: relative;
                    z-index: 3;
                    transition:
                        opacity 0.5s ease-in,
                        visibility 0.5s ease-in;
                }

                .text-overlay__button-row {
                    display: flex;
                    flex-wrap: wrap;

                    .text-overlay__button {
                        margin: 10px 15px 0;

                        &:first-of-type {
                            margin-inline-start: 10px;
                        }
                    }
                }
            }

            .video-section {
                @media (max-width: 767.98px) {
                    display: none;
                }
            }

            video {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }

            .video-toggle {
                @media (min-width: 767.98px) {
                    bottom: 30px;
                    left: 20px;
                }
            }
        }

        .right-column {
            display: flex;
            position: relative;
            flex-direction: column;
            justify-content: center;
            background-color: var(--background-product);
            padding: 40px 0;
            width: 100%;
            @media (min-width: 767.98px) {
                padding: var(--section-padding-desktop) 0;
                width: 50%;
            }

            .product-block__detail {
                margin: 30px auto 0;
                padding: 0 var(--section-padding-mobile);
                max-width: 520px;
            }

            .product-block__title {
                font-size: var(--base-text-size-x-large);
                font-family: var(--heading-font-family);
                text-transform: uppercase;
                @media (min-width: 767.98px) {
                    font-size: var(--base-text-size-xm-large);
                }
            }

            .product-price--block,
            .product-price--block .price,
            .product-price--block .price__default {
                display: block;
            }

            .product-price {
                span {
                    color: var(--true-gray-700);
                    font-size: var(--base-text-size-medium);
                    text-align: center;
                }
            }

            .product-block__description {
                margin-top: 15px;
                margin-bottom: 30px;
                @media (min-width: 767.98px) {
                    font-size: var(--base-text-size-medium);
                }

                p {
                    color: var(--true-gray-400);
                }
            }

            img {
                width: 100%;
                max-width: 700px;
            }

            .link-section {
                display: block;
                text-align: center;
            }
        }
    }
}
