/* Keep the bag and account actions in the visible part of the storefront header. */
#root > header:has(> .logo):has(> nav) {
  inline-size: 100%;
  min-inline-size: 0;
}

#root > header:has(> .logo):has(> nav) > .header-icons {
  flex: 0 0 auto !important;
  gap: clamp(5px, 1vw, 12px);
}

#root > header > .header-icons > .bag-icon {
  flex: 0 0 38px;
  inline-size: 38px;
  block-size: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7bb7b;
  border-radius: 10px;
  color: #fff2ca;
  background: #173e2d;
}

#root > header > .header-icons > .bag-icon:disabled {
  opacity: 1;
  cursor: wait;
}

#root > header > .header-icons > .bag-icon > span {
  inset: 1px 1px auto auto;
}

@media (min-width: 901px) {
  #root > header:has(> .logo):has(> nav) > nav {
    min-inline-size: 0;
    flex-wrap: wrap;
    column-gap: clamp(7px, 1vw, 16px);
    row-gap: 3px;
  }
}

@media (min-width: 1400px) {
  #root > header:has(>button.logo):has(>nav) .header-search {
    min-width: 0 !important;
    flex: 1 1 290px !important;
  }
}

@media (max-width: 1399px) {
  #root > header:has(> .logo):has(> nav) > .header-icons {
    margin-inline-start: auto !important;
  }
}

@media (max-width: 900px) {
  #root > header:has(> .logo):has(> nav) > .logo {
    flex: 0 1 auto;
    min-inline-size: 0;
  }

  #root > header > .logo .brand-pair,
  #root > header > .logo .brand-lettering {
    min-inline-size: 0;
  }

  #root > header > .logo .brand-lettering {
    overflow: hidden;
  }

  #root > header:has(>button.logo):has(>nav) .header-search {
    min-width: 0 !important;
  }
}

#root > .cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  justify-content: flex-end;
}

#root > .cart-overlay > .bag-drawer {
  flex: 0 1 580px;
  max-inline-size: 100%;
  max-block-size: 100dvh;
  min-inline-size: 0;
  background: #faf7ef;
}

#root > .cart-overlay > .bag-drawer .bag-items {
  min-block-size: 0;
  overscroll-behavior: contain;
}
