*,
*::before,
*::after {
  box-sizing: border-box;
}

.products-page {
  padding: 3rem 5rem;
  min-height: 100vh;
}

.products-container {
  display: flex;
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ----- Left side: FILTERS -----*/

.filters-section {
  flex: 0 0 280px;
}

.search-box {
  margin-bottom: 2rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: Inter, sans-serif;
  font-size: 0.95rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background-color: #fafafa;
}

.search-input:focus {
  outline: none;
  border-color: #ffdd44;
  background-color: #fff;
}

/* Filtering buttons */

.filter-category h3 {
  font-size: 1.1rem;
  font-family: "Playfair Display", sans-serif;
  color: #252525;
  margin-bottom: 1rem;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.filter-btn {
  padding: 0.6rem 1rem;
  font-family: Inter, sans-serif;
  font-size: 0.95rem;
  text-align: left;
  background-color: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: #646464;
}

.filter-btn:hover {
  background-color: #f5f5f5;
  color: #252525;
}

.filter-btn.active {
  background-color: #fffced;
  color: #252525;
  font-weight: 500;
  border: 0.8px solid #d8cfaa;
}

/* ----- Right side: PRODUCTS GRID ----- */

.products-grid {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.product-card {
  flex: 0 0 calc(33.333% - 1.4rem);
  background-color: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

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

.product-info {
  padding: 1.25rem;
}

.product-name {
  font-family: "Playfair Display", sans-serif;
  font-size: 1.25rem;
  color: #252525;
  margin-bottom: 0.5rem;
}

.product-price {
  font-family: Inter, sans-serif;
  font-size: 1.1rem;
  color: #646464;
  font-weight: 500;
}

/* ----- Media Queries -----*/

/* Tablet */
@media (max-width: 1024px) {
  .products-page {
    padding: 3rem 2rem;
  }

  .products-container {
    flex-direction: column;
    flex: 1;
  }

  .filters-section {
    flex: 1;
    width: 100%;
  }

  .product-card {
    flex: 0 0 calc(50% - 1rem);
    /* 2 columns on tablet */
  }
}

/* Mobile */
@media (max-width: 768px) {
  .products-page {
    padding: 2rem 1.5rem;
  }

  .product-card {
    flex: 0 0 100%;
    /* 1 column on mobile */
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .products-page {
    padding: 2rem 1rem;
  }
}
