@import '../helpers/helpers';

.products-list-page {
  .page-header {
    &__title {
      text-transform: none;
    }
  }

  .searched-item {
    display: block;
    font-weight: 700;
  }

  .left-aside {
    position: static;
  }

  .srp-injected {
    &__image {
      margin-bottom: 20px;

      img {
        display: block;
        max-width: 100%;
      }
    }

    &__content {
      font-size: 16px;
      font-weight: 500;
      line-height: 1.5;
      text-align: left;

      p {
        margin: 0;
      }
    }
  }

  .sponsor-top-banner {
    &__picture {
      display: flex;
    }

    &__image {
      display: block;
      max-width: 100%;
    }

    img.sponsor-top-banner__image {
      width: 100%;
    }
  }
}

.products-list {
  display: flex;
  flex-wrap: wrap;
  margin-top: 30px;

  .card__inner {
    .card__descr {
      margin-bottom: 10px;
    }
  }

  .product-card__price {
    position: relative;

    .product-card__price-value {
      bottom: 0;
    }

    &.product-card__price_sale {
      .product-card__price-value {
        bottom: 1px;
      }
    }
  }
}

//sass-lint:disable no-mergeable-selectors
.products-list {
  .product-card {
    .product-card__title {
      font-size: 1rem;
    }

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

      .card__img {
        border-bottom: 1px solid $gray;
      }
    }

    .product-card__extra-info {
      margin: 0;
      width: 100%;
    }

    .out-of-stock-container {
      padding: 10px 0;
      padding-left: 30px;
    }

    .notify-container {
      padding: 10px 0;
      padding-right: 30px;
    }

    .card__offers {
      top: 0;

      & > img {
        @include explicit-img;
      }
    }

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

    &__price {
      display: flex;
      align-items: center;
      text-align: center;
      width: 100%;
      margin: 0;
      flex-direction: column;
      min-height: auto;

      .product-card__price__old-price {
        text-align: left;
        width: 100%;
        margin-right: 0;
        padding-left: 15px;
        padding-bottom: 5px;
      }

      .product-card__price-value {
        width: 100%;
        text-align: left;
        padding-left: 15px;
        padding-bottom: 5px;
      }

      .uom-price {
        margin: 0;
      }

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

  .product-card__description {
    float: left;
    padding: 15px 0 0 15px;
    width: 100%;
    font-weight: 500;
  }

  .card__inner {
    .card__descr {
      line-height: 1.5;
    }
  }

  .trade-pro-card {
    .tradepro-img {
      @include explicit-img;
    }
  }
}

.product-card__price {
  .product-card__price_sale {
    padding: 0 10px;
  }
}

.product-list {
  .card__descr {
    .card_offer_text:empty {
      display: none;
    }
  }
}

@include media-breakpoint-up(lg) {
  .sort-products-list {
    &__section {
      @include make-col(4);
    }

    &__pagination {
      .pagination_tablet {
        display: none;
      }
    }

    .form-row {
      margin-bottom: 0;
    }

    .ddn {
      display: inline-block;
      width: 200px;
    }
  }

  .products-list {
    .card {
      @include make-col(4);
    }
  }
}

@include media-breakpoint-only(md) {
  .products-list-page {
    .left-aside {
      @include make-col(4);
    }

    .content {
      @include make-col(8);
    }

    .banner {
      min-height: 310px;
    }
  }

  .sort-products-list {
    &__section {
      @include make-col(6);
      color: black;
      border: none;

      > .form-row {
        margin-bottom: 0;
      }
    }

    &__pagination {
      margin-top: 20px;

      .pagination {
        &:not(.pagination_tablet) {
          display: none;
        }
      }
    }
  }

  .products-list {
    .card {
      @include make-col(6);
    }
  }
}

@include media-breakpoint-up(md) {
  .sort-products-list {
    .open-filters-btn {
      display: none;
    }
  }

  .products-list {
    @include make-row;

    .product-card__price {
      .product-card__price-value {
        .product-card__price-from {
          float: left;
        }
      }
    }

    .card {
      @include make-col-ready;
    }

    &-page {
      .srp-injected {
        &__content {
          text-align: center;
        }
      }
    }
  }
}

@include media-breakpoint-down(md) {
  .sort-products-list {
    &__pagination {
      @include make-col(12);
      order: 2;
    }
  }

  .is-hidden {
    display: none;
  }
}

@include media-breakpoint-down(sm) {
  .products-list-page {
    .page-header {
      border: 0;
      padding: 0;
    }
  }

  .sort-products-list {
    &__pagination {
      .pagination_tablet {
        display: none;
      }
    }

    &__items-per-page {
      .form-row {
        display: none;
      }
    }
  }

  .filter-results {
    &__actions.filter-results__actions {
      padding: 5px 0;
    }
  }
}
