$product-listing-name-color: null !default;
$product-listing-price-color: $dark-grey !default;

.category-products {
    .toolbar {
        > div {
            margin: 0 0 1em 0;
        }

        &-bottom {
            .toolbar {
                > div {
                    margin: 1em 0 1em 0;
                }
                .sorter {
                    display: none;
                }
                .pager {
                    display: block;
                }
            }
        }

        .shop-by {
            display: none;
        }

        .sorter {
            display: flex;

            > div {
                align-self: center;
                box-sizing: border-box;
                width: 49%;
                max-width: 210px;
            }

            .switch,
            amp-accordion {
                height: 40px;
            }
            .switch {
                @include margin-left(auto);
                .current {
                    text-align: center;
                    height: 40px;
                    padding-top: 12px;
                    padding-bottom: 12px;
                }
            }
        }

        .pager {
            display: none;
        }
    }
}

.products-grid,
.products-list {
    @extend %listing;

    + .products-grid {
        margin: -1px 0 1px;
    }

    > .item {
        @extend %listing-item;

        position: relative;
        padding-bottom: 45px;

        .product-image {
            @extend %listing-item-primary;
        }
        .product-info {
            @extend %listing-item-secondary;
        }
    }

    .product-name {
        @extend %listing-item-title;
        a {
            color: $product-listing-name-color;
        }
    }

    .price-box {
        > p.price-from,
        > p.price-to {
            .price-label {
                display: inline-block;
                font-size: 0.6em;
                width: 45px;
                @include margin-right(5px);
            }
        }
    }

    .ratings {
        .amount {
            white-space: nowrap;
            display: none;
        }
    }

    .actions {
        position: absolute;
        bottom: 10px;
        @include left(10px);
        @include right(10px);

        display: flex;
        align-self: center;

        // Don't shrink the button!
        > :first-child {
            flex-shrink: 0;
            margin: 0;
        }
        > :last-child {
            margin-bottom: 0;
        }

    }

    .add-to-links {
        display: flex;
        @include margin-left(auto);
        align-self: inherit;
        li {
            margin: 0;
        }

        .link-compare {
            @include media("<=small") {
                display: none;
            }
        }

        .separator {
            display: none;
        }
    }
}

.products-list {
    > .item {
        margin: -1px 0 0 0;
        width: 100%;
        box-sizing: border-box;
        border-width: 1px 0;
        padding-bottom: 10px;
        display: flex;
        align-self: center;

        .product-image,
        .prolabel-wrapper {
            flex: 0 0 100px;
        }
        .product-shop {
            @include margin-left(10px);
        }
    }
    .product-name {
        a {
            white-space: normal;
        }
    }
    .actions {
        position: static;
        margin: .5em 0;
    }
    .add-to-links {
        @include margin-left(1em);
    }
}
