@font-face {
  font-family: 'Bebas Neue';
  src: url('/assets/fonts/bebas-neue-latin-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* heavypaw.ca shared styles: tokens, chrome (header/footer), buttons, product grid,
   product panel, cart drawer, forms, toasts. Page-specific CSS lives next to each page. */

:root {
  --bg: #0d0d0d;
  --bg-2: #161616;
  --bg-3: #1f1f1f;
  --line: #2c2c2c;
  --text: #f2f2f2;
  --text-2: #a8a8a8;
  --text-3: #8a8a8a;
  --brand: #c4101f;
  --brand-ink: #fff;
  --accent: #ff7a1a;            /* Halloween orange */
  --ok: #3ccf7a;
  --warn: #ffcc00;
  --danger: #ff5a5a;
  --radius: 4px;
  --display: 'Bebas Neue', Impact, 'Arial Narrow Bold', sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --header-h: 60px;
  --gutter: clamp(16px, 4vw, 56px);
  --ease-snap: cubic-bezier(.16, 1, .3, 1); /* ease-out-expo: quick, settles without overshoot */
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .04em; line-height: 1.02; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--warn); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 1000;
  background: var(--warn); color: #000; padding: 10px 14px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 var(--gutter);
  background: rgba(13, 13, 13, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #1c1c1c;
}
.site-logo { font-family: var(--display); font-size: 30px; letter-spacing: .12em; text-decoration: none; line-height: 1; }
.site-nav { display: flex; gap: 20px; margin-left: auto; }
.site-nav a { text-decoration: none; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); padding: 8px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.cart-button {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; cursor: pointer; font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  min-height: 40px;
}
.cart-button:hover { border-color: var(--text-2); }
.cart-button svg { width: 18px; height: 18px; }
.cart-button .cart-icon { width: 24px; height: 24px; margin: -3px 0; }
.cart-button.bump .cart-icon { animation: bucket-wobble .5s var(--ease-snap); }
@keyframes bucket-wobble { 30% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } }
.cart-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0;
  display: inline-grid; place-items: center;
}
.cart-count[data-count="0"] { background: var(--bg-3); color: var(--text-3); }
.cart-button.bump .cart-count { animation: bump .45s var(--ease-snap); }
@keyframes bump { 40% { transform: scale(1.5); } }

