/* Shared storefront header; homepage-only sections belong to storefront-home.css. */

@font-face {
  font-family: "Manrope Storefront";
  src: url("/assets/fonts/Manrope-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

.topbar,
.header {
  --header-navy: #0f2544;
  --header-dark: #0a1a2e;
  --header-background: #143b70;
  --header-background-dark: #102d55;
  --header-surface: #ffffff;
  --header-inner: #eff2f7;
  --header-muted: #52637a;
  --header-accent: #ff6a00;
  --header-focus: #c7ddf7;
  font-family: "Manrope Storefront", "Segoe UI", Arial, sans-serif;
}

.topbar {
  background: var(--header-background-dark);
  color: #bdc9d8;
  border: 0;
}

.topbar .topbar__inner {
  align-items: center;
  gap: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 11px;
  line-height: 18px;
}

.topbar .topbar__phone {
  color: #eef3fa;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

.topbar .topbar__phone svg { color: #bdc9d8; }
.topbar .topbar__phone:focus-visible {
  outline: 2px solid var(--header-focus);
  outline-offset: 3px;
  border-radius: 3px;
}

.header {
  background: var(--header-background);
  color: var(--header-surface);
  box-shadow: none;
  overflow: visible;
}

.header .nav {
  background: var(--header-background-dark);
  border: 0;
}

.header .nav__inner {
  align-items: center;
  gap: 30px;
  scrollbar-color: #718399 var(--header-dark);
  scrollbar-width: thin;
}

.header .nav__inner a,
.header .nav__inner button {
  flex-shrink: 0;
  padding: 13px 0 15px;
  color: #d5deea;
  background: transparent;
  font: 550 13px/20px "Manrope Storefront", "Segoe UI", Arial, sans-serif;
  transition: color .16s ease;
}

.header .nav__inner a::after,
.header .nav__inner button::after {
  background: #d5deea;
  height: 1px;
  bottom: 10px;
}

.header .nav__inner a:hover,
.header .nav__inner button:hover {
  color: #ffffff;
  background: transparent;
}

.header .header__inner {
  gap: 28px;
  overflow: visible;
}

.header .logo { flex: 0 0 auto; }
.header .logo img { filter: none; }

.header .search {
  flex: 1 1 0;
  max-width: none;
  min-width: 0;
  height: 54px;
  gap: 4px;
  padding: 5px;
  background: var(--header-surface);
  border: 0;
  border-radius: 30px;
  box-shadow: none;
  overflow: visible;
}

.header .search:focus-within {
  outline: none;
}

.header .search input {
  min-width: 0;
  padding: 0 14px;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--header-navy);
  font: 500 14px/22px "Manrope Storefront", "Segoe UI", Arial, sans-serif;
  box-shadow: none;
}

.header .search input::placeholder { color: #697a8f; opacity: 1; }
.header .search input:focus { background: transparent; box-shadow: none; outline: none; }

.header .search .search__mode-toggle {
  gap: 7px;
  padding: 0 14px;
  border-radius: 24px;
  background: var(--header-inner);
  color: var(--header-navy);
  font: 650 12px/18px "Manrope Storefront", "Segoe UI", Arial, sans-serif;
  box-shadow: none;
  transform: none;
  transition: background .16s ease;
}

.header .search .search__mode-toggle:hover,
.header .search .search__mode-toggle[aria-expanded="true"] {
  background: #e4eaf2;
  color: var(--header-navy);
  box-shadow: none;
  transform: none;
}

.header .search__mode-arrow { color: var(--header-muted); }

.header .search #searchBtn {
  flex-shrink: 0;
  gap: 7px;
  padding: 0 20px;
  border-radius: 24px;
  background: var(--header-accent);
  color: var(--header-dark);
  font: 750 13px/20px "Manrope Storefront", "Segoe UI", Arial, sans-serif;
  box-shadow: none;
  filter: none;
  transform: none;
  transition: background .16s ease;
}

.header .search #searchBtn:hover {
  background: #ff8126;
  box-shadow: none;
  filter: none;
  transform: none;
}

.header .search #searchBtn:active { background: #ef6100; box-shadow: none; transform: none; }
.header .search .search__mode-toggle:active { background: #dbe3ee; box-shadow: none; transform: none; }
.header .search #searchBtn:hover .search__find-icon { transform: none; }

.header .search__mode-dropdown,
.header .search__suggestions {
  top: calc(100% + 12px);
  border: 1px solid #e3e8ee;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgb(10 26 46 / 14%);
}

.header .search__mode-dropdown { padding: 5px; min-width: 180px; z-index: 61; }
.header .search__suggestions { z-index: 60; }

.header .search .search__mode-option {
  padding: 11px 13px;
  min-height: 42px;
  height: auto;
  border-radius: 12px;
  background: transparent;
  color: var(--header-muted);
  font: 550 13px/20px "Manrope Storefront", "Segoe UI", Arial, sans-serif;
}

.header .search .search__mode-option:hover { background: var(--header-inner); }
.header .search .search__mode-option.is-active {
  background: var(--header-inner);
  color: var(--header-navy);
  font-weight: 750;
}

.header .header__actions { flex: 0 0 auto; gap: 9px; }
.header .header__actions .icon-btn {
  height: 50px;
  padding: 0 17px;
  gap: 8px;
  border: 0;
  border-radius: 28px;
  background: #edf2f8;
  color: var(--header-navy);
  font: 650 13px/20px "Manrope Storefront", "Segoe UI", Arial, sans-serif;
  box-shadow: none;
  transform: none;
  transition: background .16s ease;
}

.header .header__actions .icon-btn:hover {
  background: #ffffff;
  color: var(--header-navy);
  box-shadow: none;
  transform: none;
}

.header .header__actions .icon-btn:active {
  background: #dce6f2;
  box-shadow: none;
  transform: none;
}

.header .header__actions #accountLink:hover svg,
.header .header__actions #cartBtn:hover svg { color: var(--header-navy); transform: none; }

.header .cart-count,
.header #cartBtn:hover .cart-count {
  min-width: 19px;
  padding: 0 5px;
  margin-left: 0;
  background: var(--header-navy);
  color: #ffffff;
  font-size: 10px;
  line-height: 19px;
  text-align: center;
  box-shadow: none;
  transform: none;
}

.header :focus-visible:not(input) {
  outline: 2px solid var(--header-focus);
  outline-offset: 4px;
}

.header .nav__inner :focus-visible { outline-offset: -2px; border-radius: 3px; }
.header .search button:focus-visible { outline: 2px solid var(--header-navy); outline-offset: -3px; }
.header button:disabled { cursor: default; opacity: .55; }

@media (max-width: 900px) and (min-width: 721px) {
  .header .header__inner { flex-wrap: wrap; gap: 18px 16px; }
  .header .search { flex: 1 0 100%; order: 3; }
  .header .header__actions { margin-left: auto; }
  .header .header__actions .icon-btn { padding: 0 12px; }
  .header .search .search__mode-toggle { padding: 0 11px; }
  .header .search #searchBtn { padding: 0 15px; }
}

@media (max-width: 720px) {
  .topbar .topbar__inner { gap: 4px 10px; padding-top: 6px; padding-bottom: 6px; font-size: 10px; line-height: 16px; }
  .topbar .topbar__inner > span { min-width: 0; }
  .topbar .topbar__phone { flex-shrink: 0; font-size: 10px; gap: 4px; }
  .topbar .topbar__phone svg { width: 12px; height: 12px; }
  .header .nav__inner { gap: 24px; }
  .header .nav__inner a,
  .header .nav__inner button { padding-top: 12px; padding-bottom: 14px; font-size: 12px; }
  .header .header__inner { flex-wrap: wrap; justify-content: space-between; gap: 18px 12px; padding-top: 18px; padding-bottom: 20px; }
  .header .header__actions { gap: 7px; }
  .header .header__actions .icon-btn { height: 44px; padding: 0 13px; font-size: 12px; gap: 6px; }
  .header .search { flex: 1 0 100%; order: 3; height: 54px; gap: 2px; }
  .header .search .search__mode-toggle { padding: 0 11px; gap: 5px; font-size: 11px; }
  .header .search input { padding: 0 10px; font-size: 16px; }
  .header .search #searchBtn { padding: 0 15px; gap: 5px; font-size: 12px; }
  .header .search__suggestion { gap: 6px; padding: 10px; font-size: 12px; flex-wrap: wrap; }
  .header .search__suggestion-name { flex-basis: 100%; }
}

@media (max-width: 370px) {
  .header .header__inner { gap: 17px 8px; }
  .header .header__actions { gap: 6px; }
  .header .header__actions .icon-btn { padding: 0 11px; gap: 5px; }
  .header .search .search__mode-toggle { padding: 0 10px; }
  .header .search #searchBtn { padding: 0 12px; }
  .header .search input { padding: 0 8px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .topbar *, .header * { transition: none; }
}

/* Match the existing footer's outer width and responsive gutters. */
.topbar,
.header {
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 721px) and (max-width: 1232px) {
  .topbar,
  .header { margin-left: 36px; margin-right: 36px; }
}

@media (max-width: 720px) {
  .topbar,
  .header { max-width: none; width: 100%; margin-left: 0; margin-right: 0; }
}

/* Match the footer edges while keeping the search and its popups unclipped. */
.topbar,
.header { --masthead-gutter: 32px; }
.header { border-radius: 0 0 28px 28px; }
.topbar .topbar__inner,
.header .nav__inner,
.header .header__inner {
  padding-left: var(--masthead-gutter);
  padding-right: var(--masthead-gutter);
}
.header .header__inner { padding-top: 20px; padding-bottom: 24px; }
@media (max-width: 900px) {
  .topbar, .header { --masthead-gutter: 24px; }
}
@media (max-width: 720px) {
  .topbar, .header { --masthead-gutter: 20px; }
  .header { border-radius: 0; }
  .header .header__inner { padding-top: 16px; padding-bottom: 20px; }
}
@media (max-width: 370px) {
  .topbar, .header { --masthead-gutter: 16px; }
}
