/* MACLIFE compact mobile header – intentionally separate and versioned to avoid stale custom.css caches. */
.header-bottom__search-shell {
  grid-area: search;
  min-width: 0;
}
.header-bottom__search-shell.collapse:not(.show) {
  display: block;
}
.header-bottom__search-shell #_desktop_ps_searchbar.col-auto,
.header-bottom__search-shell #ps_searchbar {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0 !important;
}

@media (max-width: 1199.98px) {
  #header {
    overflow: visible;
  }
  .header-bottom {
    position: relative;
    padding-block: 0;
  }
  .header-bottom__container {
    padding-inline: 0.75rem;
  }
  .header-bottom__row {
    min-height: 4rem;
    grid-template-columns: minmax(0, 1fr) max-content !important;
    grid-template-areas: "left right" !important;
    gap: 0.5rem !important;
  }
  .header-bottom__left,
  .header-bottom__right {
    min-width: 0;
  }
  .header-bottom__logo,
  .header-bottom__h1,
  .header-bottom__logo .logo {
    max-width: 8.25rem;
  }
  .header-bottom__logo .logo {
    width: auto;
    max-height: 3.25rem;
    object-fit: contain;
  }
  .header-bottom__right {
    gap: 0.125rem !important;
  }
  .ml-mobile-search-toggle {
    order: 1;
  }
  #_mobile_ps_customersignin {
    order: 2;
  }
  #_desktop_ps_customersignin {
    order: 2;
  }
  #_mobile_ps_shoppingcart {
    order: 3;
  }
  #_desktop_ps_shoppingcart {
    order: 3;
  }
  .ml-mobile-menu-toggle {
    order: 4;
  }
  #_desktop_ps_currencyselector {
    display: none !important;
  }
  .header-bottom__right .header-block__action-btn,
  .ml-mobile-header-action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #1d1d1f;
    line-height: 1;
  }
  .header-bottom__right .header-block__action-btn:hover,
  .header-bottom__right .header-block__action-btn:focus,
  .ml-mobile-header-action:hover,
  .ml-mobile-header-action:focus {
    color: #0071e3;
    background: transparent;
    box-shadow: none;
  }
  .header-bottom__right .header-block__icon,
  .ml-mobile-header-action .material-icons {
    margin: 0;
    color: currentColor;
    font-size: 1.6rem;
  }
  .header-bottom__right .header-block__badge {
    top: 0;
    right: 0;
  }
  #_desktop_ps_customersignin .header-block__title,
  #_desktop_ps_shoppingcart .header-block__title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  #_desktop_ps_customersignin .header-block__action-btn,
  #_desktop_ps_shoppingcart .header-block__action-btn {
    padding-inline: 0 !important;
  }
  .header-bottom__search-shell {
    position: absolute;
    z-index: 1035;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  }
  .header-bottom__search-shell.collapse:not(.show) {
    display: none;
  }
  .header-bottom__search-shell.collapsing {
    height: auto;
    overflow: hidden;
    transition: opacity 0.18s ease;
  }
  .header-nav-full-width,
  .header-nav-full-width > .container-md,
  .header-nav-full-width > .container-md > .row {
    height: 0;
    min-height: 0;
    border: 0;
  }
  .header-nav-full-width {
    overflow: visible;
  }
  .ps-mainmenu__mobile-toggle {
    display: none !important;
  }
  #mobileMenu.offcanvas {
    width: calc(100vw - 2rem);
    max-width: 24rem;
    border-left: 0;
    background: #fff;
    box-shadow: -12px 0 32px rgba(0, 0, 0, 0.14);
  }
  #mobileMenu .offcanvas-header {
    min-height: 4rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #ededed;
  }
  #mobileMenu .btn-close {
    margin-left: auto;
  }
  #mobileMenu .ps-mainmenu__mobile {
    overflow-x: hidden;
    overflow-y: auto;
  }
  #mobileMenu .menu__list {
    padding: 0.5rem 0;
  }
  #mobileMenu .menu__list > li {
    position: relative;
    min-height: 3rem;
    border-bottom: 0;
  }
  #mobileMenu .menu__link,
  #mobileMenu .menu__title {
    display: flex;
    align-items: center;
    min-height: 3rem;
    padding: 0.65rem 3.25rem 0.65rem 1.25rem;
    color: #1d1d1f;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.35;
  }
  #mobileMenu .menu__title {
    font-weight: 600;
  }
  #mobileMenu .menu__toggle-child {
    position: absolute;
    top: 0;
    right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    min-height: 3rem;
    padding: 0;
    color: #1d1d1f;
  }
  #mobileMenu .ps-mainmenu__additionnals {
    border-top: 1px solid #ededed;
  }
}

@media (max-width: 374.98px) {
  .header-bottom__container {
    padding-inline: 0.5rem;
  }
  .header-bottom__logo,
  .header-bottom__h1,
  .header-bottom__logo .logo {
    max-width: 7.2rem;
  }
  .header-bottom__right .header-block__action-btn,
  .ml-mobile-header-action {
    width: 2.25rem;
  }
}
