/* Reset and base styles */
* {
  box-sizing: border-box;
}

body {
  background-color: #121212;
  color: #e0e0e0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 2px solid #fbbf24; /* yellow */
  padding-bottom: 0.5rem;
}

.header-bar h1 {
  font-weight: 700;
  font-size: 1.8rem;
  color: #fbbf24;
}

.back-link {
  color: #fbbf24;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: #fde68a; /* lighter yellow */
  text-decoration: underline;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

#cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 150px;
}

.empty-cart {
  font-size: 1.25rem;
  color: #a3a3a3;
  text-align: center;
  margin-top: 3rem;
}

.cart-item {
  background-color: #1f2937;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  flex-wrap: wrap;
}

.item-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1 1 60%;
  min-width: 250px;
}

.item-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  background: #374151;
  padding: 0.5rem;
}

.item-details {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.item-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fbbf24;
  margin: 0;
}

.item-price,
.item-quantity {
  font-size: 0.9rem;
  color: #d1d5db;
  margin: 0;
}

.remove-btn {
  background-color: #dc2626;
  border: none;
  color: white;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.3s ease;
}

.remove-btn:hover {
  background-color: #b91c1c;
}

.cart-summary {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cart-summary h3 {
  color: #fbbf24;
  margin: 0;
  font-weight: 700;
  font-size: 1.5rem;
}

.checkout-btn {
  background-color: #fbbf24;
  border: none;
  padding: 0.6rem 1.8rem;
  color: black;
  font-weight: 700;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.checkout-btn:hover {
  background-color: #fde68a;
}

@media (max-width: 600px) {
  .cart-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .item-info {
    flex: 1 1 100%;
  }
  .cart-summary {
    justify-content: center;
    gap: 1rem;
  }
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.quantity-control button {
  background-color: #fbbf24;
  border: none;
  color: black;
  font-weight: 700;
  font-size: 1.1rem;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
}

.quantity-control button:hover {
  background-color: #fde68a;
}

.quantity-display {
  min-width: 25px;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  color: #fbbf24;
}

/* Container shadows and rounded corners */
#order-summary, #checkout-form {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  border-radius: 12px;
}

/* Input focus styles */
input:focus {
  outline: none;
  border-color: #fbbf24; /* yellow-400 */
  box-shadow: 0 0 5px #fbbf24;
  background-color: #2d2d2d;
}

/* Form inputs grid for larger screens */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Checkout button styling */
.checkout-btn {
  background-color: #fbbf24;
  color: black;
  font-weight: 700;
  padding: 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.checkout-btn:hover,
.checkout-btn:focus {
  background-color: #f59e0b; /* slightly darker yellow */
  outline: none;
  box-shadow: 0 0 8px #fbbf24;
}

