/* General body and layout */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(to right, #f8fbff, #f1f4f8);
  color: #333;
  scroll-behavior: smooth;
}

/* Product grid */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  padding: 40px 20px;
  max-width: 1200px;
  margin: auto;
}

/* Product Card */
.card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.8s ease both;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.card-photo {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.card-body {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-names h5 {
  margin: 4px 0;
  font-weight: 600;
  font-size: 16px;
}

.card-brand {
  font-size: 14px;
  color: #777;
}

.card-price {
  margin: 8px 0;
  font-size: 18px;
  font-weight: bold;
  color: #2ecc71;
}

/* Buttons */
.button {
  background-color: #1e88e5;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.button:hover {
  background-color: #1565c0;
  transform: scale(1.05);
}

/* Cart styles */
.cart {
  background: #ffffff;
  max-width: 700px;
  margin: 40px auto;
  padding: 30px;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  animation: fadeIn 1s ease both;
}

.cart h2 {
  font-size: 24px;
  margin-bottom: 16px;
}

.cart-list {
  list-style: none;
  padding: 0;
}

.cart-list li {
  background: #f0f0f0;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 8px;
  font-weight: 500;
  animation: fadeInRight 0.5s ease both;
}

/* Result total */
#result {
  font-size: 20px;
  margin-top: 20px;
  font-weight: bold;
}

/* Pay button */
.pay-button {
  padding: 14px 28px;
  background: #43a047;
  color: white;
  font-size: 16px;
  border: none;
  border-radius: 10px;
  margin-top: 20px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.pay-button:hover {
  background-color: #2e7d32;
  transform: scale(1.05);
}

/* Animations */
@keyframes fadeInUp {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeInRight {
  0% {
    transform: translateX(30px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive optimization */
@media (max-width: 600px) {
  .card-body {
    padding: 12px;
  }

  .card-price {
    font-size: 16px;
  }

  .button {
    padding: 10px;
  }

  .cart {
    margin: 20px;
    padding: 20px;
  }

  .pay-button {
    width: 100%;
    font-size: 14px;
  }
}


/* General body and layout with thick dark animated grey gradient background */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  color: #ddd;  /* lighter text for contrast */
  scroll-behavior: smooth;

  /* Animated Gradient Background with dark greys */
  background: linear-gradient(-45deg, #2f2f2f, #444444, #3a3a3a, #1c1c1c);
  background-size: 400% 400%;
  animation: gradientBG 20s ease infinite;
}

/* Gradient Animation Keyframes */
@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
