:root {
  --alltshop-orange: #ff5000;
  --alltshop-orange-light: #ff7800;
  --alltshop-header-ink: #222;
}

/* Desktop: logo | centered search | cart + account */
#ast-desktop-header .alltshop-header-row {
  grid-template-columns: minmax(190px, 1fr) minmax(340px, 680px) minmax(190px, 1fr);
  column-gap: clamp(18px, 3vw, 42px);
  align-items: center;
}

#ast-desktop-header .alltshop-search-slot {
  grid-column: 2;
  min-width: 0;
  width: 100%;
  justify-content: center;
}

#ast-desktop-header .alltshop-header-row > .site-header-primary-section-left {
  grid-column: 1;
}

#ast-desktop-header .alltshop-header-row > .site-header-primary-section-right {
  grid-column: 3;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

#ast-desktop-header .alltshop-search-slot .ast-header-search,
#ast-desktop-header .alltshop-search-slot .ast-search-menu-icon,
#ast-desktop-header .alltshop-search-slot .search-form {
  width: 100%;
}

#ast-desktop-header .alltshop-search-slot .search-form label {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

#ast-desktop-header .alltshop-search-slot .search-form {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 3px 3px 3px 18px;
  overflow: hidden;
  background: #fff;
  border: 2px solid var(--alltshop-orange);
  border-radius: 999px;
  box-shadow: 0 3px 12px rgba(255, 80, 0, .12);
}

#ast-desktop-header .alltshop-search-slot .search-field {
  width: 100% !important;
  height: 38px !important;
  min-width: 0;
  padding: 0 10px 0 0 !important;
  color: var(--alltshop-header-ink) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  font-size: 15px;
}

#ast-desktop-header .alltshop-search-slot .search-field::placeholder {
  color: #8c8c8c !important;
}

#ast-desktop-header .alltshop-search-slot .search-submit {
  display: inline-flex !important;
  position: static !important;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  flex: 0 0 68px;
  width: 68px !important;
  min-width: 68px;
  margin: 0;
  padding: 0 !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--alltshop-orange-light), var(--alltshop-orange)) !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  cursor: pointer;
}

#ast-desktop-header .alltshop-search-slot .search-submit svg {
  width: 22px !important;
  height: 22px !important;
}

#ast-desktop-header .alltshop-search-slot .search-submit:hover {
  filter: brightness(.96);
}

#ast-desktop-header .alltshop-header-row .ast-header-woo-cart,
#ast-desktop-header .alltshop-header-row .ast-header-account,
#ast-desktop-header .alltshop-header-row .ast-header-divider-element {
  line-height: 1;
  min-height: auto;
}

#ast-desktop-header .alltshop-header-row .ast-header-account-link,
#ast-desktop-header .alltshop-header-row .cart-container {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
}

#ast-desktop-header .alltshop-header-row .ast-header-account-link {
  padding: 0 10px;
  color: inherit;
  white-space: nowrap;
}

/* Mobile: compact actions on top and a full-width search row below. */
@media (max-width: 921px) {
  body.alltshop-mobile-sticky-header #masthead {
    min-height: var(--alltshop-mobile-header-height, 128px);
  }

  body.alltshop-mobile-sticky-header #ast-mobile-header {
    position: fixed;
    z-index: 9998;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
  }

  body.admin-bar.alltshop-mobile-sticky-header #ast-mobile-header {
    top: 32px;
  }
}

#ast-mobile-header .site-header-primary-section-right {
  gap: 7px;
  align-items: center;
}

#ast-mobile-header .alltshop-mobile-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #fff;
  border-radius: 50%;
}

#ast-mobile-header .alltshop-mobile-account svg {
  flex: 0 0 22px;
  width: 22px !important;
  height: 22px !important;
}

#ast-mobile-header .alltshop-mobile-account:hover,
#ast-mobile-header .alltshop-mobile-account:focus-visible {
  color: var(--alltshop-orange);
  background: rgba(255, 80, 0, .08);
}

#ast-mobile-header .alltshop-mobile-search-row {
  display: block;
  padding-top: 8px;
  padding-bottom: 12px;
}

#ast-mobile-header .alltshop-mobile-search {
  display: flex;
  align-items: center;
  width: min(100%, 680px);
  height: 44px;
  margin: 0 auto;
  padding: 3px 3px 3px 15px;
  overflow: hidden;
  background: #fff;
  border: 2px solid var(--alltshop-orange);
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(255, 80, 0, .1);
}

#ast-mobile-header .alltshop-mobile-search label {
  flex: 1;
  min-width: 0;
  margin: 0;
}

#ast-mobile-header .alltshop-mobile-search input[type="search"] {
  width: 100%;
  height: 34px;
  padding: 0 8px 0 0;
  color: var(--alltshop-header-ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 14px;
}

#ast-mobile-header .alltshop-mobile-search input[type="search"]:focus {
  outline: 0;
}

#ast-mobile-header .alltshop-mobile-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  flex: 0 0 48px;
  margin: 0;
  padding: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--alltshop-orange-light), var(--alltshop-orange));
  border: 0;
  border-radius: 999px;
  box-shadow: none;
}

@media (min-width: 922px) and (max-width: 1080px) {
  #ast-desktop-header .alltshop-header-row {
    grid-template-columns: minmax(150px, .75fr) minmax(320px, 1.7fr) minmax(165px, .75fr);
    column-gap: 16px;
  }

  #ast-desktop-header .alltshop-header-row .ast-header-account-link {
    padding-right: 0;
    padding-left: 4px;
  }
}

@media (max-width: 544px) {
  #ast-mobile-header .ast-primary-header-bar {
    padding-right: 2px;
    padding-left: 2px;
  }

  #ast-mobile-header .site-logo-img img {
    max-width: 125px;
  }

  #ast-mobile-header .alltshop-mobile-account {
    width: 34px;
    height: 34px;
  }

  #ast-mobile-header .alltshop-mobile-search-row {
    padding-right: 14px;
    padding-left: 14px;
  }
}
