/* MM nav follow-up 20261203a — nav/header N1-N7 only (no content items). Does not edit protected files. */

/* 1. Desktop menu on one even line (inline insurance so static pages don't depend on a stale nav-tap.css?v=20261130). */
@media (min-width:992px){
  #mm-chrome .mm-nav li.has-sub{display:flex!important;align-items:center;flex-wrap:nowrap}
  #mm-chrome .mm-nav li.has-sub>a{flex:0 1 auto;padding-right:1px!important}
  #mm-chrome .mm-nav li.has-sub>.mm-sub-toggle{display:inline-flex!important;align-items:center;align-self:stretch;margin:0!important;padding:0 9px 0 3px!important;line-height:1!important;background:transparent!important;border:0!important;color:inherit!important;cursor:pointer}
  #mm-chrome .mm-nav .mm-sub li.has-sub>a{flex:1 1 auto}
  #mm-chrome .mm-nav .mm-sub li.has-sub>.mm-sub-toggle{padding:0 14px 0 4px!important}
}
@media (max-width:991px){
  #mm-chrome .mm-nav .mm-sub li.has-sub{display:flex;flex-wrap:wrap;align-items:center}
  #mm-chrome .mm-nav .mm-sub li.has-sub>a{flex:1 1 auto}
  #mm-chrome .mm-nav .mm-sub li.has-sub>.mm-sub-toggle{flex:0 0 auto;padding:10px 16px!important;margin:0!important}
  #mm-chrome .mm-nav .mm-sub li.has-sub>.mm-sub{flex:1 1 100%}
}

/* 2. Phone search: first tap opens a visible input (live CSS hides it even when .is-open and submits empty /?s=). */
@media (max-width:991px){
  #mm-chrome .mm-search.is-open,
  header.mm-chrome .mm-search.is-open{
    position:relative;
    overflow:visible;
  }
  #mm-chrome:has(.mm-search.is-open),
  header.mm-chrome:has(.mm-search.is-open),
  #mm-chrome:has(.mm-search.is-open) .mm-tools,
  #mm-chrome:has(.mm-search.is-open) .mm-chrome-inner{
    overflow:visible!important;
  }
  #mm-chrome .mm-search.is-open input,
  #mm-chrome .mm-search.is-open input[type="search"],
  #mm-chrome .mm-search.is-open input[type="text"],
  header.mm-chrome .mm-search.is-open input,
  header.mm-chrome .mm-search.is-open input[type="search"]{
    display:block!important;
    position:absolute!important;
    /* Sit 8px left of the search button; width fills back to a 12px page margin.
       188 = 12 left + 8 gap + 44 search + 12 + 44 cart + 12 + 44 burger + 12 right pad.
       (A 44px cart + right:52px + width:220 previously put the input at x=-6.) */
    right:calc(100% + 8px)!important;
    left:auto!important;
    top:50%!important;
    transform:translateY(-50%)!important;
    width:calc(100vw - 188px)!important;
    min-width:120px!important;
    max-width:calc(100vw - 188px)!important;
    height:40px!important;
    opacity:1!important;
    padding:0 10px!important;
    margin:0!important;
    border:1px solid #555!important;
    border-radius:2px!important;
    background:#111!important;
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    font:15px/1.2 var(--mm-sans,"MM Karla",Karla,Helvetica,Arial,sans-serif)!important;
    pointer-events:auto!important;
    z-index:30!important;
    box-sizing:border-box!important;
  }
}

/* 3. Product pages that overflow at 390: keep the header (burger/cart/search) on screen and stop sideways scroll. */
@media (max-width:991px){
  html, body{overflow-x:clip;max-width:100%;}
  #mm-chrome, header.mm-chrome{
    width:100vw!important;
    max-width:100vw!important;
    left:0!important;
    right:0!important;
    box-sizing:border-box;
  }
  body.single-product .fl-row,
  body.single-product .fl-row-content,
  body.single-product .fl-row-content-wrap,
  body.single-product .fl-col,
  body.single-product .fl-col-content,
  body.single-product .woocommerce,
  body.single-product .woocommerce-tabs,
  body.single-product .woocommerce-tabs .panel,
  body.single-product #size-guide,
  body.single-product table,
  body.single-product img,
  body.single-product .wp-block-table,
  body.single-product .related,
  body.single-product .upsells{
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  body.single-product table,
  body.single-product #size-guide{
    display:block;
    overflow-x:auto;
    min-width:0!important;
  }
}

