
/* ASN Hosting v2.6.1 — Adaptive Header Fit Repair */

/* Full-width shell: prevent clipping at common desktop widths */
.asn-header .asn-shell.asn-header-row,
.asn-header .asn-header-row{
  width:100%!important;
  max-width:none!important;
  box-sizing:border-box!important;
  padding-left:clamp(14px,2.2vw,34px)!important;
  padding-right:clamp(14px,2.2vw,34px)!important;
  overflow:visible!important;
}

/* Desktop base: compact and guaranteed to fit */
@media(min-width:1181px){
  .asn-header .asn-header-row{
    display:grid!important;
    grid-template-columns:170px minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:10px!important;
    min-height:78px!important;
  }
  .asn-header .asn-brand{
    width:160px!important;
    max-width:160px!important;
    min-width:0!important;
  }
  .asn-header .asn-brand img{
    max-width:160px!important;
    max-height:58px!important;
    width:auto!important;
    height:auto!important;
  }
  .asn-header .asn-nav-wrap{
    min-width:0!important;
    max-width:100%!important;
    overflow:visible!important;
    justify-content:center!important;
  }
  .asn-header .asn-primary-menu{
    display:flex!important;
    flex-wrap:nowrap!important;
    gap:0!important;
    min-width:0!important;
    max-width:100%!important;
  }
  .asn-header .asn-primary-menu>li>a,
  .asn-header .asn-nav-link{
    min-height:38px!important;
    padding:0 7px!important;
    font-size:11.5px!important;
    white-space:nowrap!important;
    min-width:0!important;
  }
  .asn-header .asn-header-actions{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:5px!important;
    min-width:0!important;
    max-width:430px!important;
    padding-left:8px!important;
  }
  .asn-header .asn-service-search-action,
  .asn-header .asn-domain-action,
  .asn-header .asn-btn-register,
  .asn-header .asn-register-action,
  .asn-header .asn-login-action,
  .asn-header .asn-account-action,
  .asn-header .asn-btn-primary{
    min-height:38px!important;
    height:38px!important;
    padding:0 10px!important;
    font-size:11.5px!important;
  }
  .asn-header .asn-cart{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
  }
}

/* 1181–1500: prioritize essentials. Domain search stays inside Domains navigation. */
@media(min-width:1181px) and (max-width:1500px){
  .asn-header .asn-domain-action{display:none!important}
  .asn-header .asn-header-actions{max-width:350px!important}
  .asn-header .asn-primary-menu>li>a,
  .asn-header .asn-nav-link{padding:0 6px!important;font-size:11px!important}
}

/* 1181–1320: Search Services becomes icon-only. */
@media(min-width:1181px) and (max-width:1320px){
  .asn-header .asn-service-search-action{
    width:38px!important;
    min-width:38px!important;
    padding:0!important;
  }
  .asn-header .asn-service-search-action span{display:none!important}
  .asn-header .asn-header-actions{max-width:280px!important}
}

/* Tablet: menu becomes hamburger before any crowding can happen */
@media(max-width:1180px){
  .asn-header .asn-header-row{
    display:grid!important;
    grid-template-columns:minmax(135px,160px) 1fr auto auto!important;
    align-items:center!important;
    gap:6px!important;
    min-height:70px!important;
  }
  .asn-header .asn-brand{
    width:145px!important;
    max-width:145px!important;
  }
  .asn-header .asn-brand img{
    max-width:145px!important;
    max-height:54px!important;
  }
  .asn-header .asn-nav-wrap{
    display:none!important;
    position:absolute!important;
    top:100%!important;
    left:10px!important;
    right:10px!important;
    z-index:99999!important;
    padding:8px!important;
    border:1px solid #d7e6ef!important;
    border-radius:0 0 14px 14px!important;
    background:#fff!important;
    box-shadow:0 18px 40px rgba(7,59,102,.16)!important;
  }
  .asn-header .asn-nav-wrap.is-open{display:block!important}
  .asn-header .asn-primary-menu{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:3px!important;
  }
  .asn-header .asn-primary-menu>li,
  .asn-header .asn-primary-menu>li>a,
  .asn-header .asn-nav-link{
    width:100%!important;
    min-width:0!important;
  }
  .asn-header .asn-primary-menu>li>a,
  .asn-header .asn-nav-link{
    justify-content:space-between!important;
    min-height:44px!important;
    padding:0 12px!important;
    font-size:13px!important;
    white-space:normal!important;
  }
  .asn-header .asn-header-actions{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:4px!important;
    min-width:0!important;
    max-width:none!important;
    padding-left:0!important;
    border-left:0!important;
  }
  .asn-header .asn-service-search-action,
  .asn-header .asn-domain-action{display:none!important}
  .asn-header .asn-btn-register,
  .asn-header .asn-register-action,
  .asn-header .asn-login-action,
  .asn-header .asn-account-action{
    min-height:38px!important;
    height:38px!important;
    padding:0 10px!important;
    font-size:11.5px!important;
  }
  .asn-header .asn-cart{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
  }
  .asn-header .asn-mobile-toggle{
    display:flex!important;
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    margin:0!important;
  }
}

/* Mobile: only essential actions stay in the row */
@media(max-width:720px){
  .asn-header .asn-header-row{
    grid-template-columns:minmax(112px,135px) 1fr auto auto!important;
    min-height:64px!important;
    padding-left:10px!important;
    padding-right:10px!important;
  }
  .asn-header .asn-brand{
    width:128px!important;
    max-width:128px!important;
  }
  .asn-header .asn-brand img{
    max-width:128px!important;
    max-height:48px!important;
  }
  .asn-header .asn-btn-register,
  .asn-header .asn-register-action,
  .asn-header .asn255-register,
  .asn-header .asn256-register-guard,
  .asn-header .asn255-register,
  .asn-header .asn255-register-guard{
    display:none!important;
  }
  .asn-header .asn-login-action,
  .asn-header .asn-account-action{
    min-height:36px!important;
    height:36px!important;
    padding:0 8px!important;
    font-size:11px!important;
  }
  .asn-header .asn-cart,
  .asn-header .asn-mobile-toggle{
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
  }
}

/* Very small phones */
@media(max-width:390px){
  .asn-header .asn-header-row{
    grid-template-columns:minmax(100px,120px) 1fr auto auto!important;
    gap:4px!important;
  }
  .asn-header .asn-brand{
    width:112px!important;
    max-width:112px!important;
  }
  .asn-header .asn-brand img{
    max-width:112px!important;
  }
}

/* Prevent any theme/menu item from forcing the row wider than viewport */
.asn-header,
.asn-header *{
  box-sizing:border-box!important;
}
.asn-header .asn-header-row,
.asn-header .asn-nav-wrap,
.asn-header .asn-primary-nav,
.asn-header .asn-primary-menu,
.asn-header .asn-header-actions{
  min-width:0!important;
}
.asn-header a,
.asn-header button{
  max-width:100%!important;
}

/* Generic fallback theme header: stop overflow even if ASN markup is not used */
header:not(.asn-header){
  overflow:visible!important;
}
header:not(.asn-header) .container,
header:not(.asn-header) .site-header-inner,
header:not(.asn-header) .header-inner{
  max-width:100%!important;
  width:100%!important;
  padding-left:clamp(12px,2vw,28px)!important;
  padding-right:clamp(12px,2vw,28px)!important;
  box-sizing:border-box!important;
}
@media(max-width:1180px){
  header:not(.asn-header) nav{max-width:100%!important}
}
