:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f7f7f7;
  --fg: #111111;
  --muted: #6b6b6b;
  --brand: #b91c1c;
  --brand-dark: #7f1d1d;
  --header-bg: #ffffff;
  --header-fg: #111111;
  --border: #e5e5e5;
  --border-strong: #cccccc;
  --success: #047857;
  --error: #b91c1c;
  --radius: 8px;
  --max: 880px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.45;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

.site-header {
  background: var(--header-bg);
  border-bottom: 3px solid var(--brand);
  padding: 0.75rem 0;
  color: var(--header-fg);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--header-fg);
  min-width: 0;
}
.site-header .brand-logo { height: 44px; width: 44px; display: block; flex-shrink: 0; }
.site-header .brand-name { letter-spacing: 0.02em; }
.site-header nav { display: flex; gap: 0.75rem; }
.site-header nav a { text-decoration: none; color: var(--fg); white-space: nowrap; }
.site-header nav a:hover { color: var(--brand); }

@media (max-width: 540px) {
  .site-header { padding: 0.55rem 0; }
  .site-header .brand { font-size: 1rem; gap: 0.5rem; }
  .site-header .brand-logo { height: 36px; width: 36px; }
  .site-header nav a { font-size: 0.9rem; }
}
@media (max-width: 380px) {
  .site-header .brand-name { font-size: 0.9rem; }
}

.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}
.site-footer p { margin: 0.35rem 0; }
.site-footer .footer-links a { color: var(--muted); text-decoration: none; }
.site-footer .footer-links a:hover { color: var(--brand); text-decoration: underline; }

.hero { padding: 2rem 0 1rem; }
.hero h1 { margin: 0 0 0.5rem; font-size: 2rem; color: var(--fg); }
.hero p { margin: 0; color: var(--muted); }

.step {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step h2 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--fg);
  border-bottom: 2px solid var(--brand);
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.size-cards, .quantity-list, .date-list, .slot-list { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.size-card, .quantity-card, .date-card, .slot-card {
  background: var(--surface-alt);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--fg);
  transition: border-color 0.12s, background 0.12s;
}
.size-card:hover, .quantity-card:hover, .date-card:not(:disabled):hover, .slot-card:not(:disabled):hover {
  border-color: var(--brand);
  background: var(--surface);
}
.size-card.selected, .quantity-card.selected, .date-card.selected, .slot-card.selected {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.15);
}
.size-name { font-size: 1.2rem; font-weight: 700; color: var(--fg); }
.size-range { color: var(--brand); font-weight: 700; margin: 0.25rem 0; }
.size-hint { color: var(--muted); font-size: 0.85rem; }
.qty-name { font-weight: 700; }
.qty-price { color: var(--brand); font-weight: 700; margin-top: 0.25rem; }
.quantity-heading { grid-column: 1 / -1; margin: 0 0 0.5rem; color: var(--muted); }

.size-card.unavailable, .quantity-card.unavailable, .slot-card.unavailable {
  opacity: 0.45;
  cursor: not-allowed;
  border-style: dashed;
  background: var(--surface-alt);
}
.size-card.unavailable:hover, .quantity-card.unavailable:hover, .slot-card.unavailable:hover {
  border-color: var(--border);
  background: var(--surface-alt);
}
.qty-hint { color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }

.pickup-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 6px solid var(--brand);
}
.pickup-banner-label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.pickup-banner-date { font-size: 1.4rem; font-weight: 800; color: var(--fg); margin-top: 0.15rem; }
.pickup-banner-notes { color: var(--muted); margin-top: 0.4rem; font-size: 0.9rem; }

.closed-banner {
  background: var(--surface-alt);
  border: 1px dashed var(--border-strong);
  text-align: center;
}
.closed-banner h2 { margin-top: 0; color: var(--fg); }
.date-label { font-weight: 600; }
.date-meta { color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }
.date-notes { color: var(--muted); font-size: 0.8rem; margin-top: 0.25rem; font-style: italic; }
.slot-card { text-align: center; }

.cart .cart-items { list-style: none; padding: 0; margin: 0; }
.cart .cart-items li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.cart-name { font-weight: 500; }
.cart-price { font-weight: 600; }

.grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
label { display: block; font-size: 0.85rem; color: var(--muted); }
label > input, label > textarea, label > select {
  display: block;
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  margin-top: 0.25rem;
  background: white;
}

.summary-table { width: 100%; border-collapse: collapse; }
.summary-table th, .summary-table td { padding: 0.5rem 0.25rem; text-align: left; }
.summary-table td { text-align: right; }
.summary-table tr.total { font-size: 1.1rem; font-weight: 700; border-top: 2px solid var(--border); }

.primary, button.primary {
  background: var(--brand);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.primary:hover { background: var(--brand-dark); }
.primary:disabled { opacity: 0.55; cursor: not-allowed; }
.primary.big { width: 100%; padding: 1rem; font-size: 1.1rem; margin-top: 1rem; }

.btn {
  display: inline-block;
  background: var(--brand);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}
.btn:hover { background: var(--brand-dark); color: white; }

button.link, .link {
  background: none;
  border: none;
  color: var(--brand);
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
button.link:hover, .link:hover { color: var(--brand-dark); }
button.link.danger, .link.danger { color: var(--error); }

.error { color: var(--error); background: #fee2e2; padding: 0.75rem 1rem; border-radius: var(--radius); margin: 1rem 0; }
.hint { color: var(--muted); font-size: 0.9rem; }
.loading { color: var(--muted); }

.thanks h1 { color: var(--brand); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin: 1rem 0; }
.refunded { text-decoration: line-through; opacity: 0.6; }

.stacked label + label { margin-top: 0.75rem; }
.stacked button { margin-top: 1rem; }
