/* Account shortcuts share one visual style on desktop and touch screens. */
.site-header.am-storefront-header .am-header-grid {
  grid-template-columns: minmax(180px, 230px) minmax(240px, 1fr) auto auto;
  gap: 16px;
}

.site-header.am-storefront-header .am-wallet-zone:not(:has([data-customer-balance])) {
  display: none !important;
}

.site-header.am-storefront-header:not(:has(.customer-balance-pill)) .am-header-grid {
  grid-template-areas: "brand search actions";
  grid-template-columns: minmax(180px, 230px) minmax(240px, 1fr) auto;
}

.site-header.am-storefront-header .am-action-cluster {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 312px;
  min-width: 0;
  gap: 8px;
}

.site-header.am-storefront-header .am-action-cluster .am-action-link {
  position: relative;
  display: grid !important;
  align-content: center;
  justify-items: center;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 68px !important;
  gap: 4px;
  padding: 6px 4px !important;
  color: #344b52;
  background: #f8fbfb !important;
  border: 1px solid #e1ebed !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  text-decoration: none;
  touch-action: manipulation;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.site-header.am-storefront-header .am-action-cluster .am-action-link > svg {
  display: block;
  box-sizing: border-box;
  width: 34px !important;
  height: 34px !important;
  margin: 0;
  padding: 7px;
  color: #087e87;
  fill: none !important;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  background: #e8f7f8;
  border-radius: 10px;
}

.site-header.am-storefront-header .am-action-cluster .am-action-link > span:not(.nav-badge) {
  display: block !important;
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.site-header.am-storefront-header .am-action-cluster .am-action-link.is-register {
  color: #076d75;
  border-color: #b9e6e8 !important;
  background: #edfafa !important;
}

.site-header.am-storefront-header .am-action-cluster .am-action-link.is-register > svg {
  color: #fff;
  background: #0aa7b2;
}

.site-header.am-storefront-header .am-action-cluster .am-action-link.is-logout > svg {
  color: #b65541;
  background: #fff0ec;
}

.site-header.am-storefront-header .am-action-cluster .am-action-link > .nav-badge {
  position: absolute;
  inset: 3px auto auto 3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 10px;
  font-size: 9px;
  line-height: 13px;
}

.site-header.am-storefront-header .am-action-cluster .am-action-link:focus-visible {
  outline: 3px solid #56d5dd;
  outline-offset: 3px;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .site-header.am-storefront-header .am-action-cluster .am-action-link:hover {
    transform: translateY(-2px);
    color: #076d75;
    border-color: #8ed9de !important;
    background: #effafb !important;
  }
}

@media (max-width: 1199px) and (min-width: 901px) {
  .site-header.am-storefront-header .am-header-grid {
    grid-template-areas: "brand wallet actions" "search search search";
    grid-template-columns: minmax(170px, 1fr) auto auto;
    gap: 10px 16px;
  }

  .site-header.am-storefront-header:not(:has(.customer-balance-pill)) .am-header-grid {
    grid-template-areas: "brand actions" "search search";
    grid-template-columns: minmax(170px, 1fr) auto;
  }

  .site-header.am-storefront-header .am-search-command {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 900px) {
  .site-header.am-storefront-header .am-header-grid {
    grid-template-areas: "menu brand brand ." "wallet wallet search search" "actions actions actions actions" !important;
    grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr) 44px !important;
    grid-template-rows: 42px auto auto;
    gap: 6px 8px !important;
    padding: 6px 0 8px !important;
  }

  .site-header.am-storefront-header:not(:has(.customer-balance-pill)) .am-header-grid {
    grid-template-areas: "menu brand brand ." "search search search search" "actions actions actions actions" !important;
    grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr) 44px !important;
  }

  .site-header.am-storefront-header .am-brand {
    width: auto;
    justify-self: center;
  }

  .site-header.am-storefront-header .am-brand img {
    width: 138px !important;
    height: 40px !important;
  }

  .site-header.am-storefront-header .am-action-cluster {
    width: 100%;
    min-width: 0;
    justify-self: stretch !important;
    gap: 6px;
  }

  .site-header.am-storefront-header .am-action-cluster .am-action-link {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 54px !important;
    gap: 2px;
    padding: 4px !important;
    border-radius: 10px !important;
  }

  .site-header.am-storefront-header .am-action-cluster .am-action-link > svg {
    width: 28px !important;
    height: 28px !important;
    padding: 5px;
    border-radius: 8px;
  }

  .site-header.am-storefront-header .am-action-cluster .am-action-link > span:not(.nav-badge) {
    font-size: 10.5px;
    line-height: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header.am-storefront-header .am-action-cluster .am-action-link {
    transition: none;
  }
}
