/* =========================================================================
 * GPS Astra Child — sitewide header (logo, primary nav, "Products" mega
 * menu, mobile off-canvas menu). Loaded on every page via wp_enqueue_
 * scripts in functions.php. All selectors are scoped under .gh-header /
 * .gh-offcanvas / .gh-mega / .gh-mega-backdrop / .gh-offcanvas-backdrop so
 * nothing here can leak into the rest of the site (same scoping discipline
 * as product-page.css under body.gps-pdp).
 * ========================================================================= */

:root{
  color-scheme: light;
  --red:#E70012; --gold:#F7B000; --ink:#0E0F11; --charcoal:#1B1D20; --charcoal-2:#232629;
  --slate:#5B6166; --paper:#F6F5F3; --paper-2:#EEECE8; --white:#FFFFFF;
  --line-light:rgba(255,255,255,.14); --line-dark:rgba(0,0,0,.09); --maxw:1320px;
  --gh-header-h:100px; --gh-header-h-mobile:72px;

  /* ====================================================================
   * HEADER THEME — these 5 variables are the only thing that changes if
   * the header ever goes back to a dark/black background. To flip it,
   * comment out this block and uncomment the "dark" block right below —
   * nothing else in this file needs to change.
   * ==================================================================== */
  --gh-bg: var(--white);
  --gh-fg: var(--ink);
  --gh-border: var(--line-dark);
  --gh-hamburger: var(--ink);
  --gh-hover-bg: rgba(0,0,0,.06);

  /* ---- Dark header variant — swap the block above for this one to revert ----
  --gh-bg: var(--ink);
  --gh-fg: var(--white);
  --gh-border: var(--line-light);
  --gh-hamburger: var(--white);
  --gh-hover-bg: rgba(255,255,255,.08);
  ------------------------------------------------------------------------ */
}

/* Scoped resets — only inside the header/menu components, never sitewide. */
.gh-header, .gh-header *,
.gh-offcanvas, .gh-offcanvas *,
.gh-mega, .gh-mega *,
.gh-offcanvas-backdrop, .gh-mega-backdrop {
  box-sizing: border-box;
}
.gh-header a, .gh-header button,
.gh-offcanvas a, .gh-offcanvas button,
.gh-mega a, .gh-mega button {
  text-decoration: none;
}
.gh-header button, .gh-offcanvas button, .gh-mega button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.gh-header button:active, .gh-header button:focus,
.gh-offcanvas button:active, .gh-offcanvas button:focus,
.gh-mega button:active, .gh-mega button:focus {
  background: none;
  outline: none;
}
.gh-header a, .gh-offcanvas a, .gh-mega a {
  -webkit-tap-highlight-color: transparent;
}

html.gh-scroll-lock, html.gh-scroll-lock body { overflow: hidden; }

/* ---------- Desktop header ---------- */
.gh-topbar{background:var(--ink);}
.gh-topbar-inner{max-width:var(--maxw);margin:0 auto;display:flex;align-items:center;justify-content:space-between;padding:0 32px;height:38px;gap:20px;}
.gh-topbar-left{display:flex;align-items:center;gap:24px;min-width:0;}
.gh-topbar-link{display:flex;align-items:center;gap:7px;color:rgba(255,255,255,.82);font-family:'Inter',sans-serif;font-size:12.5px;letter-spacing:.01em;white-space:nowrap;}
.gh-topbar-link svg{width:14px;height:14px;flex:none;}
.gh-topbar-link:hover{color:var(--gold);}
.gh-topbar-right{display:flex;align-items:center;flex:none;}
.gh-topbar-social{display:flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;color:rgba(255,255,255,.82);transition:background .15s ease,color .15s ease;}
.gh-topbar-social svg{width:16px;height:16px;}
.gh-topbar-social:hover{background:rgba(255,255,255,.12);color:var(--gold);}

