@import url("/styles/selector.css");

.product-section {
  padding-left: 2.75rem;
  padding-right: 2.75rem;
  padding-bottom: 8rem;
}

.category {
  margin: 4rem auto 0;
}

.category__image {
  width: 100%;
  max-width: 450px;
  display: block;
  aspect-ratio: 320 / 172;
  object-fit: cover;
  background-color: #707070;
  margin: 0 auto 2rem;
}

.category__text {
  max-width: 600px;
  margin: 0 auto;
  white-space: pre-line;
}

.products {
  margin: 4rem auto 0;
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 2.4rem;
  row-gap: 6rem;
  justify-content: center;
  max-width: 1128px;
}

@media (min-width: 550px) {
  .products {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .products {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.product {
  width: 100%;
}

.product__image {
  width: 100%;
  aspect-ratio: 320 / 180;
  background-color: #707070;
  object-fit: cover;
}

.product__title {
  margin: 1rem 0;
  font-size: 1.8rem;
  line-height: 2.6rem;
}

.product__link {
  width: 100%;
  max-width: 320px;
  height: 50px;
  border-radius: 25px;
  background-color: #2d4074;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.6rem;
  font-weight: 500;
  margin: 1rem auto 0;
}

.products:has(.no-posts) {
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (min-width: 768px) {
  .product-section {
    padding-bottom: 16rem;
  }

  .dropdown-list .nav-item {
    width: min(26.4rem, 18.9vw);
    width: clamp(16rem, 18.9vw, 26.4rem);
  }

  .category {
    margin: 5.4rem auto 0;
    max-width: 744px;
  }

  .category__image {
    width: 100%;
    max-width: 744px;
    display: block;
    aspect-ratio: 744 / 400;
    object-fit: cover;
    background-color: #707070;
    margin: 0 auto 3.2rem;
  }

  .category__text {
    max-width: none;
    margin: 0 auto;
  }

  .products {
    margin: 6rem auto 0;
    row-gap: 8rem;
  }

  .product__title {
    margin: 0.8rem 0;
    font-size: 2rem;
    line-height: 1.45;
  }

  .product__link {
    margin: 3rem auto 0;
  }

  .dropdown-list {
    max-width: 1128px;
  }
}
