/* Responsive frontend adjustments: guest login, reusable mobile brand, homepage category position. */
@media screen and (max-width:575.98px) {
  /* Username & password fields only; buttons, login behavior and desktop stay unchanged. */
  body.dhm-homepage #dhm-mobile-home .dhm-login label.dhm-field {
    box-sizing:border-box!important;
    height:48px!important;
    min-height:48px!important;
    max-height:48px!important;
    display:flex!important;
    align-items:center!important;
  }
  body.dhm-homepage #dhm-mobile-home .dhm-login label.dhm-field input {
    box-sizing:border-box!important;
    height:100%!important;
    min-height:0!important;
    font-size:14px!important;
    line-height:normal!important;
  }

  /* Admin-uploaded brand image on all mobile routes, logged-in and guest. */
  body .dhm-mobile-brand {
    height:66px!important;
    min-height:66px!important;
    box-sizing:border-box!important;
    align-items:center!important;
    justify-content:center!important;
  }
  body .dhm-mobile-brand > a {
    display:flex!important;
    height:100%!important;
    align-items:center!important;
    justify-content:center!important;
    max-width:min(94vw,350px)!important;
  }
  html body.dhm-homepage .dhm-mobile-brand > a > img,
  html body:not(.dhm-homepage) .dhm-mobile-brand > a > img {
    display:block!important;
    box-sizing:border-box!important;
    width:auto!important;
    height:55px!important;
    max-height:55px!important;
    max-width:min(94vw,350px)!important;
    object-fit:contain!important;
    aspect-ratio:auto!important;
  }
  /* Keep the sticky category bar aligned with the taller brand on other pages. */
  body:not(.dhm-homepage) .mcp-top-header > section.site-header {
    top:66px!important;
  }

  /* Only after guest homepage navigation has physically moved below login. */
  body.dhm-homepage.mobile-guest-category-below-login .mcp-top-header > section.site-header {
    display:none!important;
  }
  body.dhm-homepage.mobile-guest-category-below-login #dhm-mobile-home > .dhm-top-nav-holder {
    display:block!important;
    position:relative!important;
    width:100%!important;
    max-width:100%!important;
    z-index:1!important;
    margin:0!important;
    overflow:hidden;
  }
  body.dhm-homepage.mobile-guest-category-below-login #dhm-mobile-home > .dhm-top-nav-holder .dhm-categories.dhm-nav-scroll {
    position:relative!important;
    top:auto!important;
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
  }
  body.dhm-homepage.mobile-guest-category-below-login #dhm-popular {
    scroll-margin-top:78px!important;
  }
}
