/* LFGBuffalo — theme tokens up top so Tiff can restyle without touching layout. */
:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --ink: #17181c;
  --muted: #6b6f78;
  --line: #e7e2d9;
  --accent: #c8102e;      /* Buffalo red */
  --accent-2: #00338d;    /* Buffalo blue */
  --accent-ink: #ffffff;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(20, 20, 30, .08);
  --font-display: "Bebas Neue", "Impact", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 var(--font-body);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; }

.demo-banner { background: var(--accent-2); color: #fff; text-align: center; font-size: 13px; padding: 6px; }

/* header */
.site-header {
  max-width: var(--max); margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 38px; height: 38px; }
.brand-name { font-family: var(--font-display); font-size: 30px; letter-spacing: .04em; line-height: 1; }
.nav { display: flex; gap: 22px; font-weight: 500; }
.cart-count {
  display: inline-block; min-width: 22px; padding: 0 7px; margin-left: 4px;
  background: var(--accent); color: var(--accent-ink); border-radius: 999px;
  font-size: 12px; text-align: center; line-height: 22px;
}

/* layout */
.page { max-width: var(--max); margin: 0 auto; padding: 10px 20px 60px; }
.hero { text-align: center; padding: 30px 0 18px; }
.hero-title { font-family: var(--font-display); font-size: clamp(56px, 10vw, 110px); margin: 0; line-height: .95; letter-spacing: .02em; }
.hero-sub { color: var(--muted); margin: 6px 0 0; font-size: 18px; }
.page-title { font-family: var(--font-display); font-size: 44px; margin: 10px 0 20px; letter-spacing: .03em; }

.cats { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 14px 0 26px; }
.cats a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; }
.cats a.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; } }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s ease; }
.card:hover { transform: translateY(-3px); }
.card-img { position: relative; aspect-ratio: 1; background: #f1ede6; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card.sold .card-img img { opacity: .45; filter: grayscale(1); }
.badge { position: absolute; top: 10px; left: 10px; background: var(--ink); color: #fff; font-size: 12px; padding: 4px 9px; border-radius: 999px; }
.card-body { padding: 12px 14px 14px; }
.card-name { font-weight: 600; }
.card-price { color: var(--muted); margin-top: 2px; }
.img-placeholder { width: 100%; height: 100%; background: repeating-linear-gradient(45deg, #ece7df 0 12px, #f4f0ea 12px 24px); }
.img-placeholder.big { aspect-ratio: 1; border-radius: var(--radius); }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* product */
.back { display: inline-block; color: var(--muted); margin: 6px 0 16px; }
.product { display: grid; gap: 28px; }
@media (min-width: 800px) { .product { grid-template-columns: 1.1fr 1fr; gap: 44px; } }
.gallery-main { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); background: #f1ede6; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs img { width: 68px; height: 68px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.thumbs img.on { border-color: var(--accent); }
.crumb { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.details h1 { font-family: var(--font-display); font-size: 46px; margin: 4px 0 6px; line-height: 1; letter-spacing: .02em; }
.price { font-size: 26px; font-weight: 600; margin-bottom: 18px; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field select, .field input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.buy-row { display: flex; gap: 12px; align-items: flex-end; }
.field.qty { width: 90px; margin: 0; }
.btn {
  display: inline-block; padding: 13px 22px; border-radius: 10px; border: 1px solid var(--ink);
  background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(.94); }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.low { color: var(--accent); font-size: 14px; margin-top: 10px; font-weight: 500; }
.desc { margin-top: 24px; white-space: pre-line; color: #333; }
.ship-note { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* cart */
.cart-layout { display: grid; gap: 28px; }
@media (min-width: 860px) { .cart-layout { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.line { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line img, .line .img-placeholder { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; }
.line-name { font-weight: 600; }
.line-var { color: var(--muted); font-size: 14px; }
.line-ctl { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.line-ctl button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.line-ctl .rm { margin-left: 8px; color: var(--muted); border: 0; background: none; width: auto; font-size: 14px; }
.line-price { font-weight: 600; text-align: right; }
.summary { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-size: 20px; }
.fulfill { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.fulfill legend { font-size: 13px; color: var(--muted); padding: 0 6px; }
.fulfill label { display: block; padding: 6px 0; cursor: pointer; }
.fulfill small { color: var(--muted); margin-left: 4px; }
.fine { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.error { margin-top: 12px; padding: 10px 12px; background: #fdecee; color: #9b1022; border-radius: 10px; font-size: 14px; }

/* misc */
.thanks { text-align: center; padding: 60px 0; }
.thanks h1 { font-family: var(--font-display); font-size: 64px; margin: 0 0 10px; letter-spacing: .02em; }
.thanks .btn { margin-top: 18px; }
.site-footer { max-width: var(--max); margin: 0 auto; padding: 30px 20px 50px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; display: grid; gap: 8px; }
.footer-links { display: flex; gap: 18px; }
.footer-fine { font-size: 12px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px;
  box-shadow: var(--shadow); z-index: 50;
}
.toast a { color: #fff; text-decoration: underline; margin-left: 6px; }
