/* ============================================================
   Thermawool — components.css
   SINGLE SOURCE OF TRUTH for the shared HEADER (topbar + nav)
   and FOOTER. Link this on EVERY page, AFTER brand.css.
   The markup for these regions must be IDENTICAL on every page —
   copy the canonical blocks verbatim (see DESIGN.md §0, rule 4).
   Colours come from brand.css tokens only — never hard-code a hex.
   ============================================================ */

/* Layout stability — always reserve the vertical scrollbar gutter so content
   never shifts horizontally when page height changes (e.g. switching product
   tabs, or short vs tall pages). Keeps header/footer position identical on
   every page and in every state. */
html { scrollbar-gutter: stable; }

/* ── TOPBAR ───────────────────────────────────────────────── */
.topbar { background: var(--charcoal); height: 38px; display: flex; align-items: center; justify-content: flex-end; padding: 0 32px; gap: 22px; }
.topbar a { color: rgba(255,255,255,.55); font-family: var(--font-body); font-size: 12px; font-weight: 500; letter-spacing: .3px; text-decoration: none; display: flex; align-items: center; gap: 5px; transition: color .2s; }
.topbar a:hover { color: #fff; }
.topbar a svg { width: 13px; height: 13px; fill: currentColor; }
.topbar-sep { width: 1px; height: 13px; background: rgba(255,255,255,.16); }

/* ── NAV ──────────────────────────────────────────────────── */
.nav { background: rgba(255,255,255,.97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 2px 10px rgba(46,42,40,.07); position: sticky; top: 0; z-index: 100; height: 74px; display: flex; align-items: center; padding: 0 32px; transition: box-shadow .3s; }
.nav.scrolled { box-shadow: 0 4px 20px rgba(46,42,40,.12); }
.nav-inner { max-width: 1280px; width: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.logo-wrap, .logo { text-decoration: none; display: flex; align-items: center; }
.logo-wrap img, .logo img { height: 46px; display: block; }
.nav-links { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-item > a { display: flex; align-items: center; gap: 4px; padding: 0 14px; height: 74px; color: var(--charcoal); font-family: var(--font-body); text-decoration: none; font-size: 13px; font-weight: 600; border-bottom: 3px solid transparent; transition: color .2s, border-color .2s; white-space: nowrap; }
.nav-item > a svg { width: 10px; height: 10px; fill: currentColor; opacity: .5; }
.nav-item > a:hover { color: var(--brand); border-bottom-color: var(--brand); }
.nav-drop { display: none; position: absolute; top: 100%; left: 0; min-width: 210px; background: #fff; border-top: 3px solid var(--brand); box-shadow: 0 6px 24px rgba(46,42,40,.1); z-index: 200; }
.nav-item:hover .nav-drop { display: block; }
.nav-drop a { display: block; padding: 12px 20px; font-family: var(--font-body); font-size: 13px; color: var(--charcoal); text-decoration: none; border-bottom: 1px solid var(--border); transition: background .15s, color .15s; }
.nav-drop a:last-child { border-bottom: none; }
.nav-drop a:hover { background: var(--light); color: var(--brand); }
/* Product Range — variant flyout under each family */
.nav-drop .nav-sub { position: relative; }
.nav-drop .nav-sub > .nav-sub-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav-drop .nav-sub > .nav-sub-head .nav-sub-caret { color: var(--mid); font-size: 15px; line-height: 1; transition: transform .2s, color .2s; }
.nav-drop .nav-sub:hover > .nav-sub-head { background: var(--light); color: var(--brand); }
.nav-drop .nav-sub:hover > .nav-sub-head .nav-sub-caret { color: var(--brand); transform: translateX(3px); }
.nav-submenu { display: none; position: absolute; left: 100%; top: -3px; min-width: 215px; background: #fff; border-top: 3px solid var(--brand); box-shadow: 0 6px 24px rgba(46,42,40,.12); }
.nav-drop .nav-sub:hover > .nav-submenu { display: block; }
.nav-submenu a { display: block; padding: 12px 20px; font-family: var(--font-body); font-size: 13px; color: var(--charcoal); text-decoration: none; border-bottom: 1px solid var(--border); transition: background .15s, color .15s; white-space: nowrap; }
.nav-submenu a:last-child { border-bottom: none; }
.nav-submenu a:hover { background: var(--light); color: var(--brand); }
.nav-cta-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--brand); color: #fff; font-family: var(--font-body); text-decoration: none; font-size: 13px; font-weight: 700; padding: 11px 22px; border-radius: var(--r-md, 4px); transition: background .2s, transform .15s; white-space: nowrap; }
.nav-cta-btn:hover { background: var(--brand-dark); transform: translateY(-1px); }
.nav-cta-btn svg { width: 13px; height: 13px; fill: #fff; }

/* ── FOOTER ───────────────────────────────────────────────── */
footer { background: var(--charcoal); }
.ft-top { max-width: 1280px; margin: 0 auto; padding: 56px 32px 42px; display: grid; grid-template-columns: 240px repeat(3, 1fr); gap: 44px; border-bottom: 1px solid rgba(255,255,255,.08); }
.ft-brand-img { height: 36px; filter: brightness(0) invert(1); opacity: .6; display: block; margin-bottom: 16px; }
.ft-brand p { font-family: var(--font-body); font-size: 13px; color: rgba(255,255,255,.42); line-height: 1.7; }
.ft-col h4 { font-family: var(--font-body); font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.3); margin-bottom: 16px; }
.ft-col ul { list-style: none; margin: 0; padding: 0; }
.ft-col ul li { margin-bottom: 10px; }
.ft-col ul li a { font-family: var(--font-body); font-size: 13.5px; color: rgba(255,255,255,.5); text-decoration: none; transition: color .2s; }
.ft-col ul li a:hover { color: #fff; }
.ft-copy-bar { background: var(--brand); }
.ft-copy-inner { max-width: 1280px; margin: 0 auto; padding: 14px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.ft-copy { font-family: var(--font-body); font-size: 12px; color: rgba(255,255,255,.8); }
.ft-end { display: flex; align-items: center; gap: 18px; }
.ft-socs { display: flex; gap: 10px; }
.ft-soc { width: 32px; height: 32px; border-radius: var(--r-md, 4px); background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; text-decoration: none; transition: background .2s; }
.ft-soc:hover { background: rgba(255,255,255,.3); }
.ft-soc svg { width: 15px; height: 15px; fill: #fff; }
.ft-company { font-family: var(--font-body); font-size: 12px; font-weight: 600; color: rgba(255,255,255,.8); letter-spacing: .3px; }

/* ── Shared header/footer responsive ──────────────────────── */
@media (max-width: 1024px) { .ft-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 980px)  { .nav-links { display: none; } }
@media (max-width: 768px)  { .ft-top { grid-template-columns: 1fr; } .ft-copy-inner { flex-direction: column; align-items: flex-start; gap: 14px; } }
