:root {
  color-scheme: light;
  color: #242820;
  background: #f8f7f3;
  font: 16px/1.55 system-ui, sans-serif;
  --accent: #32533b;
  --paper: #fff;
  --border: #e1e3da;
  --muted: #565d53;
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid #68836d;
  outline-offset: 4px;
}

.container { width: min(1060px, calc(100% - 2.5rem)); margin-inline: auto; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--border); }
.site-nav { min-height: 68px; display: flex; align-items: center; justify-content: space-between; }
.wordmark { font-size: 1.9rem; font-weight: 780; letter-spacing: -.06em; text-decoration: none; }
.wordmark span, .nav-link { color: var(--accent); }
.nav-link { font-size: .9rem; font-weight: 620; text-underline-offset: .22em; }
.main { padding-block: clamp(2rem, 6vw, 4.75rem); }
h1, h2, p { margin: 0; }
h1 { margin-bottom: 1.8rem; font-size: clamp(2rem, 5vw, 3.75rem); line-height: 1.06; letter-spacing: -.055em; }
h2 { font-size: 1.28rem; line-height: 1.25; overflow-wrap: anywhere; }
h2 a { text-decoration: none; }
h2 a:hover { text-decoration: underline; text-underline-offset: .14em; }

.catalog { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 265px), 1fr)); }
.product-card, .empty, .checkout, .order {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.product-card { display: flex; flex-direction: column; overflow: hidden; }
.catalog-image img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-body { display: flex; gap: .7rem; flex-direction: column; flex: 1; align-items: flex-start; padding: 1.35rem; }
.card-body .description { flex: 1; }
.empty, .checkout, .order { padding: clamp(1.25rem, 4vw, 2rem); }
.empty, .description { color: var(--muted); }
.description { overflow-wrap: anywhere; }
.description p + p { margin-top: 1rem; }
.availability { color: var(--accent); font-size: .85rem; font-weight: 650; }
.unavailable { color: var(--muted); }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .7rem; }
.price strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.price del { color: var(--muted); }

.back-link { display: inline-block; margin-bottom: 1.5rem; color: var(--accent); text-underline-offset: .2em; }
.product-layout { display: grid; gap: clamp(1.5rem, 5vw, 4rem); grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); align-items: start; }
.product-overview h1 { overflow-wrap: anywhere; }
.detail-image { display: block; width: 100%; max-height: 520px; object-fit: contain; margin-bottom: 1.5rem; border-radius: var(--radius); }
.checkout .price { margin-top: .25rem; }
.checkout form, .notice { margin-top: 1rem; }
.notice { padding: .8rem 1rem; background: #f1f5ed; border-radius: 9px; }
label { display: block; margin-bottom: .35rem; font-weight: 620; }
input[type=email] { width: 100%; padding: .72rem .8rem; color: inherit; font: inherit; background: var(--paper); border: 1px solid #91988e; border-radius: 8px; }
.errorlist { color: #9b3026; padding-left: 1.15rem; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: .6rem 1rem; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent); color: #fff; cursor: pointer; font: inherit; font-weight: 620; text-decoration: none; }
.button:hover { filter: brightness(1.13); }
.button.secondary { color: var(--accent); background: transparent; }
form .button { width: 100%; margin-top: 1rem; }
.order { max-width: 620px; }
.order h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin-bottom: .7rem; }
.order-product { font-weight: 620; }
dl { margin: 1.25rem 0 0; }
dl div { display: grid; gap: .2rem 1rem; grid-template-columns: 6rem 1fr; padding-block: .65rem; border-top: 1px solid var(--border); }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.order-id { font-variant-numeric: tabular-nums; }
.order > a.button { margin-top: 1rem; }
.purchase-text { padding: 1rem; background: #f1f5ed; border-radius: 9px; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 700px) {
  .product-layout { grid-template-columns: 1fr; }
}
