/* TopRest child-theme header system — update-safe over Blocksy parent. */
:root{
  --tr-header-height:76px;
  --tr-header-mobile-height:62px;
  --tr-header-surface:#FFFFFF;
  --tr-header-glass:rgba(255,255,255,.86);
  --tr-header-border:rgba(199,229,238,.88);
  --tr-header-shadow:0 10px 34px rgba(6,47,79,.075);
}

/* The child header intentionally uses one visible row. */
#header [data-row="top"],
#header [data-row="bottom"]{display:none!important}

#header [data-row="middle"]{
  min-height:var(--tr-header-height);
  background:var(--tr-header-surface)!important;
  border-bottom:1px solid var(--tr-header-border);
  box-shadow:var(--tr-header-shadow);
  position:relative;
  z-index:101;
  transition:background-color .22s ease,box-shadow .22s ease,border-color .22s ease,backdrop-filter .22s ease;
}
#header [data-row="middle"]>div{
  min-height:var(--tr-header-height);
  background:transparent!important;
}
#header [data-row="middle"] .ct-container,
#header [data-row="middle"] .ct-container-fluid{
  width:min(100%,1440px);
  margin-inline:auto;
  padding-inline:clamp(18px,3vw,46px);
}

/* Brand mark */
#header .site-logo-container{display:flex;align-items:center;min-width:max-content}
#header .site-logo-container img{max-height:52px;width:auto;object-fit:contain}

/* Primary menu */
#header .menu{align-items:center}
#header .menu>li>a{
  min-height:44px;
  padding-inline:10px;
  color:#0D2B3E;
  font-size:14px;
  font-weight:700;
  letter-spacing:0;
  border-radius:10px;
  transition:color .18s ease,background-color .18s ease,transform .18s ease;
}
#header .menu>li>a:hover,
#header .menu>li.current-menu-item>a,
#header .menu>li.current-menu-ancestor>a{
  color:#087496;
  background:rgba(231,247,252,.76);
}
#header .menu>li>a:active{transform:translateY(1px)}

/* Search, account and cart share the same touch target. */
#header .ct-header-search,
#header .ct-account-item,
#header .ct-cart-item{
  min-width:42px;
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--tr-header-border);
  border-radius:12px;
  background:linear-gradient(180deg,#FFFFFF,#F4FBFD);
  color:#0D2B3E!important;
  box-shadow:0 4px 12px rgba(6,47,79,.045);
  transition:transform .18s ease,border-color .18s ease,background-color .18s ease,box-shadow .18s ease;
}
#header .ct-header-search:hover,
#header .ct-account-item:hover,
#header .ct-cart-item:hover{
  border-color:#87D0DF;
  background:#E7F7FC;
  color:#087496!important;
  box-shadow:0 7px 18px rgba(6,47,79,.075);
  transform:translateY(-1px);
}
#header .ct-cart-item .ct-cart-total{display:none!important}

/* Sticky state remains compact and readable. */
#header [data-sticky*="yes"] [data-row="middle"],
#header [data-sticky*="fixed"] [data-row="middle"]{
  background:rgba(255,255,255,.94)!important;
  -webkit-backdrop-filter:blur(16px) saturate(150%);
  backdrop-filter:blur(16px) saturate(150%);
  box-shadow:0 10px 30px rgba(6,47,79,.09);
}

/* QASF Hero mode: Hero starts at the top and this child header floats over it. */
body.qasf-header-over-hero #header{
  position:absolute!important;
  inset:0 0 auto 0;
  z-index:120;
  width:100%;
}
body.qasf-header-over-hero #header [data-row="middle"]{
  background:var(--tr-header-glass)!important;
  border-bottom-color:rgba(255,255,255,.52);
  box-shadow:0 1px 0 rgba(6,47,79,.06),0 10px 34px rgba(6,47,79,.045);
  -webkit-backdrop-filter:blur(16px) saturate(155%);
  backdrop-filter:blur(16px) saturate(155%);
}
body.qasf-header-over-hero #header [data-row="middle"]>div{background:transparent!important}

/* Mobile */
@media(max-width:999px){
  :root{--tr-header-height:68px}
  #header .site-logo-container img{max-height:40px}
  #header .ct-header-trigger,
  #header .ct-cart-item{
    min-width:42px;min-height:42px;border:1px solid var(--tr-header-border);border-radius:12px;
    background:linear-gradient(180deg,#FFFFFF,#F4FBFD);box-shadow:0 4px 12px rgba(6,47,79,.045)
  }
}
@media(max-width:689px){
  :root{--tr-header-height:var(--tr-header-mobile-height)}
  #header [data-row="middle"],#header [data-row="middle"]>div{min-height:var(--tr-header-mobile-height)}
  #header [data-row="middle"] .ct-container,
  #header [data-row="middle"] .ct-container-fluid{padding-inline:12px}
  #header .site-logo-container img{max-height:34px}
  #header .ct-header-trigger,#header .ct-cart-item{min-width:40px;min-height:40px;border-radius:11px}
  body.qasf-header-over-hero #header [data-row="middle"]{background:rgba(255,255,255,.91)!important}
}

@media(prefers-reduced-motion:reduce){
  #header *,#header *::before,#header *::after{transition:none!important}
}