.gh-header{position:sticky;top:0;z-index:9999;background:var(--gh-bg);border-bottom:1px solid var(--gh-border);}
.gh-bar{max-width:var(--maxw);margin:0 auto;display:flex;align-items:center;justify-content:space-between;padding:0 32px;height:var(--gh-header-h);gap:28px;}
.gh-logo{display:flex;align-items:center;flex:none;}
.gh-logo img{height:76px;width:auto;display:block;}
.gh-nav{display:flex;align-items:center;gap:34px;margin-left:auto;}
.gh-nav-item{}
.gh-nav-link{display:flex;align-items:center;gap:7px;font-family:'Archivo',sans-serif;font-weight:700;font-size:13px;letter-spacing:.04em;text-transform:uppercase;color:var(--gh-fg);padding:30px 2px;line-height:inherit;position:relative;}
.gh-header button.gh-nav-link{padding:30px 2px;}
.gh-nav-link:hover,.gh-nav-link:active,.gh-nav-link:focus{color:var(--red);}
.gh-products-item.is-open .gh-nav-link{color:var(--red);}
.gh-nav-link .gh-caret{width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .2s ease;margin-top:-5px;flex:none;}
.gh-products-item.is-open .gh-caret{transform:rotate(-135deg);margin-top:3px;}
.gh-nav-link::after{content:'';position:absolute;left:2px;right:2px;bottom:24px;height:2px;background:var(--red);transform:scaleX(0);transition:transform .18s ease;}
.gh-nav-link:hover::after,.gh-products-item.is-open .gh-nav-link::after{transform:scaleX(1);}
.gh-right{display:flex;align-items:center;gap:18px;flex:none;}
.gh-search{position:relative;display:flex;align-items:center;}
.gh-search-toggle{width:38px;height:38px;display:flex;align-items:center;justify-content:center;border-radius:50%;color:var(--gh-fg);flex:none;}
.gh-search-toggle svg{width:19px;height:19px;}
.gh-search-toggle:hover{background:var(--gh-hover-bg);}
.gh-search-form{position:absolute;right:0;top:calc(100% + 14px);width:280px;background:var(--white);border:1px solid var(--line-dark);border-radius:6px;box-shadow:0 16px 32px rgba(0,0,0,.14);padding:8px;display:none;z-index:120;}
.gh-search.is-open .gh-search-form{display:block;}
.gh-search-input{width:100%;box-sizing:border-box;border:1px solid var(--line-dark);border-radius:4px;padding:9px 12px;font-family:'Inter',sans-serif;font-size:13.5px;color:var(--ink);background:var(--paper);}
.gh-search-input:focus{outline:none;border-color:var(--red);}

.gh-cta{font-family:'Archivo',sans-serif;font-weight:700;font-size:12.5px;letter-spacing:.04em;text-transform:uppercase;color:var(--white);background:var(--red);padding:13px 22px;border-radius:4px;transition:background .15s ease,color .15s ease;white-space:nowrap;display:inline-block;}
.gh-cta:hover{background:#c40010;color:var(--gold);}

/* Mega menu ("Products") */
.gh-mega{display:none;position:absolute;left:0;right:0;top:100%;background:var(--white);border-top:1px solid var(--line-dark);box-shadow:0 24px 48px rgba(0,0,0,.18);z-index:95;}
.gh-products-item.is-open .gh-mega{display:block;}
.gh-mega-inner{max-width:var(--maxw);margin:0 auto;padding:40px 32px 44px;display:grid;grid-template-columns:1.1fr 1fr .9fr;gap:48px;}
.gh-mega-col-title{font-family:'Archivo',sans-serif;font-weight:800;font-size:11.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--slate);margin:0 0 16px;}
.gh-mega-parent{display:flex;align-items:center;justify-content:space-between;padding-bottom:14px;margin-bottom:10px;border-bottom:1px solid var(--line-dark);}
.gh-mega-parent-link{font-family:'Archivo',sans-serif;font-weight:800;font-size:19px;color:var(--ink);}
.gh-mega-parent-link:hover{color:var(--red);}
.gh-mega-parent-count{font-family:'Inter',sans-serif;font-weight:600;font-size:12px;color:var(--slate);white-space:nowrap;}
.gh-mega-list{display:flex;flex-direction:column;gap:2px;}
.gh-mega-link{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 10px;font-family:'Inter',sans-serif;font-weight:600;font-size:14.5px;color:var(--charcoal);border-radius:4px;}
.gh-mega-link:hover{background:var(--paper);color:var(--red);}
.gh-mega-link-count{font-size:12px;color:var(--slate);font-weight:500;white-space:nowrap;}
.gh-promo{border-radius:10px;overflow:hidden;position:relative;background:var(--ink);min-height:230px;display:flex;align-items:flex-end;}
.gh-promo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.5;}
.gh-promo-overlay{position:relative;z-index:1;padding:22px;background:linear-gradient(0deg,rgba(14,15,17,.94),rgba(14,15,17,.05) 80%);width:100%;}
.gh-promo-eyebrow{font-family:'Archivo',sans-serif;font-weight:700;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--gold);margin-bottom:6px;}
.gh-promo-title{font-family:'Archivo',sans-serif;font-weight:800;font-size:21px;color:var(--white);margin:0 0 12px;line-height:1.15;}
.gh-promo-link{display:inline-flex;align-items:center;gap:6px;font-family:'Archivo',sans-serif;font-weight:700;font-size:12.5px;letter-spacing:.03em;text-transform:uppercase;color:var(--white);}
.gh-promo-link svg{width:13px;height:13px;}
.gh-mega-backdrop{display:none;position:fixed;left:0;right:0;bottom:0;top:var(--gh-header-h);background:transparent;z-index:90;}
.gh-products-item.is-open .gh-mega-backdrop{display:block;}

