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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f9f9f9;
  color: #222;
  line-height: 1.6;
  padding: 20px;
}

/* Header */
header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 2rem;
  color: #0057d9;
  margin-bottom: 1rem;
}

header input,
header select {
  padding: 0.5rem;
  font-size: 1rem;
  margin-left: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Grid Layout */
#product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Product Card */
.product-card {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-card img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.product-card h2 {
  font-size: 1.2rem;
  margin: 0.5rem 0;
  color: #333;
}

.product-card p {
  font-size: 0.95rem;
  color: #555;
}

.product-card span {
  display: block;
  font-weight: bold;
  margin: 0.5rem 0;
}

.product-card a {
  display: inline-block;
  background-color: #0057d9;
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  margin-top: 0.5rem;
  transition: background 0.3s;
}

.product-card a:hover {
  background-color: #0041a8;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  header input,
  header select {
    margin: 0.5rem 0 0;
    width: 100%;
  }
}
.product-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
  margin: 12px;
  max-width: 300px;
  text-align: center;
  box-shadow: 0 0 6px rgba(0,0,0,0.1);
}

.product-card img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

#product-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
#product-grid {
  transition: opacity 0.4s ease;
}
