:root {
  --motif-color: rgb(58, 193, 255);
  --line: rgb(34, 34, 34);
  --card-bg: rgb(239, 239, 240);
}

.search-header h1 {
  font-size: 3rem;
}

.container,
#product-filter {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.container > #product-filter {
  margin-top: 10rem;
}

#controls > select {
  font-family: "Quicksand", sans-serif;
}

.product-filter-title {
  font-weight: 900;
  font-size: 2rem;
}

.search-header {
  text-align: center;
}

.search-query-display {
  font-size: 1.3rem;
  color: #888;
}

.products-container {
  display: flex;
  width: 70%;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding-bottom: 1rem;
}

.products-container > .product-card {
  display: flex;
  flex-direction: column;
  background-color: var(--card-bg);
  /* border: 1px solid var(--line); */
  padding: 1rem;
  gap: 1rem;
  width: 30%;
  position: relative;
  border-radius: 0.4rem;
}

.product-card-img {
  border-radius: 0.4rem;
  width: 100%;
}

.product-card > .product-info {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  gap: 0.5rem;
  font-family: "Quicksand", sans-serif;
}

.product-info > .product-name {
  font-weight: bolder;
  font-size: 1.3rem;
}

.product-info > .product-category {
  text-transform: uppercase;
  color: #676666;
  font-size: 0.8rem;
}

.product-info > .product-description {
  color: #676666;
  white-space: pre-line;
}

.product-info > .product-price,
.new-old-price > .product-price {
  font-weight: 100;
  font-size: 1.2rem;
  font-family: Arial, sans-serif;
}

.new-old-price {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.price-old {
  color: #555;
  font-size: 0.8rem;
}

.pct-badge {
  background-color: rgb(255, 60, 60);
  padding: 0.5rem;
  border-radius: 0.5rem;
  font-weight: 900;
  color: #fff;
  position: absolute;
  top: 1.3rem;
  right: 1.3rem;
}

.product-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.product-links > a,
.product-links > div {
  width: 100%;
  padding: 0.5rem;
  font-size: 1.1rem;
  text-align: center;
  cursor: pointer;
  border-radius: 0.2rem;
  transition: all 0.3s ease-in-out;
}

.add-to-cart {
  background-color: rgb(58, 193, 255);
  color: #fff;
}

.out-of-stock {
  background-color: #bfbdbd;
  color: #666;
}

.learn-more-text {
  color: #fff;
  cursor: pointer;
  background-color: #444;
}

.product-links > a:hover,
.product-links > div:hover {
  filter: brightness(85%);
}

.out-of-stock:hover {
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .products-container {
    width: 90%;
  }

  .container > #product-filter {
    margin-top: 6rem;
  }

  #controls {
    flex-direction: column;
  }

  #controls > input,
  #controls > select {
    width: 90%;
  }
  .products-container > .product-card {
    width: 100%;
  }

  .product-card-img {
    max-width: 100%;
  }

  .search-header h1 {
    font-size: 2rem;
  }
}
