:root {
  --green: #1e7a46;
  --red: #c0392b;
  --bg: #faf7f2;
  --card: #ffffff;
  --text: #2c2c2c;
  --muted: #777;
  --radius: 10px;
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 90px;
}

.site-header {
  background: var(--green);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.site-header h1 { margin: 0; font-size: 1.5rem; letter-spacing: 3px; }
.subtitle { font-size: 0.85rem; opacity: 0.9; }

.status-badge {
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.18);
  padding: 6px 12px;
  border-radius: 999px;
}
.status-badge.closed { background: var(--red); }

.closed-banner {
  background: var(--red);
  color: #fff;
  text-align: center;
  padding: 10px;
  font-weight: 600;
}

.category-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: var(--shadow);
}
.category-nav button {
  flex: 0 0 auto;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}
.category-nav button.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.menu { max-width: 860px; margin: 0 auto; padding: 16px; }

.category-section h2 {
  color: var(--green);
  border-bottom: 2px solid var(--green);
  padding-bottom: 4px;
  margin: 24px 0 12px;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.item-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.item-card.unavailable { opacity: 0.45; }
.item-info h3 { margin: 0 0 4px; font-size: 1rem; }
.item-info p { margin: 0; font-size: 0.85rem; color: var(--muted); }
.item-side { text-align: right; flex-shrink: 0; }
.item-price { font-weight: 700; display: block; margin-bottom: 6px; }
.add-btn {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.add-btn:disabled { background: #bbb; cursor: not-allowed; }
.unavailable-tag { font-size: 0.75rem; color: var(--red); font-weight: 600; }

.cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: transparent;
  display: flex;
  justify-content: center;
  z-index: 10;
}
.cart-open-btn {
  width: 100%;
  max-width: 500px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
}
.cart-count {
  background: #fff;
  color: var(--green);
  border-radius: 999px;
  min-width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 20;
}
.modal-card {
  background: #fff;
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 20px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--muted);
}
.modal-card h2 { margin-top: 4px; }

.option-group { margin: 16px 0; }
.option-group h4 { margin: 0 0 8px; }
.option-group .slots-info { font-size: 0.8rem; color: var(--muted); margin-bottom: 8px; }
.option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.95rem;
}
.option-row .opt-price { margin-left: auto; color: var(--muted); font-size: 0.85rem; }

.modal-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 10px 0;
}
.qty-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: 6px 10px;
}
.qty-picker button {
  border: none;
  background: none;
  font-size: 1.2rem;
  cursor: pointer;
  width: 26px;
}

.primary-btn {
  flex: 1;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 13px 18px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.primary-btn:disabled { background: #bbb; }

.cart-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
}
.cart-line .line-opts { font-size: 0.8rem; color: var(--muted); }
.cart-line-qty { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cart-line-qty button {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 999px;
  width: 26px;
  height: 26px;
  cursor: pointer;
}
.cart-summary { text-align: right; padding: 12px 0; font-size: 1.05rem; }

#checkout-form label { display: block; margin-bottom: 10px; font-size: 0.9rem; }
#checkout-form input, #checkout-form textarea {
  width: 100%;
  padding: 10px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.muted { color: var(--muted); font-size: 0.85rem; }
.error { color: var(--red); font-weight: 600; }
.hidden { display: none !important; }
.confirm { text-align: center; border-radius: 16px; align-self: center; }

@media (min-width: 900px) {
  body { padding-left: 220px; }
  .category-nav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 220px;
    flex-direction: column;
    overflow-y: auto;
    padding-top: 100px;
  }
  .category-nav button { text-align: left; }
  .site-header { padding-left: 240px; }
  .modal { align-items: center; }
  .modal-card { border-radius: 16px; }
}
