:root {
  --bg: #0d0c0a;
  --panel: #17150f;
  --line: #2c281e;
  --text: #ece4d0;
  --muted: #a39a83;
  --gold: #c9a45c;
  --gold-hi: #e2c07e;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 18px/1.6 var(--sans); }
@media (max-width: 760px) { body { font-size: 17px; } }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

.test-banner { background: #5a3d0a; color: #ffe2a8; text-align: center; font-size: 15px; padding: 6px 16px; }

.topbar { position: sticky; top: 0; z-index: 30; background: rgba(13, 12, 10, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-family: var(--serif); letter-spacing: .28em; font-size: 20px; text-decoration: none; color: var(--gold-hi); }
.cart-link, .shop-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; text-decoration: none; font-size: 17px; color: var(--text); }
.shop-link { margin-left: auto; }
.cart-link:hover, .shop-link:hover { color: var(--gold-hi); }
header.site .wrap { gap: 16px; }
.logo { display: inline-flex; align-items: center; min-height: 44px; }
.cart-link b { color: var(--gold-hi); font-weight: 600; }

.hero { text-align: center; padding: 56px 0 40px; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 6vw, 52px); line-height: 1.1; margin: 0 0 12px; }
.hero p { color: var(--muted); max-width: 560px; margin: 0 auto; font-size: 19px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; padding-bottom: 64px; }
.card { text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; transition: border-color .15s; }
.card:hover { border-color: var(--gold); }
.card img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.card .info { padding: 14px 16px 16px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1.25; margin: 0; }
.card .price { color: var(--gold-hi); font-size: 16px; white-space: nowrap; }

.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; padding: 40px 0 72px; }
.product img { border-radius: 10px; border: 1px solid var(--line); width: 100%; }
.product h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4vw, 40px); margin: 0 0 8px; line-height: 1.15; }
.product .blurb { color: var(--muted); margin: 0 0 24px; }
.back { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; font-size: 16px; margin-bottom: 8px; }
.back:hover { color: var(--gold-hi); }

fieldset { border: 0; padding: 0; margin: 0 0 20px; }
legend { font-size: 15px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label { min-width: 52px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; text-align: center; padding: 10px 16px; font-size: 17px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.chips input:checked + label { border-color: var(--gold); color: var(--gold-hi); background: #221d12; }
.chips input:focus-visible + label { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.big-price { font-size: 28px; color: var(--gold-hi); margin: 0 0 20px; }

.btn { display: inline-block; width: 100%; min-height: 52px; padding: 15px 20px; border: 0; border-radius: 8px; background: var(--gold); color: #17130a; font: 600 18px var(--sans); cursor: pointer; text-align: center; text-decoration: none; }
.btn:hover { background: var(--gold-hi); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.note { color: var(--muted); font-size: 16px; margin-top: 10px; min-height: 1.4em; }

.cart { max-width: 1120px; padding: 48px 16px 88px; }
.cart h1, .thanks h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5vw, 56px); margin: 0 0 28px; }
.cart-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: start; }
.items { border-top: 1px solid var(--line); }
.line { display: grid; grid-template-columns: 140px 1fr auto; gap: 24px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); }
.line img { border-radius: 10px; width: 140px; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.item-name { font-family: var(--serif); font-size: 26px; line-height: 1.2; color: var(--text); text-decoration: none; }
.item-name:hover { color: var(--gold-hi); }
.line .meta { font-size: 18px; color: var(--muted); margin-top: 4px; }
.line-total { font-size: 22px; color: var(--gold-hi); }
.qty { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.qty span { min-width: 28px; text-align: center; font-size: 20px; }
.qty button { width: 48px; height: 48px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; font-size: 22px; }
.qty button:hover { border-color: var(--gold); }
.qty .remove { width: auto; height: auto; border: 0; font-size: 17px; }
.remove { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 17px; min-height: 48px; padding: 0 10px; margin-left: 6px; }
.summary { position: sticky; top: 110px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.summary h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 0 0 18px; }
.summary .secure { color: var(--muted); font-size: 16px; margin: 14px 0 0; }
.totals { margin: 0 0 24px; display: grid; gap: 12px; font-size: 19px; }
.totals div { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); }
.totals .grand { color: var(--text); font-size: 26px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  .cart-grid { grid-template-columns: 1fr; gap: 28px; }
  .summary { position: static; padding: 22px; }
  .line { grid-template-columns: 96px 1fr; gap: 16px; }
  .line img { width: 96px; }
  .item-name { font-size: 22px; }
  .line-total { grid-column: 2; font-size: 20px; }
}

.thanks { max-width: 620px; padding: 72px 16px; text-align: center; }
.thanks p { color: var(--muted); }

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 16px; padding: 24px 0 40px; text-align: center; }

@media (max-width: 760px) {
  .product { grid-template-columns: 1fr; gap: 24px; padding-top: 20px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card .info { flex-direction: column; padding: 10px 12px 12px; gap: 2px; }
  .card h3 { font-size: 18px; }
  .hero { padding: 36px 0 28px; }
}

/* Easter egg toast */
.toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); background: #17130a; border: 1px solid var(--gold); color: var(--gold-hi); font-family: var(--serif); padding: 12px 20px; border-radius: 99px; z-index: 100; }


/* Usability: visible keyboard focus and a skip link */
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 300; background: var(--gold); color: #17130a; padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
