/* Background image */

.top-img {
  position: relative;
  background-image: url(../../img/bac.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  height: 100vh;
}

@media (width < 1000px) {
  div.top-img {
    background-position: left;
  }
}

/* Text on image */

section.content {
  font-size: 2rem;
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  margin-left: 10%;

  & .lifestyle {
    text-transform: uppercase;
    font-size: 1.7rem;
  }

  & .men {
    margin-top: 0.7rem;
    font-weight: bold;
  }

  & .sale {
    margin-block: 0.5rem;
    font-weight: bold;
  }

  & .sale span {
    color: crimson;
    margin-left: 0.8rem;
  }

  & .free-shipping {
    font-size: 1.5rem;
  }

  & button {
    background-color: black;
    color: white;
    margin-top: 0.9rem;
    font-size: 0.9rem;
    border-radius: 5px;
    padding: 0.6rem 1.6rem;
  }
}


/* main contents (products) */

main h1.recommended{
    margin: 2.3rem 0 2rem 2%
}

.recommendation-note{
  margin: -1.2rem 0 1.2rem 2%;
  color: #687386;
  font-size: 0.9rem;
}

.product-tools{
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin: 0 2% 1.5rem;
}

.search-field,
.filter-field{
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0 0.8rem;
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 6px;
}

.search-field:focus-within,
.filter-field:focus-within{
  border-color: var(--blue-button);
  box-shadow: 0 0 0 2px #1976d226;
}

.search-field{
  flex: 1 1 280px;
}

.search-field .fa-solid{
  color: #687386;
}

.search-field input,
.filter-field select{
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--bodyFont);
  font: inherit;
}

.filter-field select{
  cursor: pointer;
}

.product-count{
  flex: 0 0 100%;
  color: #687386;
  font-size: 0.85rem;
}

.visually-hidden{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (width < 550px) {

    main h1.recommended{
        width: 100%;
        margin: 2.3rem 0 2rem 0;
        font-size: 1.4rem;
       }

   }

main section.products.flex {
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem 1.4rem;

  & article.card {
    position: relative;
    border-radius: 5px;
    box-shadow:
     rgba(0, 0, 0, 0.2) 0px 2px 1px -1px,
     rgba(0, 0, 0, 0.14) 0px 1px 1px 0px,
     rgba(0, 0, 0, 0.12) 0px 1px 3px 0px;
     transition: 0.2s;
  }

  & article.card:hover{
    scale: 1.01;
  }

  & img{
    border-radius: 5px 5px 0 0;
  }

  & .card .content{
    background-color: #fff;
    border-radius: 0 0 5px 5px;
  }

  & .card .content .title{
    padding-top: 0.7rem;
    padding-inline: 0.4rem;
    text-transform: capitalize;
}

& .card .content .description{
    padding-inline: 0.4rem;
    font-size: 0.8rem;
    margin-top: 0.4rem;
    margin-bottom: 0.6rem;
    line-height: 1.1rem;
}

& .card .content .price{
    margin-left: 0.88rem;
    font-size: 0.9rem;
    color: rgb(199, 0, 40);
    font-weight: bold;
}

& .add-to-cart{
    margin-right: 0.88rem;
    background-color: var(--blue-button);
    color: #fff;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 0.7rem;
    gap: 0.33rem;
}

& .fa-solid{
    color: white;
}

}

.favorite-button{
position: absolute;
z-index: 1;
top: 0.65rem;
right: 0.65rem;
width: 38px;
height: 38px;
display: grid;
place-items: center;
border-radius: 50%;
background: #fff;
box-shadow: 0 2px 8px #0002;
}

.favorite-button .fa-solid{
color: #687386;
}

.favorite-button[aria-pressed="true"] .fa-solid{
color: #ca4d4d;
}

.no-products{
width: 100%;
padding: 2rem 1rem;
color: #687386;
text-align: center;
}

@media (width < 550px){
.recommendation-note,
.product-tools{
  margin-inline: 1rem;
}
}
