/* 
*  Custom styling of template for display single product description fields using ACF
*  Author: Yevhenii Kysil - ykysil@refix.pl
*/

.sp-custom-description-wrapper {
    --main-black: #000;
    --fs-h3: 30px;
    --fs-text: 16px;
}

@media only screen and (max-width: 575px) {
    .sp-custom-description-wrapper {
        --fs-h3: 24px;
    }
}

/** Product Description **/

.sp-custom-description-wrapper {
    padding-bottom: 60px;
}

.sp-description-main-header h2 {
    font-size: 45px;
    line-height: 60px;
    font-weight: 800;
    text-align-last: left;
    margin: 20px 0px;
    color: var(--main-black);
}

.sp-description-la-row,
.sp-description-ra-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.sp-description-ra-row {
    flex-direction: row-reverse;
    padding: 20px 0px;
}

.sp-description-la-row-content_image,
.sp-description-ra-row-content_descr {
    width: 60%;
}

.sp-description-la-row-content_image img {
    padding-right: 20px;
}

.sp-description-la-row-content_descr, 
.sp-description-ra-row-content_image {
    width: 40%;
}

.sp-description-la-row-content_descr {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px 20px 20px 40px;
}

.sp-description-ra-row-content_descr {
    padding-right: 80px;
}

.sp-description-la-row-content_descr h3,
.sp-description-ra-row-content_descr h3,
.sp-description-footer h3 {
    font-size: var(--fs-h3);
    color: var(--main-black);
    line-height: 48px;
    font-weight: 700;
    text-align-last: left;
    padding: 0px;
    margin-bottom: 50px;
}

.sp-description-la-row-content_text,
.sp-description-ra-row-content_text,
.sp-description-footer_text {
    font-size: var(--fs-text);
    color: var(--main-black);
    font-weight: 400;
    line-height: 36px;
    text-align: justify;
}

.sp-description-la-row-content_image,
.sp-description-ra-row-content_image {
    display: flex;
    align-items: center;
}

.sp-description-footer {
    margin-bottom: 80px;
}

.sp-description-footer_text {
    text-align: left;
    padding-bottom: 40px;
}

/** Product Description **/

/** Product dimensions **/

.sp-description-wide-image {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 20px;
}

.sp-description-wide-image img {
    display: block;
    margin: 0 auto;
}

/** Product dimensions **/

/** Product Video **/

.sp-product-video-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
}

.sp-product-video-row .sp-product-video_header {
    width: 100%;
    font-size: var(--fs-h3);
    color: var(--main-black);
    line-height: 48px;
    font-weight: 700;
    margin-bottom: 10px;
}

.sp-product-video-row .sp-product-video-wrapper {
    width: 48%;
    text-align: center;
    margin: 0 10px;
}

.sp-product-video-row .sp-product-video-wrapper iframe {
    min-height: 700px;
    min-width: 90%;
}

/** Product Video **/

/** Product Materials **/

.woocommerce-tabs .wc-tab .materials-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}

.woocommerce-tabs .wc-tab .materials-wrapper .material-group-item {
    flex: 0 0 calc(20% - 10px);
    border-radius: 3px;
    min-height: 150px;
    padding: 0px 10px;
    display: flex;
    align-items: end;
    color: #FFF;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    background-size: cover;
}

.woocommerce-tabs .wc-tab .materials-wrapper .material-catalogue-wrapper {
    width: 100%;
    margin-top: 20px
}

.woocommerce-tabs .wc-tab .materials-wrapper .material-catalogue-wrapper a {
    background-color: #000;
    margin: 0 auto;
    display: block;
    width: fit-content;
    text-align: center;
    padding: 13px 20px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 13px;
    color: #FFF;
    line-height: 28px;
    cursor: pointer;
    transition: .3s all;
    -webkit-transition: .3s all;
    -moz-transition: .3s all;
    -ms-transition: .3s all;
    -o-transition: .3s all;
}

/*** Product Materials modal ***/

.modal-materials {
    display: none;
    position: fixed; 
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.15); 
}

.modal-materials-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    width: 650px;
    min-height: 450px;
    left: calc(50% - 325px);
    top: calc(50% - 225px);
    position: absolute;
    border-radius: 5px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px; 
    display: none; 
    background-size: cover;
}

.close-materials {
    color: #000;
    float: right;
    font-size: 38px;
    font-weight: bold;
    line-height: 22px;
}

.close-materials:hover,
.close-materials:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

#modal-materials-name {
    font-size: 18px;
    font-weight: bold;
    position: absolute;
    bottom: 0;
    color: #FFF;
}

/*** Product Materials modal ***/

/** Product Materials **/

@media only screen and (max-width: 1199px) {
    .sp-description-main-header h2 {
        font-size: 38px;
        margin: 10px 0px;
        line-height: 52px;
    }

    .sp-description-la-row-content_descr h3,
    .sp-description-ra-row-content_descr h3,
    .sp-description-footer h3 {
        margin-bottom: 25px;
    }
}

@media only screen and (max-width: 991px) {
    .sp-description-main-header h2 {
        font-size: 32px;
        line-height: 48px;
        padding: 20px;
    }

    .sp-description-la-row-content_image,
    .sp-description-ra-row-content_descr,
    .sp-description-la-row-content_descr, 
    .sp-description-ra-row-content_image {
        width: 100%;
    }

    .sp-description-la-row-content_descr,
    .sp-description-ra-row-content_descr,
    .sp-description-footer {
        padding: 20px;
    }

    .sp-description-la-row-content_image, 
    .sp-description-ra-row-content_image {
        justify-content: center;
    }

    .sp-description-footer {
        margin-bottom: 20px;
    }

    .sp-product-video-row {
        gap: 10px;
    }

    .sp-product-video-row .sp-product-video-wrapper {
        width: 47%;
    }

    .woocommerce-tabs .wc-tab .materials-wrapper .material-group-item {
        flex: 0 0 calc(25% - 10px);
    }
}

@media only screen and (max-width: 768px) {
    .sp-product-video-row .sp-product-video-wrapper {
        width: 80%;
    }

    .woocommerce-tabs .wc-tab .materials-wrapper .material-group-item {
        min-height: 100px;
    }

    .modal-materials {
        background-color: rgba(0,0,0,0.25);
    }

    .modal-materials-content {
        width: 350px;
        min-height: 250px;
        left: calc(50% - 175px);
        top: calc(50% - 125px);
    }
}

@media only screen and (max-width: 575px) {
    .sp-description-main-header h2 {
        font-size: 28px;
        line-height: 36px;
    }

    .sp-description-la-row-content_descr h3, 
    .sp-description-ra-row-content_descr h3, 
    .sp-description-footer h3 {
        margin-bottom: 15px;
        line-height: 36px;
    }

    .sp-product-video-row .sp-product-video-wrapper {
        width: 100%;
    }

    .sp-product-video-row .sp-product-video-wrapper iframe {
        min-height: 500px;
    }
    
}