/* ---------- Mobile bar + hamburger ---------- */
.gh-mobile-bar{display:none;align-items:center;gap:14px;flex:none;}
.gh-hamburger{width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:4px;flex:none;}
.gh-hamburger:hover{background:var(--gh-hover-bg);}
.gh-hamburger-bars{position:relative;width:20px;height:14px;}
.gh-hamburger-bars span{position:absolute;left:0;right:0;height:2px;background:var(--gh-hamburger);border-radius:1px;}
.gh-hamburger-bars span:nth-child(1){top:0;}
.gh-hamburger-bars span:nth-child(2){top:6px;}
.gh-hamburger-bars span:nth-child(3){top:12px;}

@media (max-width:900px){
  .gh-nav,.gh-right{display:none;}
  .gh-bar{height:var(--gh-header-h-mobile);padding:0 18px;}
  .gh-logo img{height:54px;}
  .gh-mobile-bar{display:flex;}
  .gh-topbar-inner{padding:0 18px;height:34px;gap:12px;}
  .gh-topbar-left{gap:16px;}
  .gh-topbar-text{display:none;}
  .gh-topbar-link svg{width:15px;height:15px;}
}

/* ---------- Mobile off-canvas menu ---------- */
.gh-offcanvas-backdrop{position:fixed;inset:0;background:rgba(14,15,17,.5);z-index:9998;opacity:0;pointer-events:none;transition:opacity .22s ease;}
.gh-offcanvas-backdrop.is-open{opacity:1;pointer-events:auto;}
.gh-offcanvas{position:fixed;top:0;bottom:0;left:0;width:86%;max-width:360px;background:var(--white);z-index:10000;transform:translateX(-100%);transition:transform .25s ease;display:flex;flex-direction:column;box-shadow:16px 0 40px rgba(0,0,0,.22);}
.gh-offcanvas.is-open{transform:translateX(0);}
.gh-offcanvas-head{display:flex;align-items:center;justify-content:space-between;padding:16px 10px 16px 18px;border-bottom:1px solid var(--line-dark);flex:none;}
.gh-offcanvas-head img{height:26px;}
.gh-offcanvas-close{width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:4px;color:var(--slate);}
.gh-offcanvas-close:hover{background:var(--paper);}
.gh-offcanvas-close svg{width:18px;height:18px;}
.gh-offcanvas-body{flex:1;overflow-y:auto;padding:6px 0;}
.gh-oc-search{position:relative;margin:10px 18px 14px;}
.gh-oc-search-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--slate);pointer-events:none;}
.gh-oc-search-input{width:100%;box-sizing:border-box;border:1px solid var(--line-dark);border-radius:6px;padding:10px 12px 10px 36px;font-family:'Inter',sans-serif;font-size:13.5px;color:var(--ink);background:var(--paper);}
.gh-oc-search-input:focus{outline:none;border-color:var(--red);}

.gh-oc-row{display:flex;align-items:stretch;border-bottom:1px solid var(--line-dark);}
.gh-oc-l1-link{flex:1;padding:15px 18px;font-family:'Archivo',sans-serif;font-weight:700;font-size:14.5px;line-height:inherit;color:var(--ink);}
.gh-oc-l1-link:active,.gh-oc-l1-link:focus{color:var(--red);}
.gh-offcanvas button.gh-oc-l1-link{padding:15px 18px;}
.gh-oc-chev{width:48px;display:flex;align-items:center;justify-content:center;color:var(--slate);flex:none;}
.gh-oc-chev-icon{width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .2s ease;}
.gh-oc-chev.is-open .gh-oc-chev-icon{transform:rotate(-135deg);}
.gh-oc-sub{overflow:hidden;max-height:0;transition:max-height .25s ease;background:var(--paper);}
.gh-oc-sub.is-open{max-height:640px;}
.gh-oc-sub .gh-oc-sub.is-open{max-height:220px;}
.gh-oc-sub-link{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 18px 12px 34px;font-family:'Inter',sans-serif;font-weight:600;font-size:14px;color:var(--charcoal);}
.gh-oc-sub-link:hover{color:var(--red);}
.gh-oc-sub-link-count{font-size:12px;color:var(--slate);font-weight:500;white-space:nowrap;}
.gh-oc-flat-link{flex:1;padding:15px 18px;font-family:'Archivo',sans-serif;font-weight:700;font-size:14.5px;color:var(--ink);}
.gh-offcanvas-foot{padding:16px 18px;border-top:1px solid var(--line-dark);flex:none;}
.gh-oc-contact{display:flex;flex-direction:column;gap:2px;margin-bottom:14px;}
.gh-oc-contact-link{display:flex;align-items:center;gap:10px;padding:8px 2px;color:var(--slate);font-family:'Inter',sans-serif;font-weight:500;font-size:13.5px;}
.gh-oc-contact-link svg{width:16px;height:16px;flex:none;color:var(--ink);}
.gh-oc-contact-link:hover{color:var(--red);}
.gh-oc-contact-link:hover svg{color:var(--red);}
.gh-offcanvas-foot .gh-cta{display:block;text-align:center;}
