@import '../helpers/helpers';

.products-list-page {

  .sort-products-list {

    &__sort-by {
      @include media-breakpoint-down(sm) {
        margin-bottom: 10px;
      }
    }
  }

  .products-list {
    .card__inner {
      @include media-breakpoint-down(sm) {
        border-bottom: 1px solid $gray;
        margin-bottom: 15px;
        padding-bottom: 0;
      }
    }

    .product-card__price {
      .product-card__price-value {

        @include media-breakpoint-down(sm) {
          position: relative;
        }
      }
    }

    @include media-breakpoint-down(sm) {
      border-top: 1px solid $gray;
      padding-top: 10px;
      margin-bottom: 30px;
    }

    @include media-breakpoint-down(sm) {
      .card {
        margin-bottom: 10px;
      }

      .card__inner {
        @include clearfix;
        display: block;
        padding-bottom: 10px;
      }

      .card__offers {
        right: 50%;
      }

      .card__img-wrap {
        float: left;
        width: 50%;
      }

      .product-card__content {
        float: right;
        width: 50%;
        padding: 0 0 0 15px;
      }

      .product-card__description {
        float: left;
        padding: 20px 15px 0;

        .card_offer_text {
          color: $red;
        }
      }

      .product-card__price {
        float: right;
        width: calc(100% - 15px);
        clear: right;
        margin-bottom: 0;
        text-align: center;

        .product-card__price__old-price,
        .product-card__price__out-of-stock {
          display: inline-block;
          margin-right: 10px;
        }

        .product-card__price-value {
          display: inline-block;
        }

      }

    }
  }

  @include media-breakpoint-down(sm) {
    .products-list {
      .product-card {
        .card__offers {
          top: 10px;
        }

        .card__inner {
          padding-top: 10px;
          padding-bottom: 10px;
          border: 0;
          border-bottom: 1px solid $gray;
          border-top: 1px solid $gray;

          .card__img {
            border-bottom: 0;
          }
        }

        .out-of-stock-container {
          padding-left: 15px;
        }

        .notify-container {
          padding-right: 15px;
        }

        .product-card__price-value {
          padding-left: 0;
        }

        .click-collect-container {
          padding: 10px 15px 0;

          .btn {
            margin: 10px 0;
          }
        }

        .product-card__description {
          width: 50%;
          padding-left: 15px;
        }

        .product-card__price {
          padding-left: 15px;
          width: 50%;
        }
      }

      .product-card__price {

        .product-card__price__out-of-stock {
          margin-right: 0;
          width: 100%;
          text-align: left;
          padding-left: 0;
        }

        .product-card__price__old-price {
          padding-left: 0;
        }
      }
    }

    .product-card__price {

      .product-card__price_sale {
        padding: 0;
      }
    }
  }

  .is-filters-visible {
    @include media-breakpoint-down(sm) {
      position: fixed;
    }
  }
}
