/* TradesFolks 18.4.17
   Reference-matched utility bar + Compare/Cart alignment.
   No generated imagery. No public/ dependency. */

/* One consistent horizontal rail for all desktop header rows */
@media (min-width:1024px){
  .site-header.premium-header{
    --tf-rail: min(1920px, calc(100% - 48px));
  }
  .site-header.premium-header .utility-bar .utility-inner,
  .site-header.premium-header .header-main-inner,
  .site-header.premium-header .primary-nav .primary-nav-inner,
  .site-header.premium-header .category-nav .category-nav-inner{
    width:var(--tf-rail)!important;
    max-width:none!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }

  /* TOP BAR — keep every item on one optical baseline */
  .site-header.premium-header .utility-bar{
    min-height:44px!important;
    height:44px!important;
    overflow:hidden!important;
  }
  .site-header.premium-header .utility-bar .utility-inner{
    min-height:44px!important;
    height:44px!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:22px!important;
  }
  .site-header.premium-header .utility-left,
  .site-header.premium-header .utility-right{
    min-width:0!important;
    height:44px!important;
    display:flex!important;
    align-items:center!important;
  }
  .site-header.premium-header .utility-right{
    margin-left:auto!important;
    justify-content:flex-end!important;
    gap:28px!important;
    flex-wrap:nowrap!important;
  }
  .site-header.premium-header .utility-right > *,
  .site-header.premium-header .utility-right a{
    margin:0!important;
    position:static!important;
    transform:none!important;
    align-self:center!important;
    line-height:1!important;
    white-space:nowrap!important;
  }
  .site-header.premium-header .utility-bar .tf-utility-seller-cta{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:36px!important;
    height:36px!important;
    padding:0 17px!important;
    border-radius:9px!important;
    font-weight:800!important;
    line-height:36px!important;
  }

  /* MAIN ACTIONS — Compare and Cart must be identical siblings */
  .site-header.premium-header .header-actions{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:12px!important;
    height:56px!important;
    margin:0!important;
    padding:0!important;
  }
  .site-header.premium-header .header-actions > *{
    align-self:center!important;
    margin-top:0!important;
    margin-bottom:0!important;
    top:auto!important;
    bottom:auto!important;
    transform:none!important;
  }

  /* Normalize both dark action boxes even if legacy selectors differ */
  .site-header.premium-header .header-actions .compare-btn,
  .site-header.premium-header .header-actions .cart-btn,
  .site-header.premium-header .header-actions a[href*="compare"],
  .site-header.premium-header .header-actions a[href*="cart"]{
    box-sizing:border-box!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:10px!important;
    min-height:52px!important;
    height:52px!important;
    padding:0 18px!important;
    border-radius:14px!important;
    line-height:1!important;
    vertical-align:middle!important;
    white-space:nowrap!important;
  }

  /* Cart internals should remain inline; prevent yellow label from drifting */
  .site-header.premium-header .header-actions .cart-btn > *,
  .site-header.premium-header .header-actions a[href*="cart"] > *,
  .site-header.premium-header .header-actions .compare-btn > *,
  .site-header.premium-header .header-actions a[href*="compare"] > *{
    position:static!important;
    transform:none!important;
    margin-top:0!important;
    margin-bottom:0!important;
    align-self:center!important;
  }

  /* Count badges: same geometry and center */
  .site-header.premium-header .header-actions .count,
  .site-header.premium-header .header-actions .badge,
  .site-header.premium-header .header-actions [class*="count"],
  .site-header.premium-header .header-actions [class*="badge"]{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:30px!important;
    min-width:30px!important;
    height:30px!important;
    min-height:30px!important;
    padding:0!important;
    border-radius:999px!important;
    line-height:30px!important;
  }
}

/* Laptop widths: reduce gaps instead of allowing wrapping/drift */
@media (min-width:1024px) and (max-width:1499px){
  .site-header.premium-header{--tf-rail:calc(100% - 32px)}
  .site-header.premium-header .utility-bar .utility-inner{gap:14px!important}
  .site-header.premium-header .utility-right{gap:20px!important}
  .site-header.premium-header .header-actions{gap:9px!important}
  .site-header.premium-header .header-actions .compare-btn,
  .site-header.premium-header .header-actions .cart-btn,
  .site-header.premium-header .header-actions a[href*="compare"],
  .site-header.premium-header .header-actions a[href*="cart"]{
    height:50px!important;
    min-height:50px!important;
    padding-inline:15px!important;
    border-radius:13px!important;
  }
}

/* Existing mobile/app-like header remains authoritative. */
@media (max-width:1023px){
  .site-header.premium-header .utility-right,
  .site-header.premium-header .header-actions{
    transform:none!important;
  }
}
