:root {
  --ink: #1f2430;
  --muted: #5e6573;
  --paper: rgba(255, 250, 244, 0.92);
  --panel: rgba(255, 255, 255, 0.88);
  --line: rgba(31, 36, 48, 0.12);
  --accent: #a54f2b;
  --accent-dark: #7d3415;
  --accent-soft: #f2d7c8;
  --success: #316b50;
  --shadow: 0 20px 45px rgba(27, 31, 38, 0.12);
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --font-body: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(236, 188, 162, 0.45), transparent 32%),
    radial-gradient(circle at bottom right, rgba(110, 162, 150, 0.25), transparent 25%),
    linear-gradient(135deg, #f4ecdf 0%, #f7f3ec 45%, #ece5db 100%);
}

.backdrop {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.28), transparent 72%);
  pointer-events: none;
}

.layout {
  position: relative;
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.hero,
.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero {
  padding: 32px;
  background:
    linear-gradient(120deg, rgba(165, 79, 43, 0.08), rgba(255, 255, 255, 0.5)),
    var(--paper);
}

.eyebrow,
.label {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
}

h1 {
  margin-top: 12px;
  font-size: clamp(2.2rem, 3.4vw, 4.3rem);
  line-height: 0.95;
  max-width: 12ch;
}

.intro {
  max-width: 70ch;
  line-height: 1.6;
  color: var(--muted);
}

.hero-actions,
.inline-fields,
.content,
.section-header,
.product-footer,
.totals,
.status-grid {
  display: flex;
  gap: 16px;
}

.hero-actions,
.section-header,
.totals {
  justify-content: space-between;
  align-items: center;
}

.content {
  margin-top: 24px;
  align-items: flex-start;
}

.content > .panel {
  flex: 1;
}

.status-panel {
  margin-top: 24px;
  padding: 24px 28px;
}

.status-grid {
  margin-top: 18px;
  flex-wrap: wrap;
}

.status-grid article {
  flex: 1 1 210px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(31, 36, 48, 0.08);
}

.panel {
  padding: 24px;
}

.muted {
  color: var(--muted);
}

.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.product-card,
.summary-card,
.cart-line {
  border-radius: 18px;
  border: 1px solid rgba(31, 36, 48, 0.08);
  background: rgba(255, 255, 255, 0.64);
}

.product-card {
  padding: 18px;
  display: grid;
  gap: 16px;
  min-height: 220px;
}

.product-description {
  color: var(--muted);
  line-height: 1.55;
}

.product-price {
  font-size: 1.1rem;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.hidden {
  display: none;
}

.button-primary {
  background: var(--accent);
  color: #fff9f3;
  box-shadow: 0 10px 18px rgba(165, 79, 43, 0.26);
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-secondary {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.cart-lines {
  display: grid;
  gap: 14px;
}

.cart-line {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.empty-state {
  padding: 22px;
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  border: 1px dashed rgba(31, 36, 48, 0.16);
}

.summary-card {
  margin-top: 12px;
  padding: 18px;
  white-space: pre-wrap;
  line-height: 1.5;
}

.field {
  display: grid;
  gap: 8px;
  flex: 1;
  margin-top: 16px;
}

.field input,
.field textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 14px 16px;
  font: inherit;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.code-block {
  margin: 18px 0 0;
  min-height: 120px;
  padding: 16px;
  border-radius: 18px;
  background: #1e1e1a;
  color: #f7f2e7;
  overflow: auto;
}

code {
  font-family: "SFMono-Regular", "Menlo", monospace;
}

@media (max-width: 920px) {
  .content {
    flex-direction: column;
  }

  .hero-actions,
  .section-header,
  .inline-fields,
  .totals,
  .product-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .layout {
    width: min(100vw - 20px, 1200px);
    padding-top: 20px;
  }
}
