/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base Styles */
body {
  font-family: 'Poppins', sans-serif;
  background-color: #fdfdfd;
  color: #333;
  padding: 20px;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 20px;
}
header h1 {
  font-size: 2.5rem;
  color: #222;
}

/* Filter Buttons */
.filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.filters button {
  padding: 10px 15px;
  border: none;
  background-color: #eee;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.3s;
}
.filters button.active,
.filters button:hover {
  background-color: #333;
  color: white;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

/* Product Card */
.product-card {
  background-color: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  text-align: center;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}
.product-card h2 {
  margin-bottom: 10px;
}
.product-card p {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 15px;
}
.product-card .view-btn {
  padding: 8px 12px;
  background-color: #222;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.product-card .view-btn:hover {
  background-color: #555;
}

/* Product Image */
.product-card img {
  width: 100%;
  height: 200px;
  border-radius: 10px;
  object-fit: cover;
  margin-bottom: 10px;
}

/* Favorite Button */
.favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 50%;
  padding: 5px 9px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s;
}
.favorite-btn:hover {
  background-color: #ffecec;
  color: red;
  border-color: red;
}
.favorite-btn.active {
  background-color: #fff0f0;
  color: red;
  border-color: red;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}
.modal.hidden {
  display: none;
}
.modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  text-align: center;
}
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #999;
}
.close-btn:hover {
  color: #000;
}
.price {
  font-weight: bold;
  color: #007b00;
  margin-top: 5px;
}
.hidden {
  display: none;
}


/* Footer */
footer {
  margin-top: 50px;
  text-align: center;
  color: #aaa;
  font-size: 0.9rem;
}

/* Responsive (Optional improvement) */
@media (max-width: 500px) {
  header h1 {
    font-size: 1.8rem;
  }
}

