.categories {
    display: grid;
    justify-content: space-between;
    grid-template-columns: repeat(4, calc(25% - 18px));
    grid-column-gap: 18px;
    margin-bottom: 40px;
}

.category {
    height: 210px;
    background: #FFF no-repeat center center / cover;
    display: flex;
    align-items: flex-end;
    border: 8px solid #FFF;
}

.shampoo{background-image: url(../img/shampoo.jpg);}
.conditioners{background-image: url(../img/Conditioner.jpg);}
.hair-growth{background-image: url(../img/rejuvenator.jpg);}
.keratin{background-image: url(../img/keratin.jpg);}

.category h2 {
    margin: 0 0 20px 16px;
    font-size: 30px;
    color: #FFF;
}

@media only screen and (max-width: 1279px) {
    .categories {
      grid-column-gap: 10px;
      grid-template-columns: repeat(4, calc(25% - 10px));
  }

  .category {
      height: 180px;
      background-size: cover;
  }
}

@media only screen and (max-width: 1019px) {
    .category {
        height: 132px;
    }

    .category h2 {
        font-size: 22px;
        text-align: center;
        margin: 0 0 6px;
        width: 100%;
    }
}

@media only screen and (max-width: 767px) {
    .categories {
        grid-column-gap: 10px;
        grid-row-gap: 10px;
        grid-template-columns: calc(50% - 5px) calc(50% - 5px);
        margin: 15px;
    }
    
    .category {
        border: 1px solid #e2e2e2;
        height: 175px;
    }
}

@media only screen and (max-width: 479px){
    .category {
      height: 110px;
  }

  .category h2 {
    font-size: 16px;
    margin: 10px;
  }
}