:root {
  --bg: #f7f5f0;
  --card: #ffffff;
  --text: #1f2328;
  --muted: #6b7280;
  --accent: #2f7d4f;
  --accent-dark: #23603c;
  --border: #e5e2da;
  --danger: #b42318;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--accent); }

header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav {
  max-width: 1000px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo { font-weight: 700; font-size: 1.25rem; text-decoration: none; color: var(--text); }
.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text); font-weight: 500; }
.cart-count {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.8rem;
  margin-left: 4px;
}

main { max-width: 1000px; margin: 0 auto; padding: 24px 16px 60px; }

.hero {
  background: var(--accent);
  color: #fff;
  border-radius: 14px;
  padding: 28px 24px;
  margin-bottom: 28px;
}
.hero h1 { margin: 0 0 6px; }
.hero p { margin: 0; opacity: 0.9; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}

.product { display: flex; flex-direction: column; gap: 6px; }
.product .emoji { font-size: 3.5rem; text-align: center; padding: 10px 0; }
.product h3 { margin: 0; font-size: 1.05rem; }
.product .desc { color: var(--muted); font-size: 0.9rem; flex: 1; }
.price { font-weight: 700; }

button, .btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
button:hover, .btn:hover { background: var(--accent-dark); }
button.secondary { background: #e9e6df; color: var(--text); }
button.secondary:hover { background: #dcd8cf; }
button.link { background: none; color: var(--danger); padding: 4px; font-weight: 500; }

.cart-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.cart-row .emoji { font-size: 2rem; }
.cart-row .name { flex: 1; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { padding: 4px 10px; }

.summary-line { display: flex; justify-content: space-between; margin: 6px 0; }
.summary-line.total { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--border); padding-top: 8px; }

.layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
@media (max-width: 760px) { .layout { grid-template-columns: 1fr; } }

form label { display: block; font-weight: 500; margin: 12px 0 4px; }
input, select, textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.delivery-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-top: 10px;
  cursor: pointer;
  font-weight: 400;
}
.delivery-option input { width: auto; margin-top: 4px; }
.delivery-option small { color: var(--muted); display: block; }

.error { color: var(--danger); font-size: 0.9rem; }
.muted { color: var(--muted); }

.timeline { list-style: none; padding: 0; margin: 20px 0; }
.timeline li {
  position: relative;
  padding: 0 0 22px 32px;
  color: var(--muted);
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 6px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--border);
}
.timeline li::after {
  content: "";
  position: absolute;
  left: 11px; top: 20px; bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--text); }
.timeline li.done::before { background: var(--accent); }
.timeline li.current { font-weight: 700; }

.toast {
  position: fixed;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; }

footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 20px; }