@media (max-width: 640px) {
  .site-nav { gap: 14px; }
  .site-nav .nav-optional { display: none; }
  .cart-button .cart-label { display: none; }
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 28px;
  font-family: var(--display); font-size: 22px; letter-spacing: .08em; line-height: 1;
  text-decoration: none; cursor: pointer;
  border: 2px solid var(--text); background: var(--text); color: #000;
  border-radius: var(--radius);
  transition: transform .12s, background .15s, color .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn--brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #000; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--text-2); }
.btn--block { width: 100%; }
.btn--small { min-height: 38px; padding: 8px 16px; font-size: 18px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.link-button { background: none; border: 0; padding: 0; color: var(--text-2); text-decoration: underline; cursor: pointer; font-size: 14px; }
.link-button:hover { color: var(--text); }

.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Layout helpers ─────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(48px, 8vw, 96px) 0; }
.eyebrow { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.section-title { font-size: clamp(36px, 6vw, 64px); }
.prose { max-width: 720px; }
.prose h2 { font-size: 34px; margin-top: 1.4em; }
.prose p, .prose li { color: var(--text-2); }
.prose a { color: var(--text); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { border-top: 1px solid #1c1c1c; background: #000; padding: 40px var(--gutter) 48px; }
.site-footer .footer-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-start; justify-content: space-between; }
.footer-brand { font-family: var(--display); font-size: 34px; letter-spacing: .14em; line-height: 1; text-decoration: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--text-2); text-decoration: none; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.footer-links a:hover { color: var(--text); }
.footer-ig { color: var(--text-2); display: inline-flex; padding: 4px; }
.footer-ig:hover { color: var(--text); }
.footer-ig svg { width: 24px; height: 24px; fill: currentColor; }
.footer-small { width: 100%; color: var(--text-3); font-size: 12px; margin: 0; }

/* ── Product grid ───────────────────────────────────────── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 40px 28px; }
@media (max-width: 480px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 14px; } }
.product-card { display: flex; flex-direction: column; position: relative; }
.product-card__media {
  position: relative; aspect-ratio: 4 / 5; background: var(--bg-2); overflow: hidden; border-radius: var(--radius);
}
.product-card__media picture, .product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.product-card__media .alt-view { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; }
@media (hover: hover) { .product-card:hover .alt-view { opacity: 1; } }
.product-card__open { position: absolute; inset: 0; z-index: 2; background: none; border: 0; cursor: pointer; }
.product-card__name { font-family: var(--display); font-size: 24px; letter-spacing: .05em; margin: 14px 0 2px; line-height: 1.05; }
.product-card__price { color: var(--text-2); font-size: 14px; letter-spacing: .06em; }
.product-card__swatches { display: flex; gap: 6px; margin-top: 10px; }
.product-card__badge {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  background: var(--accent); color: #000; font-family: var(--display); font-size: 16px; letter-spacing: .08em; padding: 3px 8px; border-radius: 2px;
}
.swatch-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); }
@media (max-width: 480px) { .product-card__name { font-size: 20px; } }

/* ── Dialog base (product panel + cart drawer) ──────────── */
dialog { color: var(--text); padding: 0; border: 0; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(0, 0, 0, .7); }
.dialog-close {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 26px; line-height: 1;
}
.dialog-close:hover { background: rgba(0, 0, 0, .85); }

/* Product panel */
.product-panel {
  width: min(980px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  background: var(--bg-2); border-radius: 8px; overflow: auto; overscroll-behavior: contain;
}
.product-panel[open] { animation: panel-in .28s var(--ease-snap); }
@keyframes panel-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.pp { display: grid; grid-template-columns: 1.1fr 1fr; }
.pp__gallery { background: #0a0a0a; position: relative; }
.pp__main { aspect-ratio: 4 / 5; overflow: hidden; }
.pp__main picture, .pp__main img { width: 100%; height: 100%; object-fit: cover; }
.pp__thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.pp__thumb { flex: 0 0 64px; height: 80px; padding: 0; border: 2px solid transparent; border-radius: 3px; overflow: hidden; cursor: pointer; background: var(--bg-3); }
.pp__thumb[aria-current="true"] { border-color: var(--text); }
.pp__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pp__info { padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 18px; }
.pp__head { display: grid; gap: 8px; }
.pp__name { font-size: clamp(34px, 4vw, 48px); margin: 0; padding-right: 40px; }
.pp__price { font-size: 20px; color: var(--text); margin: 0; }
.pp__desc { color: var(--text-2); font-size: 14px; margin: 0; }
.pp__label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; display: block; }
.pp__label strong { color: var(--text); font-weight: 600; }
.option-row { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.option-row legend { padding: 0; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt span {
  display: grid; place-items: center; min-width: 48px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; letter-spacing: .04em;
  transition: border-color .12s, background .12s;
}
.opt input:checked + span { border-color: var(--text); background: var(--text); color: #000; }
.opt input:focus-visible + span { outline: 3px solid var(--warn); outline-offset: 2px; }
.opt--color span { min-width: 44px; padding: 0; border-radius: 50%; }
.opt--color span i { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); }
.opt--color input:checked + span { background: transparent; box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 4px var(--text); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); }
.qty button { width: 44px; height: 44px; background: none; border: 0; cursor: pointer; font-size: 20px; }
.qty output, .qty span { min-width: 32px; text-align: center; }
.pp__add-row { display: flex; gap: 12px; align-items: center; }
.pp__add-row .btn { flex: 1; }
.pp__note { font-size: 13px; color: var(--text-3); margin: 0; }
.pp__error { color: var(--danger); font-size: 14px; margin: 0; min-height: 1.2em; }
.pp__added { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; background: #11331f; border: 1px solid #1f6b3e; padding: 10px 12px; border-radius: var(--radius); font-size: 14px; }

@media (max-width: 760px) {
  .product-panel { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
  .pp { grid-template-columns: 1fr; }
  .pp__main { aspect-ratio: auto; height: min(48svh, 100vw); }
  .pp__thumbs { padding: 8px 16px; }
  .pp__thumb { flex-basis: 48px; height: 60px; }
  .pp__info { padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); }
  .pp__add-row { position: sticky; bottom: 0; z-index: 2; background: var(--bg-2); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); margin: 0 -16px; border-top: 1px solid var(--line); }
}

/* ── Cart drawer ────────────────────────────────────────── */
.cart-drawer {
  margin: 0 0 0 auto; height: 100dvh; width: min(440px, 100vw);
  background: var(--bg-2); border-left: 1px solid var(--line);
}
.cart-drawer[open] { animation: drawer-in .3s cubic-bezier(.2, .9, .3, 1); }
@keyframes drawer-in { from { transform: translateX(100%); } }
.cart-drawer > .cart-view { height: 100%; }
.cart-view { display: flex; flex-direction: column; min-height: 0; }
.cart-view__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.cart-view__head h2 { font-size: 32px; margin: 0; }
.cart-view__head .dialog-close { position: static; background: transparent; }
.cart-view__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px; }
.cart-view__foot { border-top: 1px solid var(--line); padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 12px; background: var(--bg-2); }
.cart-page .cart-view__foot { position: sticky; bottom: 0; }

.ship-progress { margin-bottom: 18px; }
.ship-progress p { font-size: 14px; margin: 0 0 8px; }
.ship-progress__bar { height: 8px; background: var(--bg-3); border-radius: 4px; overflow: hidden; }
.ship-progress__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--warn)); border-radius: 4px; transform-origin: left; transition: transform .4s var(--ease-snap); }
.ship-progress.is-free .ship-progress__bar i { background: var(--ok); }

.cart-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.cart-line { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: start; }
.cart-line__img { width: 72px; aspect-ratio: 4 / 5; background: var(--bg-3); border-radius: 3px; overflow: hidden; }
.cart-line__img img { width: 100%; height: 100%; object-fit: cover; }
.cart-line__name { font-family: var(--display); font-size: 20px; letter-spacing: .04em; line-height: 1.05; margin: 0 0 2px; }
.cart-line__meta { font-size: 13px; color: var(--text-2); margin: 0 0 8px; }
.cart-line__price { font-size: 15px; text-align: right; }
.cart-line .qty button { width: 36px; height: 36px; font-size: 18px; }
.cart-line__remove { margin-top: 8px; font-size: 13px; }
.cart-empty { text-align: center; padding: 40px 0; color: var(--text-2); }
.cart-empty .btn { margin-top: 12px; }

.fulfil { border: 0; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.fulfil legend { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; padding: 0; }
.fulfil label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; font-size: 14px; }
.fulfil label:has(input:checked) { border-color: var(--text); background: var(--bg-3); }
.fulfil input { accent-color: var(--text); width: 18px; height: 18px; margin: 0; }
.fulfil .fulfil__price { margin-left: auto; color: var(--text-2); }

.code-form { display: flex; gap: 8px; margin-top: 12px; }
.code-form input { flex: 1; min-width: 0; }
.code-applied { margin-top: 18px; display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px dashed var(--ok); border-radius: var(--radius); font-size: 14px; }
.code-applied b { letter-spacing: .08em; }
.code-msg { font-size: 13px; margin: 6px 0 0; min-height: 1.2em; color: var(--text-2); }
.code-msg.is-error { color: var(--danger); }

.totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; margin: 0; }
.totals dt { color: var(--text-2); }
.totals dd { margin: 0; text-align: right; }
.totals .grand { font-size: 18px; font-weight: 700; color: var(--text); padding-top: 6px; }
.checkout-error { background: #3a1212; border: 1px solid #7a2222; color: #ffd4d4; padding: 10px 12px; border-radius: var(--radius); font-size: 14px; }
.checkout-secure { font-size: 12px; color: var(--text-3); text-align: center; margin: 0; }

/* ── Forms ──────────────────────────────────────────────── */
.input {
  width: 100%; min-height: 46px; padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 16px; /* 16px stops iOS zoom */
}
.input:focus { border-color: var(--text-2); outline: none; }
textarea.input { min-height: 140px; resize: vertical; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.hp { position: absolute; left: -9999px; }

/* ── Toast ──────────────────────────────────────────────── */
.toast-region { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2000; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { background: #fff; color: #000; padding: 12px 16px; border-radius: 6px; font-size: 15px; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: toast-in .3s var(--ease-snap); pointer-events: auto; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px); } }
.toast { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toast__action { flex: none; background: #000; color: #fff; border: 0; border-radius: 4px; padding: 8px 12px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }

/* ── Banner (order cutoff etc.) ─────────────────────────── */
/* Space is reserved from first paint so filling it in (JS) never shifts the page. */
.banner { background: var(--accent); color: #000; text-align: center; font-size: 14px; padding: 8px var(--gutter); line-height: 1.35; min-height: 35px; }
.banner.is-pending { color: transparent; }
@media (max-width: 600px) { .banner { font-size: 13px; min-height: 52px; } }
.banner b { font-weight: 800; }
.banner .countdown { font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }

/* ── Coming soon ────────────────────────────────────────── */
.coming-soon { min-height: calc(100dvh - var(--header-h)); display: grid; place-items: center; text-align: center; padding: 48px var(--gutter); }
.coming-soon h1 { font-size: clamp(64px, 16vw, 180px); margin: 0; }
.coming-soon .tag { display: inline-block; font-family: var(--display); font-size: 22px; letter-spacing: .14em; border: 2px solid var(--text); padding: 4px 14px; margin-bottom: 20px; }
.signup { display: flex; gap: 8px; max-width: 460px; margin: 24px auto 0; }
.signup .input { flex: 1; }
@media (max-width: 480px) { .signup { flex-direction: column; } }
.signup-done { color: var(--ok); margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
