:root {
  --bg: #f6f7f2;
  --panel: #ffffff;
  --ink: #202421;
  --muted: #667268;
  --line: #d9dfd7;
  --accent: #196b5d;
  --danger: #b42318;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 20px 28px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 18px;
}

.topbar p,
.muted {
  color: var(--muted);
}

nav {
  display: flex;
  gap: 14px;
}

nav a {
  color: var(--accent);
  font-weight: 750;
  text-decoration: none;
}

main {
  display: grid;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.band {
  display: grid;
  gap: 18px;
}

.split {
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
}

.section-title,
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.toolbar {
  align-items: center;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 750;
}

input,
select,
button {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font: inherit;
}

input,
select {
  min-width: 180px;
  padding: 0 10px;
  background: #ffffff;
}

button {
  padding: 0 14px;
  background: var(--accent);
  color: #ffffff;
  border-color: transparent;
  font-weight: 800;
  cursor: pointer;
}

button.secondary {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.product {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.product .price {
  font-size: 20px;
  font-weight: 850;
}

.cart-rows,
.summary,
.checkout {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.cart-rows.empty {
  color: var(--muted);
}

.cart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.qty-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.qty-row button {
  width: 32px;
  min-height: 32px;
  padding: 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.summary-row.total {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 20px;
}

.coupon-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.checkbox input {
  min-width: auto;
  min-height: auto;
}

.status {
  min-height: 70px;
  padding: 12px;
  border-radius: 8px;
  background: #f7faf8;
  border: 1px solid var(--line);
}

.status.error {
  color: var(--danger);
  background: #fff4f2;
}

@media (max-width: 900px) {
  .split,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .section-title,
  .toolbar,
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }
}
