/* ISOGRID shared chrome — the header, footer and typefaces every page
   other than the homepage uses (product pages, checkout, order pages,
   legal pages, 404). The homepage keeps its own patch-bay header inline;
   the values here mirror its mobile nav, cart button and footer, so if
   those change in production_index.html, change them here too.

   Typeface roles (same as the homepage):
     Oxanium       headings
     Space Mono    body copy, labels, buttons   (loaded from Google Fonts
                                                  by each page's <head>)
     Vibrocentric  spec values, lists, footer */

@font-face {
  font-family: 'Vibrocentric';
  src: url('https://s3.us-east-1.amazonaws.com/assets.isogrid.io/fonts/vibrocentric-regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vibrocentric';
  src: url('https://s3.us-east-1.amazonaws.com/assets.isogrid.io/fonts/vibrocentric-bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Oxanium';
  src: url('https://s3.us-east-1.amazonaws.com/assets.isogrid.io/fonts/oxanium-bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --ig-head: 'Oxanium', 'Space Mono', monospace;
  --ig-mono: 'Space Mono', monospace;
  --ig-spec: 'Vibrocentric', 'Space Mono', monospace;
  --ig-header-h: 66px;
}

/* ── Skip link ─ first focusable thing on every page; appears on Tab ── */
.skip-link {
  position: absolute; top: -100px; left: 12px; z-index: 1000;
  background: #ff2d2d; color: #060606; font-family: var(--ig-mono); font-size: 13px; font-weight: 700;
  padding: 10px 18px; border-radius: 2px; text-decoration: none; transition: top .15s ease;
}
.skip-link:focus { top: 12px; }
#main { scroll-margin-top: var(--ig-header-h); }

/* ── Header ─────────────────────────────────────────────────────── */
.ig-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--ig-header-h);
  display: flex; align-items: center; gap: 24px;
  padding: 0 28px;
  background: linear-gradient(180deg, #0e0e0e, #0a0a0a);
  border-bottom: 1px solid #181818;
  font-family: var(--ig-mono);
}
.ig-header .ig-logo { display: block; line-height: 0; border-radius: 2px; flex-shrink: 0; }
.ig-header .ig-logo img {
  display: block; height: 32px; width: auto;
  opacity: 0.85; filter: brightness(1.15);
  transition: opacity 0.2s, filter 0.2s;
}
.ig-header .ig-logo:hover img { opacity: 1; filter: brightness(1.35); }
.ig-nav {
  display: flex; align-items: center; gap: clamp(20px, 5vw, 72px);
  margin: 0 auto;
  font-size: 10px; font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase;
}
.ig-nav a { color: #e0e0e0; text-decoration: none; padding: 8px 0; transition: color 0.15s; }
.ig-nav a:hover { color: #fff; }
.ig-nav a:active, .ig-nav a[aria-current="page"] { color: #ff2d2d; }
.ig-header a:focus-visible, .ig-header button:focus-visible,
.site-footer a:focus-visible { outline: 2px solid #ff2d2d; outline-offset: 3px; }
/* Keeps the nav centred on pages with no cart button */
.ig-header-spacer { width: 36px; flex-shrink: 0; }

.ig-header .cart-btn {
  position: relative; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  background: transparent; border: 1px solid #1e1e1e; color: #a0a0a0;
  cursor: pointer; transition: border-color 0.18s, color 0.18s;
}
.ig-header .cart-btn:hover { border-color: rgba(255,45,45,0.5); color: #e8e8e8; }
.ig-header .cart-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 16px; height: 16px; padding: 0 3px;
  background: #ff2d2d; color: #fff;
  font-family: var(--ig-mono); font-size: 9px; font-weight: 700;
  line-height: 16px; text-align: center; border-radius: 8px;
}
.ig-header .cart-count:empty { display: none; }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid #101010;
  padding: 60px 100px;
  background: #060606;
  text-align: left;
}
.site-footer a { color: inherit; text-decoration: none; }
.footer-inner { max-width: 1400px; margin: 0 auto; }
.footer-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 28px;
  padding-bottom: 32px; margin-bottom: 32px;
  border-bottom: 1px solid #0e0e0e;
}
.footer-logo { display: block; height: 20px; width: auto; opacity: 0.45; filter: brightness(2); }
.footer-links {
  display: flex; gap: 32px;
  font-family: var(--ig-spec); font-size: 11px; letter-spacing: 0.2em; color: #808080;
}
.footer-links a { transition: color 0.2s; }
.footer-links a:hover { color: #a0a0a0; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #121212; color: #787878; transition: all 0.2s;
}
.footer-social a:hover { border-color: #383838; color: #808080; }
.footer-social svg { width: 13px; height: 13px; fill: currentColor; }
.footer-copy {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px 24px;
  font-family: var(--ig-spec); font-size: 11px; letter-spacing: 0.1em; color: #808080;
}

@media (max-width: 900px) {
  :root { --ig-header-h: 52px; }
  .ig-header { padding: 0 20px; gap: 16px; background: #0a0a0a; }
  .ig-header .ig-logo img { height: 22px; }
  .ig-nav { margin: 0 0 0 auto; gap: 20px; font-size: 11px; letter-spacing: 0.18em; }
  .ig-nav a { color: #808080; }
  .ig-nav a:hover { color: #c0c0c0; }
  .ig-header-spacer { display: none; }
  .site-footer { padding: 48px 28px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; row-gap: 12px; }
}

/* ── Type roles ─────────────────────────────────────────────────── */
h1, .price { font-family: var(--ig-head); }
.spec-list .row span:last-child, .section ul li, .not-included { font-family: var(--ig-spec); }

/* ── Cart drawer pushes the page aside (product pages) ──────────────
   The drawer is 360px, fixed to the right edge. While it's open the body
   gets .ig-cart-open (set in openPanel/closePanel) and gives up that
   strip, so the header, content and footer narrow and re-centre next to
   the cart and nothing sits underneath it. On phones the drawer is nearly
   the full screen, so it stays an overlay there. */
body { transition: padding-right 0.3s ease; }
@media (min-width: 761px) {
  body.ig-cart-open { padding-right: 360px; }
}
/* Not enough room left for two columns beside the cart: stack them. */
@media (min-width: 761px) and (max-width: 1320px) {
  body.ig-cart-open .pre-layout { grid-template-columns: 1fr; gap: 32px; }
  body.ig-cart-open .pre-media { position: static; max-width: 420px; }
  body.ig-cart-open .col-pair,
  body.ig-cart-open .kb-grid { grid-template-columns: 1fr; gap: 24px; }
  body.ig-cart-open .page-wrap { padding-left: 24px; padding-right: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
}
