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

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f7f7f7;
  padding: 2rem;
}

/* Layout container */
.product-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

/* Card styling */
.product-card {
  background-color: white;
  border-radius: 12px;
  width: 280px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  text-align: center;
  transition: transform 0.2s ease;
}

/* Card hover effect */
.product-card:hover {
  transform: translateY(-5px);
}

/* Product image */
.product-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  margin-bottom: 1rem;
}

/* Product title */
.product-card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

/* Product description */
.description {
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

/* Product price */
.price {
  font-size: 1.1rem;
  font-weight: bold;
  color: #111;
  margin-bottom: 1rem;
}

/* 'NEW' badge */
.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #ffeb3b;
  color: #333;
  padding: 5px 10px;
  font-size: 0.75rem;
  border-radius: 8px;
  font-weight: 600;
}

/* Add to Cart button */
.btn {
  background-color: #007bff;
  color: white;
  padding: 0.75rem;
  width: 100%;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  position: relative;
  overflow: hidden;
}

/* Ripple effect on button click */
.btn::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: scale(0);
  pointer-events: none;
  animation: none;
}

.btn:active::after {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  transform: scale(1);
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Fade-in animation for card appearance */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.8s ease-in forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Responsive layout for mobile */
@media (max-width: 768px) {
  .product-list {
    flex-direction: column;
    align-items: center;
  }
}
