/* === Global Styles === */
body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f6fa;
  color: #333;
}

/* Header */
h1 {
  background: #2c3e50;
  color: white;
  padding: 20px;
  margin: 0 auto;
  text-align: center;
}

/* Product Grid */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: auto;
}

/* Product Card */
.product {
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

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

/* Product Title */
.product h3 {
  font-size: 1.1rem;
  margin: 10px 0;
  min-height: 44px; /* keeps cards equal height */
}

/* Price */
.product p.price {
  font-weight: bold;
  font-size: 1.1rem;
  color: #27ae60;
  margin: 5px 0;
}

/* Rating stars */
.product p.rating {
  color: #f39c12;
  font-size: 0.9rem;
}

/* Category */
.product p.category {
  font-size: 0.85rem;
  color: #555;
}

/* Links / Buttons */
.product a {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  text-decoration: none;
  background: #3498db;
  color: white;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}

.product a:hover {
  background: #2980b9;
}

/* === Responsive === */
@media (max-width: 500px) {
  .product img {
    height: 150px;
  }
}