:root {
  --bg: #f7f8f8;
  --surface: #ffffff;
  --text: #1b1b1b;
  --muted: #5e6d7e;
  --primary: #0f9d58;
  --danger: #c0392b;
  --border: #e2e2e2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 1rem auto 2rem;
  display: grid;
  gap: 1rem;
}

.hero {
  background: linear-gradient(135deg, #222, #0f9d58);
  color: #fff;
  border-radius: 12px;
  padding: 1.4rem;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  letter-spacing: 0.02em;
}

.hero p {
  margin: 0.5rem 0 0;
  color: #e8f8f2;
}

section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
}

h2 {
  margin: 0 0 0.8rem;
  color: var(--text);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
}

.menu-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.menu-card .price {
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.btn {
  border: 0;
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.95;
}

.btn-secondary {
  background: #e7f4f0;
  color: var(--text);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.cart-empty {
  color: var(--muted);
  font-style: italic;
  margin: 0.4rem 0;
}

.cart-items {
  display: grid;
  gap: 0.8rem;
}

.cart-item {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 0.7rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.6rem;
}

.cart-item-info {
  min-width: 0;
}

.cart-item h3 {
  margin: 0;
  font-size: 1rem;
}

.qty-control {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}

.qty-control button {
  width: 30px;
  height: 30px;
  border-radius: 6px;
}

.cart-total {
  margin-top: 0.8rem;
  font-weight: 700;
  font-size: 1.15rem;
}

.checkout-section .form-group {
  margin-bottom: 0.75rem;
}

.checkout-section label {
  display: block;
  margin-bottom: 0.35rem;
  color: #334054;
}

.checkout-section input,
.checkout-section select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
  font-size: 1rem;
}

.required {
  color: var(--danger);
}

@media (min-width: 900px) {
  .container {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }

  .hero {
    grid-column: 1 / -1;
  }

  .checkout-section {
    position: sticky;
    top: 1rem;
  }
}

@media (max-width: 680px) {
  .menu-card {
    min-height: 145px;
  }

  .cart-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .cart-item-actions {
    justify-self: flex-start;
  }
}
