.gridlist-toggle {
    @media #{$screen-small} {
        display: none;
    }

    > a {
        display: inline-block;
        font-family: "Porto";
        font-size: 1rem;
        width: 1.2em;
        height: 1.2em;
        line-height: 1;
        text-decoration: none;
        text-align: center;
        vertical-align: middle;
        @include transition($transition);
        &:not(.active) {
            color: #000;
        }
    }

    #grid {
        margin-#{$right}: .25rem
    }

    #grid:before { content: "\e80e" }
    #list:before { content: "\e80f"; }
}

.woocommerce-result-count {
    margin-bottom: 0
}

.woocommerce-ordering,
.woocommerce-viewing {
    select {
        font-size: 1em;
        padding: side-values(0 25px 0 8px);
        box-shadow:none;
        /*-webkit-appearance: none;
        -ms-appearance: none;
        -moz-appearance: none;
        background: #fff url("../images/select-bg.svg") no-repeat scroll;
        @if $rtl == 1 {
            background-position: 4% 48%;
        } @else {
            background-position: 96% 48%;
        }
        background-size: 26px 60px;
        text-indent: 0.01em;
        text-overflow: "";*/
        border: 1px solid #e4e4e4;
        height: 34px;
        border-radius: 0;
    }
}

.woocommerce-ordering select {
    width: 160px;
}

.woocommerce-viewing {
    display:inline-block;
    vertical-align: top;
}

.woocommerce-pagination {
    position: relative;
    text-align: $right;

    ul {
        display: inline-block;
        white-space: nowrap;
        padding: 0;
        margin: side-values(0 0 0 10px);
        clear: both;

        li {
            float: $left;
            margin-#{$left}: 5px;
            display: inline;
            padding: 0;

            a,
            span {
                //border: 1px solid $input-border-color;
                border: 1px solid #ccc;
                border-radius: 0;
                color: #7b858a;
                display: block;
                font-size: 15px;
                font-weight: 700;
                margin: 0 0 5px;
                padding: 0 .5em;
                line-height: 2.1em;
                min-width: 2.2em;
                height: 2.2em;
                text-decoration: none;
                text-align: center;
            }

            span.dots {
                border-width: 0;
                min-width: 0;
                padding: 0;
            }

            a:hover,
            a:focus,
            span.current {
                //color: $color-arrow-hover;
                color: #706f6c;
            }

            .prev,
            .next {
                text-indent: -9999px;
                //width: 2.2em;
                position: relative;
                /*height: 32px;
                line-height: 32px;
                width: 32px;*/
                padding: 0;
                &:before {
                    font-family: "porto";
                    font-size: 20px;
                    font-weight: normal;
                    line-height: 30px;
                    position: absolute;
                    top: 0;
                    left: 0;
                    right: 0;
                    text-indent: 0;
                }
            }

            .prev:before {
                //content: if-ltr($fa-var-caret-left, $fa-var-caret-right);
                content: if-ltr('\e819', '\e81a');
            }

            .next:before {
                //content: if-ltr($fa-var-caret-right, $fa-var-caret-left);
                content: if-ltr('\e81a', '\e819');
            }
        }
    }

    &.load-more {
        float: none;
        &:not(.d-none) {
            display: block !important;
        }
        .woocommerce-viewing {
            display: none;
        }
        > .page-numbers {
            float: none;
            display: block;
            width: 100%;
            margin: 0 0 11px;
        }
        ul li {
            float: none;
            display: block;
            margin-#{$left}: 0;
        }
    }
}

.shop-loop-before,
.shop-loop-after {
    font-size: 13px;

    label {
        margin: side-values(0 7px 0 0);
        vertical-align: middle;
        @media #{$screen-small} {
            display: none;
        }
    }
}

.shop-loop-before {
    display: -webkit-flex; display: flex;
    -webkit-align-items: center; align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
    margin-#{$right}: -10px;

    > * {
        margin: side-values(0 10px 10px 0);
    }
    p {
        font-size: inherit
    }
    &.sticky {
        position: fixed !important;
        z-index: 999;
        #{$left}: 0;
        width: 100%;
        padding-top: 10px;
        padding-bottom: 0;
        border-bottom: 1px solid #e7e7e7;
        transition: $left .3s;
    }
    .page-numbers {
        display: none;
    }

    .woocommerce-ordering {
        margin-#{$right}: auto;
    }

    .woocommerce-pagination {
        &:empty {
            display: none
        }
        ul {
            @media #{$screen-normal} {
                margin-#{$left}: -5px;
            }
        }
    }

    @media #{$screen-normal} {
        background: #f4f4f4;
        padding: side-values(10px 2px 0 12px);
        margin-#{$right}: 0;
        .woocommerce-result-count {
            display: none
        }
    }
}

.filter-sidebar-opened .shop-loop-before.sticky {
    position: static !important;
    z-index: auto;
}

.sidebar-opened,
.panel-opened {
    .shop-loop-before.sticky {
        #{$left}: 260px;
    }
}

.shop-loop-after {
    text-align: center;
    border-top: 1px solid #e7e7e7;
    padding-top: 25px;
    .woocommerce-pagination {
        text-align: center;

        > * {
            margin-bottom: 15px;
        }
    }
    
    .woocommerce-viewing {
        float: $left;
    }
    
    .page-numbers {
        clear: none;
        float: $right;
    }
    &.load-more-wrap {
        padding-top: 0;
        border-top: none;
    }
}


a.porto-product-filters-toggle {
    -webkit-align-items: center; align-items: center;
    height: 36px;
    background: #fff;
    padding: side-values(0 10px 0 3px);
    text-transform: uppercase;
    color: inherit;
    border: 1px solid #e7e7e7;
    svg {
        fill: #fff;
        width: 28px;
    }
    &:hover, &:focus {
        text-decoration: none;
        color: inherit;
    }
}

@media #{$screen-normal} {
    .shop-loop-before {
        font-size: 11px;
        letter-spacing: -.025em;
        font-weight: 600;
        select {
            text-transform: uppercase;
            height: 36px;
            max-width: 140px;
            letter-spacing: inherit;
            font-weight: inherit;
            color: inherit;
        }
        label {
            font-weight: inherit;
        }
        .woocommerce-ordering, .woocommerce-pagination {
            font-size: 1em
        }
    }
}