/* Product Card */

.product-card {
    display: grid;
    background: white;
    border-radius: 8px;
    border: 1px solid #f3f3f3;
    margin-bottom: 32px;
    transition: box-shadow 0.5s ease;
    box-shadow: 0px 5px 25px -15px rgba(0, 0, 0, 0.35);
    background: white;
    margin: 24px 16px;
    overflow: hidden;
    align-items: center;
    &.product-card-stk {
        @media screen and (min-width: 600px) {
            grid-template-columns: minmax(40%, 100%) minmax(60%, 100%);
            grid-template-rows: repeat(3, min-content);
            grid-template-areas: "product-name product-metric" "product-promotion product-promotion" "product-extra-info product-extra-info";
        }
        @media screen and (max-width: 599px) {
            grid-template-columns: 100%;
            grid-template-rows: repeat(3, min-content);
            grid-template-areas: "product-name" "product-metric" "product-promotion" "product-extra-info";
            .product-name {
                text-align: center;
                border-bottom: 1px solid #f3f3f3;
                justify-self: center;
            }
        }
    }
    .product-name {
        grid-area: product-name;
        font-size: 28px;
        font-weight: 600;
    }
    .product-metric {
        grid-area: product-metric;
        text-align: right;
        @media screen and (max-width: 599px) {
            text-align: center;
        }
        .metric {
            @media screen and (min-width: 600px) {
                &:first-child {
                    margin-left: 16px;
                }
                &:nth-child(n+2) {
                    margin-left: 36px;
                }
            }
            text-align: center;
            font-size: 36px;
            font-weight: 700;
            display: inline-block;
            @media screen and (max-width: 599px) {
                margin: 0 16px;
                font-size: 28px;
            }
        }
    }
    .product-ac {
        grid-area: product-ac;
        text-align: right;
    }
    .product-promotion {
        grid-area: product-promotion;
        background: #ecf8fd;
        margin: 0 24px;
        border-radius: 8px;
        font-size: 18px;
    }
    .product-extra-info {
        grid-area: product-extra-info;
    }
    &>* {
        padding: 18px 24px;
        .small-text {
            font-weight: 500;
            font-size: 14px;
        }
    }
    .blue-text {
        color: #076b9c;
    }
    .green-text {
        color: #72a748;
    }
    .orange-text {
        color: #72a748;
    }
    p:empty {
        display: none;
    }
    p {
        margin: 0;
    }
}


/* Editorial Code Styles */

.editorial-code {
    display: block;
    background: linear-gradient( 0deg, rgba(7, 107, 156, 1) 30%, rgba(255, 255, 255, 1) 60%);
    color: #484848;
    font-size: 14px;
    font-weight: normal;
    line-height: 180%;
    padding: 20px 20px 20px;
    margin: 20px 5px;
    border-top-right-radius: 20px;
    overflow: hidden;
    border-bottom-left-radius: 20px;
    transition: 0.5s all ease;
    position: relative;
    &:before {
        content: attr(code-text);
        width: 100%;
        height: 100%;
        font-size: 14px;
        font-weight: normal;
        line-height: 180%;
        background: #f5f5f5;
        display: block;
        position: absolute;
        bottom: 5px;
        left: 0;
        padding: 23px 20px 20px;
        color: #484848;
        border-top-right-radius: 20px;
        border-bottom-left-radius: 20px;
        transition: 0.5s all ease;
    }
    &:after {
        content: "";
        display: block;
        width: 30%;
        height: 15px;
        background: #77aa43;
        position: absolute;
        bottom: -5px;
        right: -10px;
        transform: skew(-30deg);
        transition: 0.5s all ease;
    }
    &:hover {
        &:before {
            background: #e6e6e6 !important;
        }
        &:after {
            bottom: 0px;
        }
    }
}


/* Bio box / Author */

.biobox {
    white-space: nowrap;
    margin: 0 0 30px 0;
    &:after {
        content: "";
        display: inline-block;
        width: 1px;
        padding-bottom: 24%;
        vertical-align: bottom;
    }
}

.authorbio {
    cursor: pointer;
    display: inline-block;
    width: calc(100% - 1px);
    padding: 16px 3% 16px 27%;
    position: relative;
    background: #e9e9e9;
    white-space: normal;
    transition: all 0.5s ease;
    text-align: justify;
    line-height: 2;
    vertical-align: bottom;
    @include mobile-minus {
        padding: 16px 5% 16px 5%;
        margin-top: 40%;
    }
    &:hover {
        box-shadow: 0px 10px 14px -10px rgba(0, 0, 0, 0.75);
    }
    &:before {
        content: "";
        display: inline-block;
        width: 25%;
        padding-bottom: 25%;
        position: absolute;
        left: 0;
        bottom: 0;
        background-size: contain;
        background-repeat: no-repeat;
        @include mobile-minus {
            width: 50%;
            padding-bottom: 40%;
            bottom: 100%;
            background-size: cover;
            background-position: 0 0;
        }
    }
    h5 {
        font-size: 20px;
        font-weight: bold;
        margin-top: 0;
        margin-bottom: 8px;
        @include mobile-minus {
            display: block;
            position: absolute;
            bottom: 100%;
            right: calc(5% + 1px);
            width: 61%;
            font-size: 7vw;
            text-align: right;
        }
    }
    p {
        margin-bottom: 0;
    }
}


/* author profile 1 */

.author1:before {
    background-image: url(https://blogassets.moneyhero.com.hk/wp-content/uploads/sites/3/2020/05/21173739/propic.png);
}


/* dynamic banner */

div.dynamic-banner[data-banner-id] {
    display: none;
}

a.dynamic-banner-on[data-banner-id] {
    display: block;
    margin: 10px 0 20px 0;
    border-radius: 5px;
    overflow: hidden;
    @include desktop-plus {
        margin: 10px 12% 20px 12%;
    }
}