:root {
  --bg: #fbfcf8;
  --surface: #fff;
  --soft: #f4f7ef;
  --ink: #132018;
  --text: #26342d;
  --muted: #68746c;
  --accent: #2d6a4f;
  --accent-dark: #143d2b;
  --gold: #c28a32;
  --line: rgba(27, 67, 50, 0.14);
  --shadow: 0 16px 42px rgba(24, 43, 34, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #fff8e8 0, var(--bg) 320px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); line-height: 1.1; }

.site-header,
.site-footer,
.page-shell {
  width: min(1180px, calc(100% - 28px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-dark);
  font-weight: 900;
}

.brand span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  background: var(--accent-dark);
  border-radius: 50%;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  color: var(--muted);
  font-size: .94rem;
  font-weight: 800;
}

.site-nav a:hover { color: var(--accent); }
.site-nav form { margin: 0; }
.link-button {
  min-height: auto;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-weight: 800;
}
.link-button:hover { color: var(--accent); }
.page-shell { padding: 42px 0; }

.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 32px;
  align-items: center;
  min-height: 560px;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(3rem, 7vw, 6.8rem);
  font-weight: 900;
}

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

.hero p {
  max-width: 640px;
  font-size: 1.08rem;
}

.hero img,
.product-detail img {
  width: 100%;
  max-width: 460px;
  filter: drop-shadow(0 28px 42px rgba(24, 43, 34, 0.2));
}

.actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn,
button,
input[type=submit] {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  color: #fff;
  background: var(--accent-dark);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.btn.secondary,
button.secondary {
  color: var(--accent-dark);
  background: #fff;
  border: 1px solid var(--line);
}

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

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.card,
.metric,
.panel,
.product-card {
  padding: 20px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(24, 43, 34, .07);
}

.product-card img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
}

.price {
  color: var(--accent-dark);
  font-size: 1.25rem;
  font-weight: 900;
}

.badge {
  display: inline-flex;
  padding: 5px 9px;
  color: var(--accent-dark);
  background: #fff8e8;
  border: 1px solid rgba(194, 138, 50, .28);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

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

.saved-address-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.saved-address-button {
  justify-content: flex-start;
  text-align: left;
}

.checkout-step-panel {
  display: grid;
  align-content: start;
  gap: 16px;
}

.checkout-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.checkbox-row {
  display: inline-flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.checkbox-row input {
  width: auto;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

textarea { min-height: 100px; }

.validation-summary-errors,
.alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  color: #7a271a;
  background: #fff0ea;
  border: 1px solid #ffd4c2;
  border-radius: 8px;
}

.success {
  color: #175c36;
  background: #eaf8ef;
  border-color: #bee7ca;
}

.site-footer {
  display: flex;
  gap: 16px;
  padding: 28px 0 42px;
  color: var(--muted);
}

@media (max-width: 820px) {
  .site-header,
  .site-footer {
    display: grid;
  }

  .hero,
  .grid,
  .metric-grid,
  .admin-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .checkout-heading-row {
    display: grid;
  }
}
