/* Division route-bar + product-nav under shared Header (.site-header). Header owns primary nav. */
:root{--header-offset:140px;--route-height:64px}
html{scroll-padding-top:calc(var(--header-offset) + var(--route-height) + 24px)}

/* Bridge: keep route-bar under sticky Header; Header JS sets --header-offset. */
/* Keep shared Header above route-bar even when Astro scopes Header styles. */
html body header.site-header{z-index:100}
body .uds-route-bar{position:sticky;top:var(--header-offset);z-index:90;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:0 24px;min-height:64px;padding:8px 6vw;background:#0e2c42f7;backdrop-filter:blur(12px);border-bottom:1px solid #ffffff24;color:#e8f0f5}
body .uds-route-bar nav{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;margin:0;font-size:13px}
body .uds-route-bar a{display:inline-flex;align-items:center;min-height:40px;text-decoration:none;padding:4px 0;color:inherit}
body .uds-route-bar [aria-current]{color:#a7bacb}
.uds-back{margin-left:auto!important}
.uds-back a{border:1px solid #6f8b9f;padding:7px 12px!important;margin-left:4px}
.uds-route-bar a:hover{color:#fff!important;background:#ffffff0c}
body .uds-route-bar a:focus-visible{outline:3px solid #ef4677;outline-offset:4px}
body .product-nav{top:calc(var(--header-offset) + 64px);z-index:80}

@media(max-width:860px){
  :root{--route-height:116px}
  body .uds-route-bar{position:relative;top:auto;gap:5px;padding:10px 6vw}
  body .uds-back{margin-left:0!important}
  body .uds-route-bar nav{font-size:12px}
  body .product-nav{top:var(--header-offset)}
}

body.category-scaffold .uds-route-bar{max-width:none;margin:0;width:100%}
body.category-scaffold .uds-crumbs a{border:0;background:transparent}
body.category-scaffold{padding:0}
body.category-scaffold main{padding:32px 6vw}
body .uds-route-bar,body .uds-route-bar *{box-sizing:border-box}

/* Immersive overlay header (body.immersive): Header is fixed/out of flow.
   Keep the route bar readable below chrome; let full-bleed dark heroes extend underneath. */
body.immersive > .uds-route-bar{
  margin-top:var(--header-offset,112px);
}
body.immersive > main > .division-hero:first-child,
body.immersive > main > .ocean:first-child,
body.immersive > main > .intro:first-child{
  margin-top:calc(-1 * (var(--header-offset,112px) + var(--route-height,64px)));
  padding-top:calc(var(--header-offset,112px) + var(--route-height,64px) + 2.75rem);
  box-sizing:border-box;
}
/* Scaffold WITHOUT a real top hero — keep main clear of chrome underlap.
   Scaffold WITH .division-hero / .intro / .ocean first-child uses the pull rules above. */
body.immersive.category-scaffold > main:not(:has(> .division-hero:first-child, > .intro:first-child, > .ocean:first-child)){
  margin-top:0;
}
/* Full-bleed index hero: drop main inset so photography reaches the viewport edges. */
body.category-scaffold main:has(> .division-hero:first-child),
body.category-scaffold main:has(> .intro:first-child),
body.category-scaffold main:has(> .ocean:first-child){
  padding-top:0;
  padding-inline:0;
  padding-right:0;
  margin-inline:0;
  width:100%;
  max-width:none;
  overflow-x:clip;
}
body.category-scaffold main:has(> .division-hero:first-child) > :not(.division-hero),
body.category-scaffold main:has(> .intro:first-child) > :not(.intro),
body.category-scaffold main:has(> .ocean:first-child) > :not(.ocean){
  padding-inline:6vw;
}
body.category-scaffold main:has(> .division-hero:first-child) > .division-hero + *,
body.category-scaffold main:has(> .intro:first-child) > .intro + *,
body.category-scaffold main:has(> .ocean:first-child) > .ocean + *{
  padding-top:32px;
}

@media(max-width:860px){
  /* Mobile route-bar is relative (not sticky); clear fixed header without hero underlap. */
  body.immersive > .uds-route-bar{
    margin-top:var(--header-offset,64px);
  }
  body.immersive > main > .division-hero:first-child,
  body.immersive > main > .ocean:first-child,
  body.immersive > main > .intro:first-child{
    margin-top:0;
    padding-top:clamp(2.5rem,8vw,4rem);
  }
}
