:root {
  color-scheme: light;
  --background: #fffcf9;
  --surface: #ffffff;
  --text: #141413;
  --muted: #5c5b58;
  --line: #e3e0dc;
  --accent: #52556f;
  --accent-hover: #41445d;
  --gold: #9c7c12;
  --danger: #a22e2e;
  --success: #1d6845;
  font-family: "Geist", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-size: 15px;
  line-height: 1.5;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: 68px;
  padding: 10px clamp(16px, 5vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 252, 249, 0.96);
}

.wordmark {
  width: 121px;
  height: 28px;
  justify-self: center;
  object-fit: contain;
}

.icon-button,
.account-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.icon-button {
  font-size: 29px;
}

.account-button {
  justify-self: end;
  border-color: var(--line);
  font-size: 12px;
  font-weight: 600;
}

.page-shell {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 40px) 52px;
}

.eyebrow {
  margin: 0 0 24px;
  font-size: 18px;
  font-weight: 400;
  text-transform: uppercase;
}

.checkout-layout {
  display: grid;
  gap: 28px;
}

.cart-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.cart-item img {
  width: 93px;
  height: 93px;
  border-radius: 4px;
  object-fit: cover;
}

.item-name,
.summary-label,
.section-label {
  font-weight: 600;
}

.item-name,
.item-variant,
.item-description,
.item-price {
  margin: 0;
}

.item-variant {
  margin-top: 2px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
}

.item-description {
  margin-top: 6px;
  font-size: 14px;
}

.item-price {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.quantity-row {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  font-size: 13px;
}

.quantity-button {
  border: 0;
  background: transparent;
  cursor: default;
}

.text-action {
  border: 0;
  color: var(--muted);
  background: transparent;
  text-decoration: underline;
}

.summary-panel,
.confirmation-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.summary-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.summary-row:last-child {
  border-bottom: 0;
}

.summary-value {
  font-weight: 600;
}

.summary-detail {
  grid-column: 1 / -1;
  margin-top: 3px;
}

.edit-link {
  color: var(--gold);
  text-decoration: none;
}

.payment-panel {
  align-self: start;
  padding: 22px;
  border-top: 3px solid var(--accent);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(20, 20, 19, 0.08);
}

.payment-card {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 16px 0 22px;
}

.payment-card img {
  width: 80px;
  height: 51px;
  border-radius: 4px;
  object-fit: cover;
}

.payment-card p {
  margin: 0;
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
}

.primary-button {
  border: 1px solid var(--accent);
  color: white;
  background: var(--accent);
}

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

.primary-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.secondary-button {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.status-line {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.status-line[data-kind="error"] {
  color: var(--danger);
}

.simulation-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border: 1px solid #b8d8c8;
  border-radius: 4px;
  color: var(--success);
  background: #f1faf5;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.map-figure {
  position: relative;
  height: 179px;
  margin: 0;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
}

.map-figure > img {
  width: 100%;
  height: 179px;
  object-fit: cover;
}

.map-label {
  position: absolute;
  top: 44px;
  left: 50%;
  width: 154px;
  padding: 8px;
  transform: translateX(-50%);
  border-radius: 8px;
  background: white;
  box-shadow: 0 4px 8px rgba(20, 20, 19, 0.2);
  font-size: 11px;
  text-align: center;
}

.confirmation-copy {
  padding: 16px;
  border-top: 1px solid var(--line);
}

.confirmation-copy h1,
.confirmation-copy p {
  margin: 0;
}

.confirmation-copy h1 {
  font-size: 16px;
}

.confirmation-copy p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}

.order-details {
  display: grid;
  gap: 18px;
  padding: 20px 16px;
}

.order-details h2,
.order-details p {
  margin: 0;
}

.order-details h2 {
  font-size: 18px;
  font-weight: 400;
  text-transform: uppercase;
}

.order-details .section-label {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 14px;
}

.debug-panel {
  margin-top: 24px;
  padding: 12px;
  border: 1px dashed var(--line);
  color: var(--muted);
  background: var(--surface);
  font: 12px/1.5 ui-monospace, monospace;
}

@media (min-width: 760px) {
  .checkout-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
    align-items: start;
  }

  .confirmation-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    gap: 28px;
  }

  .confirmation-layout .primary-button {
    grid-column: 1 / -1;
    width: 320px;
    justify-self: center;
  }
}

@media (max-width: 520px) {
  .page-shell {
    padding-top: 18px;
  }

  .cart-item {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
  }

  .cart-item img {
    width: 86px;
    height: 86px;
  }

  .item-price {
    grid-column: 2;
  }
}