/* ===== Grizz Games theme =====
   Bear brown, honey and cartridge-grey plastic. */
:root {
  --plastic: #d9d2c5;
  --panel: #f1ece4;
  --white: #ffffff;
  --ink: #2b1d14;
  --muted: #6b5a4c;
  --primary: #8a4f2a;
  --primary-dark: #5e331a;
  --fur: #d39a5c;
  --red: #c9372c;
  --yellow: #f2b134;
  --green: #2f6b45;
  --shell: #9a9188;
  --shell-dark: #756c63;
  --line: #c4baab;
  --pixel: "Silkscreen", "Courier New", monospace;
  --body: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--plastic);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--primary); }
h1, h2 { font-family: var(--pixel); font-weight: 700; line-height: 1.15; margin: 0; }
h3 { font-family: var(--body); font-weight: 600; line-height: 1.3; margin: 0; }
h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 3.2vw, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== Header ===== */
.site-header { background: var(--ink); color: var(--white); position: sticky; top: 0; z-index: 50; border-bottom: 4px solid var(--primary); }
.header-row { display: flex; align-items: center; gap: 18px; min-height: 66px; flex-wrap: wrap; }
.announce { background: var(--yellow); color: var(--ink); font-size: .88rem; font-weight: 500; text-align: center; padding: 6px 0; }
.logo { font-family: var(--pixel); font-weight: 700; font-size: 1.3rem; color: var(--white); text-decoration: none; display: flex; align-items: center; gap: 10px; margin-right: auto; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo-mark svg { width: 100%; height: 100%; display: block; }
.main-nav { display: flex; gap: 4px; align-items: center; }
.main-nav a { color: #eadcc8; text-decoration: none; padding: 8px 12px; font-weight: 500; }
.main-nav a:hover { color: var(--white); background: rgba(255,255,255,.08); }
.main-nav a[aria-current="page"] { color: var(--white); box-shadow: inset 0 -3px 0 var(--yellow); }
.cart-link { display: inline-flex; align-items: center; gap: 8px; }
.cart-count { font-family: var(--pixel); background: var(--red); color: var(--white); min-width: 24px; height: 24px; padding: 0 6px; display: inline-grid; place-items: center; font-size: .8rem; }
.nav-toggle { display: none; background: none; border: 2px solid #7a6655; color: var(--white); font: inherit; padding: 6px 12px; cursor: pointer; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .main-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
  .main-nav.open { display: flex; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--body); font-weight: 600; font-size: 1rem;
  padding: 12px 22px; text-decoration: none; cursor: pointer;
  border: 3px solid var(--ink); background: var(--white); color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-red { background: var(--red); color: var(--white); }
.btn-yellow { background: var(--yellow); }
.btn-small { padding: 7px 14px; font-size: .9rem; box-shadow: 3px 3px 0 var(--ink); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: 4px 4px 0 var(--ink); }
.text-btn { background: none; border: 0; color: var(--primary); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

/* ===== Sections / panels ===== */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head p { margin: 8px 0 0; color: var(--muted); max-width: 40em; }
.panel { background: var(--panel); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 26px; }
.page-title { padding: 40px 0 10px; }
.page-title p { color: var(--muted); margin-top: 10px; max-width: 42em; }

/* ===== Home hero ===== */
.hero { padding: 54px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.hero-copy h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); max-width: 14ch; }
.hero-lead { font-size: 1.18rem; color: var(--muted); max-width: 34em; margin: 22px 0 28px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-fine { margin: 22px 0 0; font-size: .95rem; color: var(--muted); }
.mascot { margin: 0; position: relative; background: var(--yellow); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); aspect-ratio: 1; display: grid; place-items: end center; padding: 18px; }
.mascot-bear { width: 72%; }
.mascot-bear svg { width: 100%; height: auto; display: block; }
.bubble { position: absolute; top: 18px; left: 18px; right: 18px; background: var(--white); border: 3px solid var(--ink); padding: 12px 14px; font-weight: 600; font-size: 1.02rem; line-height: 1.35; }
.bubble::after { content: ""; position: absolute; bottom: -15px; left: 46%; width: 18px; height: 12px; background: var(--white); border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: skewX(-25deg); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .mascot { max-width: 340px; }
}

/* ===== Note from Grizz ===== */
.grizz-note { display: grid; grid-template-columns: 96px 1fr; gap: 28px; align-items: start; background: var(--white); border: 3px solid var(--ink); padding: 30px; max-width: 860px; }
.note-bear svg { width: 100%; height: auto; display: block; }
.grizz-note h2 { margin-bottom: 14px; }
.grizz-note p { max-width: 58ch; }
@media (max-width: 600px) { .grizz-note { grid-template-columns: 1fr; padding: 22px; } .note-bear { width: 72px; } }

.text-link { font-weight: 600; color: var(--primary-dark); text-underline-offset: 3px; }
.text-link:hover { color: var(--ink); }

/* ===== Platform shelf ===== */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.shelf a {
  display: flex; flex-direction: column; justify-content: space-between; min-height: 84px;
  padding: 12px 14px; text-decoration: none; color: var(--ink); background: var(--panel);
  border: 3px solid var(--ink); font-weight: 600; font-size: 1.05rem;
}
.shelf a small { font-family: var(--body); font-weight: 400; color: var(--muted); font-size: .85rem; }
.shelf a:hover { background: var(--yellow); }

/* ===== Cartridge product card ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 26px 20px; }
.cart-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--shell); padding: 26px 12px 14px; color: var(--ink); text-decoration: none;
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%, 0 14px);
  transition: transform .12s;
}
.cart-card::before { /* grip ridges */
  content: ""; position: absolute; top: 8px; left: 30%; right: 30%; height: 10px;
  background: repeating-linear-gradient(90deg, var(--shell-dark) 0 4px, transparent 4px 8px);
}
.cart-card:hover { transform: translateY(-4px); }
.cart-card:focus-within { outline: 3px solid var(--yellow); }
.label { background: var(--white); border: 3px solid var(--ink); display: flex; flex-direction: column; flex: 1; }
.label-art { aspect-ratio: 4 / 3; background: var(--fur); position: relative; overflow: hidden; border-bottom: 3px solid var(--ink); }
.label-art img { width: 100%; height: 100%; object-fit: cover; }
.placeholder-art {
  width: 100%; height: 100%; display: grid; place-items: center; text-align: center; padding: 10px;
  font-family: var(--pixel); font-weight: 700; color: var(--white); font-size: 1.15rem;
  background:
    linear-gradient(135deg, rgba(255,255,255,.12) 25%, transparent 25% 50%, rgba(255,255,255,.12) 50% 75%, transparent 75%) 0 0 / 24px 24px,
    var(--primary);
}
.label-body { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.label-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: .78rem; }
.chip { display: inline-block; padding: 1px 8px; border: 2px solid var(--ink); background: var(--panel); font-weight: 500; }
.chip.mod { background: var(--yellow); }
.chip.sold { background: var(--ink); color: var(--white); }
.label-title { font-family: var(--body); font-weight: 600; font-size: 1.02rem; line-height: 1.3; }
.label-title a { color: inherit; text-decoration: none; }
.label-title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.price-row { margin-top: auto; display: flex; align-items: baseline; gap: 8px; padding-top: 6px; }
.price { font-family: var(--pixel); font-weight: 700; font-size: 1.25rem; }
.compare { color: var(--muted); text-decoration: line-through; font-size: .9rem; }
.badge-sale { position: absolute; top: 10px; left: 10px; background: var(--red); color: var(--white); font-family: var(--pixel); font-size: .75rem; padding: 3px 8px; border: 2px solid var(--ink); }
.cart-card.is-sold .label-art { filter: grayscale(1); opacity: .75; }

/* ===== Shop layout + filters ===== */
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; padding-bottom: 60px; }
.filters { position: sticky; top: 124px; max-height: calc(100vh - 140px); overflow: auto; background: var(--panel); border: 3px solid var(--ink); padding: 18px; }
.filters h2 { font-size: 1.1rem; margin-bottom: 12px; }
.filter-group { border-top: 2px dashed var(--line); padding: 14px 0; }
.filter-group:first-of-type { border-top: 0; padding-top: 0; }
.filter-group legend, .filter-label { font-family: var(--body); font-weight: 600; font-size: .95rem; margin-bottom: 8px; padding: 0; display: block; }
.filter-group fieldset { border: 0; margin: 0; padding: 0; }
.check { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; font-size: .95rem; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; }
.check .count { margin-left: auto; color: var(--muted); font-size: .82rem; }
.price-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field { width: 100%; font: inherit; padding: 9px 11px; border: 2px solid var(--ink); background: var(--white); color: var(--ink); border-radius: 0; }
.field:focus { outline: 3px solid var(--yellow); outline-offset: 0; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.toolbar .result-count { font-weight: 600; }
.toolbar select { width: auto; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.active-filters button { font: inherit; font-size: .85rem; border: 2px solid var(--ink); background: var(--white); padding: 2px 10px; cursor: pointer; }
.active-filters button:hover { background: var(--yellow); }
.filters-toggle { display: none; }
.empty { text-align: center; padding: 50px 20px; }
.empty h2 { margin-bottom: 10px; }
@media (max-width: 900px) {
  .shop-layout { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; display: none; }
  .filters.open { display: block; }
  .filters-toggle { display: inline-flex; }
}

/* ===== Product page ===== */
.product-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; padding: 30px 0 60px; align-items: start; }
.gallery-main { border: 3px solid var(--ink); background: var(--white); aspect-ratio: 4 / 3; overflow: hidden; box-shadow: 6px 6px 0 var(--ink); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; background: var(--white); }
.thumbs { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.thumbs button { width: 72px; height: 72px; padding: 0; border: 3px solid var(--line); background: var(--white); cursor: pointer; overflow: hidden; }
.thumbs button[aria-current="true"] { border-color: var(--primary); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); margin: 12px 0; }
.product-info .price { font-size: 2rem; }
.stock-line { font-weight: 600; margin: 8px 0 20px; }
.stock-line.in { color: var(--green); }
.stock-line.out { color: var(--red); }
.qty-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.qty-row .field { width: 90px; }
.includes { list-style: none; padding: 0; margin: 0 0 20px; }
.includes li { padding: 6px 0 6px 26px; position: relative; border-bottom: 1px dashed var(--line); }
.includes li::before { content: ""; position: absolute; left: 4px; top: 14px; width: 10px; height: 10px; background: var(--primary); }
.breadcrumb { font-size: .9rem; padding-top: 24px; }
.breadcrumb a { color: var(--muted); }
@media (max-width: 860px) { .product-layout { grid-template-columns: 1fr; } }

/* ===== Cart ===== */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 30px; align-items: start; padding-bottom: 60px; }
.cart-line { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 2px dashed var(--line); }
.cart-line:first-child { padding-top: 0; }
.cart-thumb { width: 84px; height: 84px; border: 3px solid var(--ink); overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb .placeholder-art { font-size: .7rem; }
.cart-line .controls { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.cart-line .controls .field { width: 72px; padding: 5px 8px; }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; }
.summary-row.total { border-top: 3px solid var(--ink); margin-top: 8px; padding-top: 12px; font-family: var(--pixel); font-weight: 700; font-size: 1.2rem; }
.note { background: var(--yellow); border: 3px solid var(--ink); padding: 12px 14px; font-size: .93rem; margin: 16px 0; }
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }

/* ===== Forms ===== */
.form-grid { display: grid; gap: 16px; }
.form-grid label { display: block; font-weight: 600; margin-bottom: 6px; }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
textarea.field { min-height: 120px; resize: vertical; }
@media (max-width: 600px) { .form-two { grid-template-columns: 1fr; } }

/* ===== FAQ / services ===== */
details.faq { background: var(--panel); border: 3px solid var(--ink); padding: 16px 20px; margin-bottom: 12px; }
details.faq summary { font-weight: 600; font-size: 1.05rem; cursor: pointer; }
details.faq p { margin: 12px 0 0; color: var(--muted); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; }
.steps li::before { content: counter(s); width: 48px; height: 48px; display: grid; place-items: center; background: var(--primary); color: var(--white); font-family: var(--pixel); font-weight: 700; font-size: 1.2rem; border: 3px solid var(--ink); }
.steps strong { display: block; font-size: 1.05rem; }
.price-table { width: 100%; border-collapse: collapse; background: var(--white); border: 3px solid var(--ink); }
.price-table th, .price-table td { text-align: left; padding: 12px 14px; border-bottom: 2px dashed var(--line); }
.price-table th { background: var(--panel); }
.table-wrap { overflow-x: auto; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* ===== Footer ===== */
.site-footer { background: var(--ink); color: #d8c7b1; padding: 40px 0; margin-top: 40px; font-size: .92rem; }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 26px; }
.site-footer h3 { color: var(--white); font-size: 1rem; margin-bottom: 10px; }
.foot-brand { display: flex; gap: 14px; align-items: flex-start; }
.foot-bear { width: 44px; flex: none; }
.foot-bear svg { width: 100%; height: auto; display: block; }
.site-footer a { color: #eadcc8; display: block; padding: 2px 0; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .fine { grid-column: 1 / -1; border-top: 1px solid #4a382b; padding-top: 18px; color: #a8937e; }
@media (max-width: 700px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(140%);
  background: var(--ink); color: var(--white); border: 3px solid var(--yellow); padding: 12px 18px;
  font-weight: 600; z-index: 100; transition: transform .2s; display: flex; gap: 14px; align-items: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast a { color: var(--yellow); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } .cart-card { transition: none; } }

/* bear on placeholder art */
.placeholder-art { gap: 6px; align-content: center; }
.placeholder-art svg { width: 38%; max-width: 72px; height: auto; display: block; margin: 0 auto; }
.cart-thumb .placeholder-art svg, .row-item .placeholder-art svg { width: 50%; }
.hero-bear { width: 96px; height: 96px; margin-bottom: 22px; position: relative; z-index: 1; }
.hero-bear svg { width: 100%; height: 100%; display: block; }

/* ===== Checkout messages ===== */
.error-box { background: #fbe3e0; border: 3px solid var(--red); padding: 10px 12px; margin: 14px 0 0; font-weight: 500; }
.error-box.soft { background: var(--panel); border-color: var(--ink); }

/* ===== Track order ===== */
.track-layout { display: grid; grid-template-columns: minmax(0, 380px) 1fr; gap: 28px; align-items: start; }
@media (max-width: 820px) { .track-layout { grid-template-columns: 1fr; } }
.progress { list-style: none; padding: 0; margin: 20px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.progress li { border-top: 6px solid var(--line); padding-top: 8px; font-weight: 600; font-size: .92rem; color: var(--muted); }
.progress li.done { border-top-color: var(--primary); color: var(--ink); }

/* ===== Product page extras ===== */
.trust-line { font-size: .95rem; color: var(--muted); margin: -8px 0 22px; }
.info-list { margin-top: 26px; border-top: 2px dashed var(--line); }
.info-list details { border-bottom: 2px dashed var(--line); padding: 14px 0; }
.info-list summary { font-weight: 600; cursor: pointer; }
.info-list p { margin: 10px 0 0; color: var(--muted); }
