/* WEB-004: retain Astra branding and menu typography; reserve room before wrapping. */
#masthead .site-branding,
#masthead .site-title a {
  /* Do not animate the previously hidden logo container from zero to mobile width. */
  transition-property: color;
}

@media (min-width: 1201px) {
  #masthead #ast-mobile-header {
    display: none !important;
  }

  #ast-desktop-header .ast-builder-grid-row {
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 16px;
  }

  #ast-desktop-header .site-header-primary-section-right {
    justify-content: flex-end;
    column-gap: 16px;
  }

  #ast-desktop-header .ast-builder-menu-1,
  #ast-desktop-header .ast-header-button-1 {
    flex: 0 0 auto;
    padding: 0;
  }

  /* The original logo is already zero-width; its empty margin must not claim room. */
  #ast-desktop-header .site-logo-img {
    display: none;
  }

  #ast-desktop-header .main-header-menu {
    flex-wrap: nowrap;
  }

  #ast-desktop-header .main-header-menu > .menu-item > .menu-link {
    padding-inline: 8px;
  }

  #ast-desktop-header .ast-header-button-1 .ast-custom-button {
    width: max-content;
    padding-inline: 20px;
  }

  #ast-desktop-header .menu-item.br-header-submenu-open > .sub-menu {
    left: 0;
    visibility: visible;
    opacity: 1;
  }

  #ast-desktop-header .menu-item.br-header-submenu-closed > .sub-menu {
    visibility: hidden;
    opacity: 0;
  }
}

/* The Astra header and existing BeautyRoyal mobile menu use the same breakpoint. */
@media (max-width: 1200px) {
  #masthead #ast-desktop-header {
    display: none;
  }

  #masthead #ast-mobile-header {
    display: block;
  }

  #masthead #ast-mobile-header .ast-builder-grid-row {
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 0;
  }

  #ast-mobile-header .site-logo-img {
    display: none;
  }

  #brmn-root .brmn-head {
    gap: 12px;
    padding-inline: 20px;
  }

  #brmn-root .brmn-panel {
    width: min(90vw, 390px);
  }

  #brmn-root .brmn-close {
    flex: 0 0 48px;
  }

  #brmn-root .brmn-brand {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

#masthead a:focus-visible,
#masthead .dropdown-menu-toggle:focus-visible,
#brmn-root .brmn-trigger:focus-visible,
#brmn-root .brmn-close:focus-visible,
#brmn-root .brmn-toggle:focus-visible,
#brmn-root .brmn-menu a:focus-visible {
  outline: 2px solid var(--brmn-gold);
  outline-offset: 3px;
}
