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

.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;
}

.reset {
  padding: 0.6rem 1rem;
  font-size: 1rem;
  background-color: #444;
  color: #fff;
  border-radius: 0.2rem;
  border: none;
}

.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: 90%;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding-bottom: 1rem;
}

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

.product-card-img-container {
  overflow: hidden;
  width: 100%;
  border-radius: 1rem;
}

.product-card-img {
  width: 100%;
  display: block; /* Removes tiny bottom whitespace common with inline images */
  transition: transform 0.3s ease-in-out;
}

.product-card-img-container:hover .product-card-img {
  transform: scale(1.05);
}

.product-card-img {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* .product-card-img.sold-out {
  filter: grayscale(100%);
} */

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

.product-info > .product-name {
  font-weight: bolder;
  font-size: 1.3rem;
  color: #000;
  text-align: center;
  transition: all 0.3s ease-in-out;
}

.product-info > .product-name:hover {
  color: #666;
  text-decoration: underline;
}

.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: 1rem;
}

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

.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: #f9f9f9;
  color: #666;
  padding: 0.5rem;
  border-radius: 0.5rem;
  font-weight: 900;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

.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: default;
  filter: none !important;
}
@media (max-width: 1033px) {
  .products-container {
    width: 100%;
  }

  .products-container > .product-card {
    width: 20%;
  }
}

@media (max-width: 768px) {
  .products-container {
    width: 95%;
    justify-content: center;
    gap: 0.5rem;
  }

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

  #controls {
    flex-direction: column;
  }

  #controls > input,
  #controls > select {
    width: 90%;
  }

  .products-container > .product-card {
    width: 47.8%;
    margin-bottom: 1rem;
  }

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

  .product-info > .product-name {
    font-size: 1rem;
  }

  .product-info > .product-price,
  .new-old-price > .product-price,
  .price-old {
    font-size: 1rem;
    text-align: center;
  }

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