.products {
  padding: 0 0px;
  display: flex;
  gap: 60px;
}

.product-search {
  max-width: 520px;
  margin: 0 0 24px;
}

.product-search label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.product-search-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-search input {
  box-sizing: border-box;
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font: inherit;
}

.product-search a {
  color: #333;
}

.product-card {
  background: #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  width: 270px;
  height: 370px;
  text-align: center;
  font-family: roboto, sans-serif;
}

.product-card .product-price {
  font-weight: bold;
}

.product-name {
  margin: initial 6px;
  overflow-wrap: anywhere;
}

.product-card .product-name:hover {
  text-decoration: underline;
}

article.product-card img {
  height: 270px;
  width: 270px;
}

/* Limited products: show a limited number of product items per screen size
   - default (mobile): show 2
   - >=1050px: show 3
   - >=1400px: show 4
*/

.limited-products {
  display: grid;
  gap: 50px;
  grid-template-columns: repeat(3, 0fr);
  justify-content: center;
}

.limited-products > *:nth-child(n+3) {
  display: none;
}
.limited-products .more-card {
  display: flex;
  font-size: xx-large;
  align-items: center;
}
.more-card a {
  width: 100%;
  margin-bottom: 32px;
}

@media (max-width: 1050px) {
  .products {
    display: grid;
  }

  .limited-products, .products {
    grid-template-columns: repeat(2, 0fr);
  }
  .limited-products > *:nth-child(3) {
    display: block;
  }
}

@media (max-width: 670px) {
  .limited-products, .products {
    width: 100%;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .limited-products .product-card, .products .product-card {
    width: 100%;
    height: auto;
    min-width: 0;
  }

  .limited-products article.product-card img, .products .product-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
  }
}

@media (min-width: 1400px) {
  .limited-products, .products {
    grid-template-columns: repeat(4, 0fr);
  }
  .limited-products > *:nth-child(3) {
    display: block;
  }
}