/* 4. Fixed 160px header covers in-page anchors at 1024+. */
@media (min-width:992px){
  html{scroll-padding-top:172px;}
  /* Vehicle sales page ships scroll-margin-top:96px, which lands #mm-vs-forsale under the 160px header. */
  .mm-vs-section, .mm-vs-card, #mm-vs-forsale, #mm-vs-sold{
    scroll-margin-top:172px!important;
  }
}
#mm-chrome a.mm-cart, header.mm-chrome a.mm-cart{position:relative;}

/* 5-6 (event badge, 2022 banner) are content items C8/C11: not in this nav package. */

/* 7. Match live mid-width header (mm-fixes-20261130) so 404 / aoaa chrome is pixel-identical.
   At 992-1199 the default 13px / loose padding lets search overlap CONTACT; 992-1099 hides the cart label. */
@media (min-width:992px) and (max-width:1199px){
  #mm-chrome .mm-nav-top>li>a{padding:10px 6px;font-size:12px;letter-spacing:.03em}
}
@media (min-width:992px) and (max-width:1099px){
  #mm-chrome .mm-cart-label{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}
}

/* 8. Cart tap target 44x44 at 390 (icon stays 16px; burger/search are already 44). */
@media (max-width:991px){
  #mm-chrome a.mm-cart, header.mm-chrome a.mm-cart{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:44px!important;
    min-width:44px!important;
    height:44px!important;
    box-sizing:border-box!important;
    padding:0!important;
    margin:0!important;
  }
  #mm-chrome a.mm-cart svg, header.mm-chrome a.mm-cart svg{
    width:16px;
    height:16px;
    flex:0 0 16px;
  }
}

/* 9. 404 chrome: align the cart with a normal mm-chrome tools row (16px svg + 13px label ≈ 20.8px). */
@media (min-width:1100px){
  body.mm-404 #mm-chrome .mm-tools,
  body.mm-404 header.mm-chrome .mm-tools{
    display:flex;
    align-items:center;
  }
  body.mm-404 #mm-chrome a.mm-cart,
  body.mm-404 header.mm-chrome a.mm-cart{
    display:flex;
    align-items:center;
    align-self:center;
    gap:6px;
    font-size:13px;
    line-height:20.8px;
    min-height:20.8px;
  }
  body.mm-404 #mm-chrome a.mm-cart svg,
  body.mm-404 header.mm-chrome a.mm-cart svg{
    width:16px;
    height:16px;
    display:block;
  }
}


/* 10. Desktop cart: 44px hit area with no visual shift of the icon/label.
   Flex/margin box stays the old size so mid-width nav spacing does not change;
   the border box (getBoundingClientRect / tap target) is at least 44x44.
   992-1099: label is clipped, content is the 16px icon — extra width grows right, not into search.
   1100+: label is visible (~113x20.8) — only height grows, centred on the old box. */
@media (min-width:992px) and (max-width:1099px){
  #mm-chrome a.mm-cart, header.mm-chrome a.mm-cart{
    box-sizing:border-box!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    min-width:44px!important;
    min-height:44px!important;
    margin-top:-14px!important;
    margin-bottom:-14px!important;
    /* 20261203a: split the extra 28px as 10px left (padding keeps the icon in place; search ends 12px left of the icon)
       and 18px right (icon sits 20px from the edge), so the hit box stays 2px inside the viewport. */
    padding-left:10px!important;
    margin-left:-10px!important;
    margin-right:-18px!important;
  }
}
@media (min-width:1100px){
  #mm-chrome a.mm-cart, header.mm-chrome a.mm-cart{
    box-sizing:border-box!important;
    display:inline-flex!important;
    align-items:center!important;
    min-width:44px!important;
    min-height:44px!important;
    margin-top:-11.6px!important;
    margin-bottom:-11.6px!important;
  }
}
