.products-list-page {
  .plp-filters {
    margin-left: -15px;
    margin-right: -15px;
  }
}

.plp-filters {
  position: sticky;
  top: 0;
  z-index: $popover-under;

  &__bar {
    &-mobile {
      display: flex;
      border-top: 1px solid $gray;
      border-bottom: 1px solid $gray;
      background: $white;
      transition: all 0.1s ease;
    }

    &-stuck {
      border-top: 0;
      border-bottom: 0;
      box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    }

    .mobile-nav {
      &__item {
        @include make-col(6);
        position: relative;
        display: flex;
        padding: 9px 12px 9px 18px;
        align-items: center;

        &:first-of-type {
          padding: 9px 12px 9px 20px;

          .mobile-nav {
            &__content {
              padding-left: 12px;
            }

            &__icon {
              font-size: 1rem;
            }
          }

          &:after {
            content: '';
            position: absolute;
            right: -1px;
            top: 8px;
            height: calc(100% - 16px);
            border-right: 1px solid $gray;
          }
        }
      }

      &__content {
        padding-left: 13px;
        padding-right: 8px;
      }

      &__icon {
        display: flex;
        align-items: center;
        font-size: 1.125rem;
        color: $blue-ocean-dark;
        transform: translateY(0.5px);
      }

      &__title {
        font-size: 0.875rem;
        font-weight: $headings-font-weight;
        line-height: 1.375rem;
        color: $blue-dark;
      }

      &__info {
        font-size: 0.75rem;
        font-weight: $font-weight-normal;
        line-height: 1rem;
        color: $squant;
      }
    }

    &.plp-filters__bar-desktop {
      position: relative;
      display: none;
    }
  }

  &__group {
    position: relative;

    &:hover {
      .plp-filters__toggle-text,
      .plp-filters__chevron {
        color: $link-hover-color;
      }
    }

    &:active,
    &:focus {
      .plp-filters__toggle-text,
      .plp-filters__chevron {
        color: $blue-darker;
      }
    }

    &.is-open {
      .plp-filters__chevron {
        transform: rotate(180deg);
      }

      > .plp-filters__panel {
        transform: translateY(0);
        pointer-events: auto;
        display: flex;
      }

      .plp-filters__toggle {
        position: relative;
        background: $white;
        box-shadow: 0 0 8px 0 $black-transparent10;
        border-radius: 4px 4px 0 0;
        z-index: 21;

        &::after {
          content: '';
          position: absolute;
          background: $white;
          bottom: -7px;
          left: 0;
          width: 100%;
          height: 12px;
        }
      }
    }
  }

  &__toggle {
    font-weight: 500;
    line-height: 1.375rem;
    border: 0;
    cursor: pointer;
    color: $blue;
    background: none;
    width: 100%;
    padding: 9px 18px;
    display: flex;
    align-items: center;
    justify-content: flex-start;

    &:focus {
      outline: none;
    }

    &:focus-visible {
      outline: 2px solid $blue;
      outline-offset: 2px;
    }
  }

  &__chevron {
    font-size: 0.858rem;
    transition: transform 0.2s ease;
    transform-origin: 50% 50%;
    margin-right: 8px;
  }

  &__panel {
    width: max-content;
    display: none;
    flex-direction: column;
    align-items: center;
    position: absolute;
    background: $white;
    box-shadow: 0 0 8px 0 $black-transparent10;
    padding: 24px;
    z-index: 20;
    border-radius: 4px;

    &--wide {
      width: 100%;
    }

    &--auto {
      width: auto;
    }

    &.Text {
      min-width: 100%;
    }

    hr {
      width: 100%;
      margin: 16px 0;
    }
  }

  &__options {
    display: grid;
    gap: 16px;

    &--cards {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    &--checkboxes {
      align-self: baseline;
      grid-template-columns: 1fr;
    }
  }

  &__badge {
    display: block;
    min-width: 16px;
    height: 16px;
    font-size: 0.75rem;
    margin-left: 4px;

    span {
      display: none;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      background-color: $blue-dark;
      width: 100%;
      height: 100%;
      color: $white;
    }
  }
}

.result {
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 500;
  font-size: 1rem;
  line-height: 24px;
  color: $gray-dark;
  margin: 16px auto;

  .kitchens__found {
    text-align: center;
  }
}

@include media-breakpoint-up(sm) {
  .plp-filters {
    z-index: $filters;

    &__options {
      &--cards {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }
    }
  }
}

@include media-breakpoint-up(md) {
  .plp-filters {
    background: $gray-bg;
    position: relative;

    &__toggle {
      padding: 8px 16px;
    }

    &__bar {
      &-mobile {
        display: none;
      }

      &.plp-filters__bar-desktop {
        display: flex;
        justify-content: space-between;
      }
    }
  }

  .result {
    justify-content: space-between;

    .kitchens__found {
      text-align: left;
    }
  }
}

@include media-breakpoint-up(lg) {
  .plp-filters {
    &__group {
      width: 100%;
    }
  }
}

@include media-breakpoint-up(xl) {
  .plp-filters {
    &__bar {
      display: grid;
      grid-template-columns: repeat(5, 1fr);

      &-mobile {
        display: none;
      }
    }
  }
}
