.category {
  &__wrap {
    display: flex;
  }
  &__left {
    position: sticky;
    top: 0;
    height: max-content;
  }
  &__right {
    flex-grow: 1;
    padding-left: 8%;
    position: relative;
    &__banner {
      height: 200px;
      width: 100%;
      img {
        height: 100%;
        width: 100%;
        object-fit: cover;
      }
    }
    &__subcategories {
      flex: 1;
      max-width: 50%;
      border: 1px solid #ccc;
      height: 200px;
      margin-right: 24px;
      &:last-child {
        margin: 0;
      }
    }
    &__tab {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid $gray-400;
      &__sort {
        display: flex;
        align-items: center;
      }
    }
    &__list {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
      //modify
      .product-box {
        &__img__wrap {
          height: 180px;
          margin-bottom: 10px;
        }
        .btn--primary {
          padding: 8px 16px;
        }
      }
    }
  }
}

.category__wrap__wide {
  .category__right__list {
    grid-template-columns: repeat(5, 1fr);
  }
}

//media
@media (max-width: 1600px) {
  .category {
    &__right {
      padding-left: 16px;
    }
  }
}

@media (max-width: 1200px) {
  .category {
    &__right__list {
      grid-template-columns: repeat(3, 1fr);
    }
  }
  .category__wrap__wide {
    .category__right__list {
      grid-template-columns: repeat(4, 1fr);
    }
  }
  .category__left .filter-table {
    width: 230px;
  }
}

@media (max-width: 1000px) {
  .category {
    &__right__list {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  .category__right__tab {
    align-items: flex-end;
  }
  .category__right__tab__sort {
    align-items: flex-end;
  }
  .category__wrap__wide {
    .category__right__list {
      grid-template-columns: repeat(3, 1fr);
    }
  }
  .category__right__banner {
    height: 160px;
    margin: 12px 0;
  }
}

@media (max-width: 800px) {
  .category {
    &__wrap {
      flex-direction: column;
    }
    &__left {
      position: relative;
      .filter-table {
        width: 100%;
      }
    }
    &__right {
      padding-left: 0%;
      &__banner {
        display: none;
      }
    }
  }
  .category__wrap__wide {
    .category__right__list {
      grid-template-columns: repeat(2, 1fr);
    }
  }

}

@media (max-width: 500px) {
  .category {
    &__right__tab {
      flex-direction: column;
      align-items: flex-start;
    }
  }
  .category__right__list .product-box__img__wrap {
    height: 115px;
  }
}

@media (max-width: 600px) {
  .category__right__tab__sort {
    width: 100%;
    justify-content: space-between;
  }
}
