/* Keep both decisions visible beside the wordmark, including on narrow phones. */
#masthead .esp-market-abbreviation { display: none; }

body.esp-redesign #masthead.es-touch-menu .esp-header__actions > :is(.esp-market, .esp-language) {
  display: inline-flex;
  align-items: center;
  flex: none;
}
body.esp-redesign #masthead.es-touch-menu .esp-header__actions > .esp-market { order: 5; }
body.esp-redesign #masthead.es-touch-menu .esp-header__actions > .esp-language { order: 6; }
body.esp-redesign #masthead.es-touch-menu .esp-header__actions .esp-header-picker > .esp-language-trigger {
  min-height: 44px;
}

@media (max-width: 639px) {
  body.esp-redesign #masthead.es-touch-menu .esp-header__actions {
    gap: 2px;
    margin-inline-start: 0;
  }
  body.esp-redesign #masthead.es-touch-menu .esp-header__actions .esp-header-picker > .esp-language-trigger {
    min-width: 44px;
    width: auto;
    padding-inline: 7px;
    gap: 4px;
    font-size: 12px;
  }
  #masthead.es-touch-menu .esp-header__actions .esp-market .esp-market-abbreviation { display: inline; }
  #masthead.es-touch-menu .esp-header__actions .esp-market .esp-language-trigger:has(.esp-market-abbreviation) > span:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  #masthead.es-touch-menu .esp-header__actions .esp-language-globe { display: none; }
}

@media (max-width: 479px) {
  body.esp-redesign #masthead.es-touch-menu .esp-header__actions > :is(.esp-action--account, .esp-action--wishlist) { display: none; }
}
@media (max-width: 374px) {
  body.esp-redesign #masthead.es-touch-menu .esp-header__actions > .esp-search { display: none; }
}

/* Internal pages use the same single outer gutter as the homepage.
   Taking a second gutter from the inner shell squeezed the wordmark on phones. */
@media (max-width: 639px) {
  body.esp-redesign.esp-fidelity-v2:not(.esp-fh36) #masthead.esp-header {
    box-sizing: border-box;
    width: 100%;
    padding: 0 clamp(6px, calc(25vw - 85px), 16px);
  }
  body.esp-redesign.esp-fidelity-v2:not(.esp-fh36) #masthead.esp-header > .esp-header__main {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-height: 57.887px;
    margin: 12px 0;
    padding: 6.9435px 16px;
    column-gap: 16px;
  }
  body.esp-redesign.esp-fidelity-v2:not(.esp-fh36) #masthead.esp-header .esp-house-logo img {
    transform: translateY(-5px);
  }
}
@media (min-width: 440px) and (max-width: 639px) {
  body.esp-redesign.esp-fidelity-v2:not(.esp-fh36) #masthead.esp-header .esp-brand {
    min-width: 98px;
  }
}
@media (max-width: 439px) {
  body.esp-redesign.esp-fidelity-v2:not(.esp-fh36) #masthead.esp-header > .esp-header__main {
    padding-inline: 4px;
    column-gap: 4px;
  }
}
@media (min-width: 640px) and (max-width: 1023px) {
  body.esp-redesign.esp-fidelity-v2:not(.esp-fh36) #masthead.esp-header {
    box-sizing: border-box;
    width: 100%;
    padding: 0 32px;
  }
  body.esp-redesign.esp-fidelity-v2:not(.esp-fh36) #masthead.esp-header > .esp-header__main {
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: none;
    min-height: 65.65px;
    margin: 16px 0;
    padding: 10.825px 20px;
  }
  body.esp-redesign.esp-fidelity-v2:not(.esp-fh36) #masthead.esp-header .esp-brand {
    flex: 1 1 109.002px;
    min-width: 0;
  }
  body.esp-redesign.esp-fidelity-v2:not(.esp-fh36) #masthead.esp-header .esp-house-logo img {
    transform: translateY(-3px);
  }
}
