/* Mobile header: Products + Menu, with the open link layout as a fallback. */
.sppauto-mobile-menu-toggle,
.sppauto-mobile-page-menu { display:none; }

@media (max-width:760px) {
  .sppauto-header .sppauto-primary-nav {
    height:auto;
  }

  .sppauto-header .sppauto-primary-nav .sppauto-primary-links {
    display:flex;
    flex-wrap:wrap;
    height:auto;
    gap:0;
    overflow:visible;
    overscroll-behavior-x:auto;
    align-items:stretch;
  }

  .sppauto-header .sppauto-primary-nav .sppauto-primary-links > a,
  .sppauto-header .sppauto-primary-nav .sppauto-primary-links > .sppauto-products-menu {
    flex:1 1 25%;
    width:auto;
    min-width:0;
    height:auto;
    min-height:44px;
    margin:0;
    box-sizing:border-box;
    border-block-end:1px solid rgba(255,255,255,.13);
  }

  .sppauto-header .sppauto-primary-nav .sppauto-primary-links > a,
  .sppauto-header .sppauto-primary-nav .sppauto-products-menu > .sppauto-products-trigger {
    min-width:0;
    padding:8px 4px;
    box-sizing:border-box;
    font-size:12px;
    line-height:1.3;
    white-space:normal;
    overflow-wrap:anywhere;
    text-align:center;
  }

  .sppauto-header .sppauto-primary-nav .sppauto-products-menu > .sppauto-products-trigger {
    width:100%;
  }

  .sppauto-header .sppauto-primary-nav .sppauto-products-trigger:after {
    flex-shrink:0;
    margin-inline-start:4px;
  }

  /* Enhance only after the original links have been safely moved into the panel. */
  .sppauto-header .sppauto-primary-nav.sppauto-mobile-nav-ready .sppauto-primary-links {
    display:grid;
    grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);
    width:100%;
    max-width:none;
    min-height:48px;
    margin:0;
    padding:0;
  }

  .sppauto-header .sppauto-mobile-nav-ready .sppauto-primary-links > .sppauto-products-menu {
    min-height:48px;
    border:0;
  }

  .sppauto-header .sppauto-primary-nav.sppauto-mobile-nav-ready .sppauto-products-trigger {
    justify-content:space-between;
    min-height:48px;
    padding:12px 20px;
    background:#c90000;
    color:#fff;
    font-size:14px;
    font-weight:600;
    line-height:1.3;
    text-align:start;
  }

  .sppauto-header .sppauto-primary-nav.sppauto-mobile-nav-ready .sppauto-products-trigger:hover,
  .sppauto-header .sppauto-primary-nav.sppauto-mobile-nav-ready .sppauto-products-trigger:focus-visible {
    background:#b90000;
    color:#fff;
  }

  .sppauto-header .sppauto-primary-nav .sppauto-mobile-menu-toggle {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    min-width:0;
    min-height:48px;
    margin:0;
    padding:12px 16px;
    border:0;
    border-radius:0;
    background:#111;
    color:#fff;
    font-family:inherit;
    font-size:14px;
    font-weight:600;
    line-height:1.3;
    cursor:pointer;
    box-sizing:border-box;
  }

  .sppauto-header .sppauto-primary-nav .sppauto-mobile-menu-toggle:hover,
  .sppauto-header .sppauto-primary-nav .sppauto-mobile-menu-toggle[aria-expanded="true"] {
    background:#222;
  }

  .sppauto-header .sppauto-primary-nav .sppauto-mobile-menu-toggle:focus-visible,
  .sppauto-header .sppauto-mobile-nav-ready .sppauto-products-trigger:focus-visible {
    outline:2px solid #fff;
    outline-offset:-4px;
  }

  .sppauto-header .sppauto-mobile-menu-icon {
    display:block;
    position:relative;
    flex:0 0 16px;
    width:16px;
    height:12px;
    background:linear-gradient(currentColor,currentColor) center/100% 2px no-repeat;
  }

  .sppauto-header .sppauto-mobile-menu-icon:before,
  .sppauto-header .sppauto-mobile-menu-icon:after {
    content:"";
    position:absolute;
    inset-inline:0;
    height:2px;
    background:currentColor;
  }

  .sppauto-header .sppauto-mobile-menu-icon:before { top:0; }
  .sppauto-header .sppauto-mobile-menu-icon:after { bottom:0; }
  .sppauto-header .sppauto-mobile-menu-toggle[aria-expanded="true"] .sppauto-mobile-menu-icon { background:none; }
  .sppauto-header .sppauto-mobile-menu-toggle[aria-expanded="true"] .sppauto-mobile-menu-icon:before { transform:translateY(5px) rotate(45deg); }
  .sppauto-header .sppauto-mobile-menu-toggle[aria-expanded="true"] .sppauto-mobile-menu-icon:after { transform:translateY(-5px) rotate(-45deg); }

  .sppauto-header .sppauto-primary-nav .sppauto-mobile-page-menu {
    display:block;
    position:fixed;
    z-index:100;
    top:var(--sppauto-mobile-menu-top,206px);
    inset-inline:14px;
    width:auto;
    max-width:none;
    max-height:calc(100vh - var(--sppauto-mobile-menu-top,206px) - 14px);
    max-height:calc(100dvh - var(--sppauto-mobile-menu-top,206px) - 14px);
    margin:0;
    padding:8px 14px 12px;
    overflow-y:auto;
    overscroll-behavior:contain;
    border:1px solid #e5e5e5;
    border-bottom:3px solid #c90000;
    background:#fff;
    color:#17191b;
    box-shadow:0 18px 32px rgba(0,0,0,.18);
    box-sizing:border-box;
  }

  .sppauto-header .sppauto-mobile-page-menu[hidden] { display:none!important; }

  .sppauto-header .sppauto-primary-nav .sppauto-mobile-page-menu > a {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    min-width:0;
    min-height:44px;
    margin:0;
    padding:10px 12px;
    border:0;
    border-bottom:1px solid #e5e5e5;
    border-radius:0;
    background:#fff;
    color:#17191b;
    font-family:inherit;
    font-size:14px;
    font-weight:500;
    line-height:1.3;
    text-align:start;
    text-decoration:none;
    text-transform:none;
    white-space:normal;
    overflow-wrap:anywhere;
    box-sizing:border-box;
  }

  .sppauto-header .sppauto-primary-nav .sppauto-mobile-page-menu > a:last-child { border-bottom:0; }
  .sppauto-header .sppauto-primary-nav .sppauto-mobile-page-menu > a:after { content:"↗"; flex:0 0 auto; color:#c90000; }
  .sppauto-header[dir="rtl"] .sppauto-primary-nav .sppauto-mobile-page-menu > a:after { content:"↖"; }
  .sppauto-header .sppauto-primary-nav .sppauto-mobile-page-menu > a[aria-current="page"] {
    border-inline-start:3px solid #c90000;
    padding-inline-start:9px;
    color:#c90000;
    font-weight:700;
  }
  .sppauto-header .sppauto-primary-nav .sppauto-mobile-page-menu > a:hover { background:#f7f7f7; color:#c90000; }
  .sppauto-header .sppauto-primary-nav .sppauto-mobile-page-menu > a:focus-visible { outline:2px solid #c90000; outline-offset:-3px; }

  /* Align the phone's drawn glyphs with the centered SVG, not just its line box. */
  .sppauto-header .sppauto-topbar .sppauto-topbar-contact a[href^="tel:"] {
    align-items:center;
    min-height:20px;
    gap:5px;
    line-height:14px;
  }

  .sppauto-header .sppauto-topbar .sppauto-topbar-contact a[href^="tel:"] > svg {
    display:block;
    flex:0 0 12px;
    width:12px;
    height:12px;
  }

  .sppauto-header .sppauto-topbar .sppauto-topbar-contact a[href^="tel:"] > span {
    display:block;
    line-height:14px;
    transform:translateY(2px);
  }

  /* Give the mobile prompt the full input width; its accessible label remains. */
  .sppauto-header .header-sppmatch-search .header-search-shell {
    grid-template-columns:minmax(0,1fr) 48px;
  }

  .sppauto-header .header-sppmatch-search .header-sppmatch-brand,
  .sppauto-header .header-sppmatch-search .header-search-divider {
    display:none!important;
  }

  .sppauto-header .header-sppmatch-search .header-search-form input {
    grid-column:1;
    width:100%;
    min-width:0;
    padding-inline:12px;
    font-size:16px;
    box-sizing:border-box;
  }

  .sppauto-header .header-sppmatch-search .header-search-form input::placeholder {
    font-size:12px;
    letter-spacing:0;
    opacity:1;
  }

  .sppauto-header .header-sppmatch-search .header-search-form button {
    grid-column:2;
  }
}
