.rm-module {
    @media (max-width: $break-sm-max) {
        .width-infinity-header {
            margin-bottom: 10px;
        }
        .width-infinity-row {
            flex-wrap: nowrap;
            overflow-y: auto;
            padding: 20px 0 25px 15px;
        }
    }

    &-col {
        transition: box-shadow $mainTransition;
        position: relative;
        z-index: 1;
        @media (min-width: $break-xl) {
            flex: 0 0 20%;
            max-width: 20%;
        }

        &.product-grid {
            flex: 0 0 100%;
            max-width: 100%;
            @media (min-width: $break-md) {
                flex: 0 0 50%;
                max-width: 50%;
            }
            @media (min-width: $break-lg) {
                flex: 0 0 33.33333%;
                max-width: 33.33333%;
            }
            @media (min-width: $break-xxl) {
                flex: 0 0 25%;
                max-width: 25%;
            }
        }

        &:hover {
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
            z-index: 20;
        }

        @media (max-width: $break-sm-max) {
            &[data-width='width-50'],
            &[data-width='width-100'],
            &[data-width='width-infinity'] {
                .rm-module-item {
                    flex-direction: column !important;
                    height: auto !important;
                    min-height: 100%;
                }
                .rm-module-img,
                .rm-module-caption {
                    flex: 0 0 100%;
                    max-width: 100%;
                    position: static;
                }

                .rm-module-img {
                    padding-bottom: 15px;
                }

                .rm-module-buttons {
                    position: absolute;
                    top: 15px;
                    right: 15px;
                    z-index: 2;
                    flex-direction: column !important;

                    button {
                        margin-top: 0;
                        margin-bottom: 8px;
                    }

                    button + button {
                        margin-left: 0;
                    }
                }

                .rm-module-caption {
                    padding-top: 0;
                }
            }

            &[data-width='width-100'] {
                .rm-module-img a {
                    width: 228px;
                    height: 228px;

                    img {
                        max-width: 100%;
                    }
                }

                .rm-module-title {
                    font-size: 16px;
                }

                .rm-module-item {
                    padding-bottom: 60px;
                }

                .rm-module-price,
                .rm-module-price-top {
                    margin-bottom: 0;
                }

                .rm-cart-btn {
                    margin-top: 0;
                }

                .rm-module-price-bottom {
                    flex-direction: row !important;
                    align-items: flex-end;
                }
            }

            &[data-width='width-50'] {
                flex: 0 0 50%;
                max-width: 50%;

                .rm-module-quantity {
                    display: none !important;
                }

                .rm-module-title,
                .rm-module-title a {
                    font-size: 14px;
                    line-height: 20px;
                }
            }

            &[data-width='width-infinity'] {
                flex: 0 0 210px;
                max-width: 210px;
                background: #FDFDFD;
                border: 1px solid #FDFDFD;
                box-sizing: border-box;
                box-shadow: 0px 0px 15px rgba(0, 0, 0, .06);
                border-radius: 6px;
                margin-right: 20px;

                .rm-module-item {
                    box-shadow: none;
                    border-radius: 6px;
                }

                .rm-module-img {
                    border: 0;
                    padding-bottom: 0;
                }

                .rm-module-title {
                    font-size: 12px;
                    line-height: 18px;
                }

                .rm-module-caption {
                    padding: 10px 20px;
                }

                .rm-module-buttons,
                .rm-module-rating,
                .rm-module-quantity,
                .rm-module-stock,
                .rm-category-product-model,
                .rm-cart-btn {
                    display: none !important;
                }
            }
        }
    }

    &-item {
        background-color: #FFFFFF;
        position: relative;
        z-index: 2;
        box-shadow: -0.5px -0.5px 0 0.5px #F9F9FC, inset -1px -1px 0 0 #F9F9FC;
        @media (min-width: $break-md) {
            padding: 30px;

            &:hover {
                .rm-module-quantity {
                    opacity: 1;
                    z-index: 1;
                }
            }
        }
        @media (min-width: $break-xl) {
            &:hover {

                img {
                    opacity: 0.9;
                }

                .rm-module-buttons {
                    opacity: 1;
                }

                .rm-module-title > a,
                .rm-module-title > a:visited {
                    color: $linksColor;
                }

                .rm-cart-btn {
                    background: $primaryColor;
                }

                .rm-btn.secondary .rm-btn-text {
                    color: #FFFFFF;
                }

                .rm-cart-btn-icon {
                    background: #FFFFFF;
                }
            }
        }

        .price-tax {
            color: #828488;
            margin-bottom: 10px;
        }

        @media (max-width: $break-md-max) {
            .rm-btn-text {
                font-size: 13px;
            }
        }
    }

    &-img {
        text-align: center;
        padding: 15px 0 75px;
        border-right: $mainBorder;
        position: relative;
        @media (max-width: $break-sm-max) {
            flex: 0 0 50%;
            max-width: 50%;
        }
        @media (min-width: $break-md) {
            padding: 0;
            border-right: 0;
            position: unset;
        }
        @media (min-width: $break-lg) {
            min-height: 218px;
        }

        a {
            @media (max-width: $break-sm-max) {
                margin: 15px auto;
            }

            img {
                transition: opacity $mainTransition;
                max-width: 110px;
                @media (min-width: $break-xxs) {
                    max-width: 150px;
                }
                @media (min-width: $break-md) {
                    max-width: 100%;
                }
            }
        }
    }

    &-stickers {
        position: absolute;
        top: 15px;
        left: 15px;
        z-index: 2;
        @media (min-width: $break-md) {
            top: 30px;
            left: 30px;
        }

        &-sticker {
            padding: 4px 10px;
            margin-bottom: 10px;
            border-radius: 2px;
            color: #FFFFFF;
            font-size: 12px;
            line-height: 1;
            text-align: center;

            &-stickers_special {
                background-color: #EB5757;
            }

            &-stickers_new {
                background-color: #27AE60;
            }

            &-stickers_featured {
                background-color: $linksColor;
            }
        }
    }

    &-buttons {
        @media (min-width: $break-md) {
            position: absolute;
            top: 15px;
            right: 15px;
            z-index: 2;
        }
        @media (min-width: $break-xl) {
            opacity: 0;
            transition: opacity $mainTransition;
        }

        button {
            width: 30px;
            height: 30px;
            border: 1px solid #E9E9E9;
            margin-top: 10px;
            margin-bottom: 10px;
            border-radius: 15px;
            padding: 0;
            background: #FFFFFF;
            @media (min-width: $break-md) {
                margin-top: 0;
                margin-bottom: 8px;
            }
            @media (min-width: $break-xl) {
                transition: background $mainTransition, border $mainTransition;
            }
            @media (max-width: $break-sm-max) {
                & + button {
                    margin-left: 15px;
                }
            }

            span {
                background: $lightTextColor;
                display: block;
            }

            &:hover {
                background: $linksColor;
                border: 1px solid $linksColor;

                span {
                    background: #FFFFFF;
                }
            }

            &.popup-view span {
                mask: url("../img/sprite.svg#include--popup-view-icon");
                width: 13px;
                height: 13px;
                mask-size: cover;
            }

            &.wishlist span {
                mask: url("../img/sprite.svg#include--wishlist-icon");
                width: 13px;
                height: 13px;
                mask-size: cover;
            }

            &.compare span {
                mask: url("../img/sprite.svg#include--compare-icon");
                width: 13px;
                height: 13px;
                mask-size: cover;
            }
        }
    }

    &-rating {
        @media (min-width: $break-md) {
            margin-top: 20px;
            margin-bottom: 15px;
        }
    }

    &-caption {
        @media (max-width: $break-sm-max) {
            flex: 0 0 50%;
            max-width: 50%;
        }
        padding: 15px;
        @media (min-width: $break-md) {
            padding: 0;
        }
        @media (min-width: $break-md) and (max-width: $break-lg-max) {
            padding-bottom: 59px;
        }
    }

    &-title {
        margin-bottom: 10px;
        font-size: 15px;

        a {
            font-weight: 500;
            line-height: 21px;
            word-break: break-word;
            text-decoration: underline;
            @media (min-width: $break-md) {
                line-height: 24px;
            }
            @media (min-width: $break-lg) {
                line-height: 24px;
                transition: color $mainTransition;
            }

            &:hover {
                text-decoration: none;
            }
        }
    }

    &-stock {
        background: #F4F4F4;
        border-radius: 6px;
        margin-bottom: 10px;
        padding: 0 4px;
        height: 20px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        align-self: flex-start;
        color: #27AE60;
        font-size: 10px;

        &:before {
            content: '';
            width: 6px;
            height: 6px;
            background: url(../img/sprite.svg#include--product-module-stock) no-repeat;
            margin-right: 4px;
        }

        &.rm-out-of-stock {
            color: #FFFFFF;
            background: $redColor;

            &:before {
                display: none;
            }
        }
    }

    &-reviews {
        padding-left: 4px;
        font-size: 11px;

        span {
            margin-left: 2px;
        }

        img {
            display: inline-block !important;
        }
    }

    &-price-old {
        color: $lightTextColor;
        text-decoration: line-through;
        padding-right: 10px;
        @media (max-width: $break-xxs) {
            font-size: 12px;
        }
    }

    &-sticker-discount {
        background: $greenColor;
        border-radius: 4px;
        padding: 0 8px;
        color: #FFFFFF;
        font-size: 10px;
        @media (max-width: $break-xxs) {
            margin-left: auto;
        }
    }

    &-price {
        font-weight: bold;
        font-size: 18px;
        margin-bottom: 10px;

        &-top {
            margin-bottom: 10px;
            @media (min-width: $break-md) {
                margin-bottom: 0;
            }
        }
    }

    .rm-cart-btn {
        padding: 0 10px;
        margin-top: 10px;
        height: 40px;
        line-height: 40px;
        @media (min-width: $break-md) {
            margin-top: 0;
        }

        .rm-btn-text {
            @media (max-width: 370px) {
                display: none;
            }
            @media (min-width: $break-md) {
                display: none;
            }
        }
    }

    &-quantity {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: #FBFBFB;
        height: 60px;
        border-top: $mainBorder;
        padding: 9px 0;
        transition: opacity $mainTransition, z-index $mainTransition;
        @media (min-width: $break-xl) {
            bottom: -59px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
            opacity: 0;
            z-index: -1;
        }

        &-btn {
            border: 0;
            background: transparent;
            display: block;
            height: 100%;
            width: calc(50% - 30px);
            padding: 0;

            &:focus {
                box-shadow: none;
            }

            span {
                width: 14px;
                height: 14px;
                display: block;

                &.minus {
                    background: linear-gradient(#656C7D,#656C7D),linear-gradient(#656C7D,#656C7D);
                    background-position: center;
                    background-size: 100% 1px,0px 100%;
                    background-repeat: no-repeat;
                }

                &.plus {
                    background: linear-gradient(#656C7D,#656C7D),linear-gradient(#656C7D,#656C7D);
                    background-position: center;
                    background-size: 100% 1px,1px 100%;
                    background-repeat: no-repeat;
                }
            }
        }

        input {
            width: 60px;
            padding: 7px 10px;
            text-align: center;
        }
    }
}

.price-tax,
.rm-category-product-model {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 12px;
    color: $lightTextColor;

    span {
        font-weight: 500;
        color: $darkColor;
    }
}

.rm-module-attr {
    margin-bottom: 20px;
    font-size: 11px;
    line-height: 13px;
    color: $lightTextColor;

    &-item {

        &-header {
            color: #333333;
        }

        @media (max-width: $break-xxs) {
            word-break: break-word;
        }

        &:not(:last-child):after {
            content: " / ";
            display: inline-block;
        }
    }
}
