body {
  font-family: Arial, sans-serif;
  padding: 20px;
  background-color: #f5f5f5;
  text-align: center;
}

h1, h2 {
  text-align: center;
}

#product-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin: 20px 0;
}

.product {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  max-width: 300px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background-color: #fff;
  display: block;
  margin-bottom: 10px;
}

/* Quantity buttons */
.qty-container, .cart-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin: 10px 0;
}

.qty-btn {
  background-color: #4CAF50;
  border: none;
  color: white;
  font-size: 1.4rem;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  line-height: 0.6;
}

.qty-btn:hover {
  background-color: #45a049;
}

.qty-container input[type=number],
.cart-controls input[type=number] {
  width: 30px;
  font-size: 1rem;
  padding: 6px 0;
  text-align: center;
  border-radius: 6px;
  border: 1px solid #ccc;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

.qty-container input[type=number]::-webkit-inner-spin-button,
.qty-container input[type=number]::-webkit-outer-spin-button,
.cart-controls input[type=number]::-webkit-inner-spin-button,
.cart-controls input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Cart section */
#cart-items {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.cart-item {
  margin-bottom: 20px;
}

.cart-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.remove-btn {
  background-color: #f44336;
  color: white;
  border: none;
  padding: 8px 10px;
  font-size: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 10px;
}

.remove-btn:hover {
  background-color: #d32f2f;
}

.cart-subtotal {
  font-size: 1rem;
  margin-top: 6px;
  text-align: right;
  font-size: 0.8rem;
}

/* Checkout form */
.checkout-form {
  max-width: 400px;
  margin: 0 auto 40px;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.checkout-form input,
.checkout-form button {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

.checkout-form button {
  background-color: #4CAF50;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.2rem;
}

.checkout-form button:hover {
  background-color: #45a049;
}

/* Responsive */
@media (max-width: 600px) {
  body {
    padding: 5px;
  }

  .product {
    max-width: 100%;
  }

  #cart-items {
    max-width: 100%;
    padding: 15px;
  }

  .checkout-form {
    max-width: 100%;
  }

  .cart-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-controls {
    flex-wrap: wrap;
  }

  .cart-subtotal {
    text-align: left;
  }
}



#cart-items .qty-btn {
  width: 28px;
  height: 28px;
  font-size: 1rem;
}

/* Smaller remove button inside cart */
#cart-items .remove-btn {
  padding: 5px 8px;
  font-size: 0.8rem;
}
