/**
 * Product Block
 * ----------------------------------------------------------------------------
 */

.product-block {
    overflow: hidden;
    position: relative;
    background-repeat: no-repeat;
    background-position: top;
    background-size: cover;

    .product {
        position: relative;
        padding-top: $spacing--xxlarge;

        &::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-image: url('src/svg/mask--2.svg');
            background-repeat: no-repeat;
            background-position: center;
            background-size: cover;
        }

        &::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            opacity: .988;
        }
    }

    .product__images {
        z-index: 2;
        margin-top: auto;
        margin-bottom: auto;
    }

    @include breakpoint(large) {
        .product {
            padding-top: $spacing--xxxlarge;

            & > .row {
                position: relative;
                margin-bottom: -60px;
                &::after {
                    content: '';
                    position: absolute;
                    left: auto;
                    bottom: 0;
                    width: 1000%;
                    height: 16%;
                    background: $white;
                    z-index: 1;
                }
            }
        }

        .vo-add-to-cart {
            .products__actions {
                display: flex;
                flex-wrap: wrap;
            }
            .products__attributes {
                display: inline-block;
                width: 50%;
            }
            .quantity {
                display: inline-block;
                float: right;
            }
            .products__price {
                width: 100%;
            }
        }
    }
}


.product-block--supreme-fruits {
    .product {
        &::after {
            background: $color-supreme;
            @include breakpoint(large) {
                $gradiant-slider: linear-gradient(to right, rgba($color-supreme--light, 1) 0%, rgba($color-supreme, 1) 50%);
                background: $gradiant-slider;
            }
        }
    }
}

.product-block--kingston-delight {
    .product {
        &::after {
            background: $color-kingston;
            @include breakpoint(large) {
                $gradiant-slider: linear-gradient(to right, rgba($color-kingston--light, 1) 0%, rgba($color-kingston, 1) 50%);
                background: $gradiant-slider;
            }
        }
    }
}

.product-block--kingston-xtreme {
    .product {
        &::after {
            background: $color-xtreme;
            @include breakpoint(large) {
                $gradiant-slider: linear-gradient(to right, rgba($color-xtreme--light, 1) 0%, rgba($color-xtreme, 1) 50%);
                background: $gradiant-slider;
            }
        }
    }
}

.product-block--tiramisu-havana {
    .product {
        &::after {
            background: $color-tiramisu;
            @include breakpoint(large) {
                $gradiant-slider: linear-gradient(to right, rgba($color-tiramisu--light, 1) 0%, rgba($color-tiramisu, 1) 50%);
                background: $gradiant-slider;
            }
        }
    }
}

.product-block--rock-melon-berry {
    .product {
        &::after {
            background: $color-berry;
            @include breakpoint(large) {
                $gradiant-slider: linear-gradient(to right, rgba($color-berry--light, 1) 0%, rgba($color-berry, 1) 50%);
                background: $gradiant-slider;
            }
        }
    }
}

.product-block--imperial-custard {
    .product {
        &::after {
            background: $color-custard;
            @include breakpoint(large) {
                $gradiant-slider: linear-gradient(to right, rgba($color-custard--light, 1) 0%, rgba($color-custard, 1) 50%);
                background: $gradiant-slider;
            }
        }
    }
}

.product-block--elyx-kit {
    .product {
        &::after {
            background-color: $color-elyx-box;
        }
    }
}

.product-block--none {
    .product {
        &::after {
            background: $dark-gray;
            @include breakpoint(large) {
                $gradiant-slider: linear-gradient(to right, rgba($medium-gray, 1) 0%, rgba($dark-gray, 1) 50%);
                background: $gradiant-slider;
            }
        }
    }
}

.product-block__inner {
    background: $white;
    position: relative;
    z-index: 2;
}

.product-block__title {
    font-size: rem-calc(22);
    line-height: rem-calc(28);
    margin-bottom: rem-calc(9);
    @include breakpoint(medium) {
        font-size: rem-calc(30);
        line-height: rem-calc(32);
        margin-bottom: rem-calc(16);
    }
    @include breakpoint(large) {
        font-size: rem-calc(40);
        line-height: rem-calc(40);
        margin-bottom: rem-calc(32);
    }
}

/**
 * We overwrite some WooCommerce-specific styling here. It's easier than
 * copying and modifying all WooCommerce templates.
 */

.product-block .product_title + .price {
    display: none;
}

/**
 * Customize the attributes. We use a plugin to turn the variations dropdown
 * into radio buttons and then we style these radio buttons:
 * https://wordpress.org/plugins/wc-variations-radio-buttons/
 */

.product-block .variations {
    margin-top: $spacing--large;
}

.product-block .variations .label,
.product-block .variations .value {
    display: block;
}

.product-block .variations .label label {
    font-size: rem-calc(20);
    margin-bottom: $spacing--small;
}

.product-block .variations .value > div {
    display: inline-block;
}

// Hide the default input
.product-block .variations input[type="radio"] {
    position: absolute;
    left: -9999px;
}

// Style the input label
.product-block .variations input[type="radio"] + label {
    margin: 0 $spacing--small 0 0;
    padding: $spacing--small $spacing;
    border: 1px solid $color-black;
    font-size: rem-calc(16);
}

// Different styling for input label when input is checked
.product-block .variations input[type="radio"]:checked + label {
    box-shadow: 0 0 0 1px $color-black;
    font-weight: 500;
}

.product-block .variations .reset_variations {
    display: none !important;
}

/**
 * Variation price.
 */

.product-block .woocommerce-variation-price {
    font-weight: 500;
    font-size: rem-calc(28);
    margin-top: $spacing;
}

.product-block .product_meta {
    display: none;
}

/**
 * Tabs.
 */

.product-block__tabs {
    margin-top: $spacing--large;

    @include breakpoint(medium) {
        margin-top: $spacing--xxlarge;
        margin-bottom: 30px;
    }
}

.product-block__tab-links {
    list-style: none;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    border-bottom: 1px solid rgba($color-black, 0.2);

    li {
        line-height: 1;
    }
}

.product-block__tab-link {
    position: relative;
    bottom: -1px;
    display: block;
    color: rgba($color-black, 0.5);
    border-bottom: 2px solid transparent;
    padding: $spacing--xsmall 0;
    transition:
        color $transition,
        border-color $transition;

    &[aria-selected="true"] {
        color: $color-black;
        font-weight: 700;
        border-color: $color-black;
    }
}

.product-block__tab-content {
    display: none;
    padding: $spacing--large 0;

    &[aria-hidden="false"] {
        display: block;
    }
}

.product-block__tab-title {
    font-size: rem-calc(20);
}

/**
 * Footer.
 */

.product-block__footer {
    margin-top: $spacing--xxlarge;
}
