/* ===== AEGIS MEGA HEADER: ROOT ===== */
.aegis-mega-header {
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  background: #ffffff;
  transition: transform 0.18s ease, background 0.18s ease;
  --aegis-mega-max: 1280px;
  --aegis-mega-pad-x: 24px;
  --aegis-mega-gap: 30px;
  --aegis-mega-sidebar: 240px;
  --aegis-mega-promo: 280px;
  --aegis-mega-col-min: 160px;
  --aegis-mega-col-max: 180px;
  --aegis-tool-h: 38px;
}

.aegis-mega-header a {
  color: inherit;
}

.aegis-hero-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.aegis-mega-header.is-home.is-header-hidden {
  transform: translateY(-110%);
}

.aegis-mega-header.is-home.is-top-hidden .aegis-header__top {
  display: none;
}


.aegis-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.aegis-icon svg {
  width: 100%;
  height: 100%;
}

/* ===== TOP: utility bar ===== */
.aegis-header__top {
  background: #f4f4f5;
}

.aegis-header__top-inner {
  padding: 6px 24px;
  font-size: 12px;
  display: flex;
  justify-content: flex-end;
}

.aegis-header__top-links {
  display: inline-flex;
  gap: 18px;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

.aegis-header__top-link {
  color: #334155;
  text-decoration: none;
}

.aegis-header__top-link:hover,
.aegis-header__top-link:focus {
  text-decoration: underline;
}

/* ===== MAIN: logo + nav + tools ===== */
.aegis-header__main {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.aegis-header__main-inner {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 0 24px;
  gap: 24px;
}

.aegis-header__brand {
  display: flex;
  align-items: center;
}

.aegis-header__brand-link {
  font-size: 28px;
  font-weight: 700;
  text-decoration: none;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.aegis-header__brand-image {
  display: block;
  height: var(--aegis-logo-h, 36px);
  width: auto;
  max-width: var(--aegis-logo-max-w, 220px);
}

.aegis-header__brand-link svg {
  display: block;
  height: var(--aegis-logo-h, 36px);
  width: auto;
}

.aegis-header__nav {
  display: flex;
  align-items: center;
  gap: 26px;
  justify-content: center;
  flex: 1;
}

.aegis-header__nav-item {
  box-sizing: border-box;
  border: 0;
  background: transparent;
  height: 64px;
  padding: 0 22px;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: #111111;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  box-shadow: none;
}

.aegis-header__nav-item:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 2px;
}

.aegis-header__nav-item:hover,
.aegis-header__nav-item:focus {
  background: #111111;
  color: #ffffff;
  outline: none;
}

.aegis-mega-header .aegis-header__nav-item:hover,
.aegis-mega-header .aegis-header__nav-item:focus {
  background: #111111 !important;
  color: #ffffff !important;
}

.aegis-header__nav-item[aria-expanded="true"],
.aegis-header__nav-item.is-active {
  background: #111111;
  color: #ffffff;
}

.aegis-mega-header .aegis-header__nav-item,
.aegis-mega-header .aegis-header__nav-item:hover,
.aegis-mega-header .aegis-header__nav-item:focus,
.aegis-mega-header .aegis-header__nav-item:active,
.aegis-mega-header .aegis-header__nav-item[aria-expanded="true"],
.aegis-mega-header .aegis-header__nav-item.is-active {
  text-decoration: none !important;
  border-radius: 0 !important;
}

.aegis-mega-header .aegis-header__nav-item * {
  text-decoration: none !important;
}

.aegis-header__tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
}

.aegis-header__search {
  display: flex;
  align-items: center;
  gap: 0;
}

.aegis-header__search input[type="search"],
.aegis-header__search-btn,
.aegis-header__cart {
  height: 38px;
  box-sizing: border-box;
}

.aegis-header__search input[type="search"] {
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-right: 0;
  border-radius: 0;
  min-width: 160px;
  font-size: 14px;
  line-height: 38px;
  background: #ffffff;
  color: #111827;
  margin: 0;
}

.aegis-header__search input[type="search"]:hover,
.aegis-header__search input[type="search"]:focus {
  border-color: #111827;
  outline: none;
  box-shadow: inset 0 0 0 1px #111827;
}

.aegis-header__search input[type="search"]:focus {
  outline: none;
}

.aegis-header__search-btn {
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-left: 0;
  background: #ffffff;
  color: #111827;
  border-radius: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
  box-shadow: none;
  margin: 0;
}

.aegis-header__search-btn:hover,
.aegis-header__search-btn:focus {
  border-color: #111827;
  outline: none;
  box-shadow: inset 0 0 0 1px #111827;
  background: #ffffff;
  color: #111827;
}

.aegis-header__cart {
  padding: 0 12px;
  border-radius: 0;
  background: #ffffff;
  border: 1px solid #d1d5db;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: #111827;
  box-shadow: none;
  cursor: pointer;
}

.aegis-header__cart:hover,
.aegis-header__cart:focus {
  border-color: #111827;
  outline: none;
  box-shadow: inset 0 0 0 1px #111827;
  background: #ffffff;
  color: #111827;
}

.aegis-header__cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  background: #111111;
  color: #ffffff;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
}

.aegis-mobile-icon .aegis-header__cart-count {
  margin-left: 4px;
  font-size: 10px;
  height: 16px;
  min-width: 16px;
}

body.aegis-mini-cart--open {
  overflow: hidden;
}

.aegis-mini-cart__overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 99990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

body.aegis-mini-cart--open .aegis-mini-cart__overlay {
  opacity: 1;
  pointer-events: auto;
}

.aegis-mini-cart__overlay[hidden] {
  display: none;
}

.aegis-mini-cart__drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: #ffffff;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
  z-index: 99991;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.aegis-mini-cart__drawer[hidden] {
  display: none;
}

body.aegis-mini-cart--open .aegis-mini-cart__drawer {
  transform: translateX(0);
}

.aegis-mini-cart__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #e2e8f0;
}

.aegis-mini-cart__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
}

.aegis-mini-cart__count {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
}

.aegis-mini-cart__close {
  background: none;
  border: 0;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #0f172a;
}

.aegis-mini-cart__notice {
  padding: 12px 18px;
  background: #0f172a;
  color: #ffffff;
  font-size: 14px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.aegis-mini-cart__notice.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.aegis-mini-cart__fragment {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.aegis-mini-cart__items {
  padding: 0 18px;
  flex: 1;
  overflow-y: auto;
}

.aegis-mini-cart__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.aegis-mini-cart__item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid #e2e8f0;
}

.woocommerce .aegis-mini-cart__drawer .aegis-mini-cart__item {
  position: relative;
  padding-right: 28px;
}

.aegis-mini-cart__item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.aegis-mini-cart__item.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

.aegis-mini-cart__thumb img {
  width: 72px;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.aegis-mini-cart__details {
  display: grid;
  gap: 6px;
}

.aegis-mini-cart__name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
}

.aegis-mini-cart__meta {
  font-size: 12px;
  color: #64748b;
}

.aegis-mini-cart__controls {
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
  min-width: 110px;
}

.aegis-mini-cart__unit-price {
  font-size: 12px;
  color: #64748b;
}

.aegis-mini-cart__line-total {
  font-size: 14px;
  color: #0f172a;
  font-weight: 600;
}

.aegis-mini-cart__qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 2px;
  background: #f8fafc;
}

.aegis-mini-cart__qty-btn {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #0f172a;
  font-size: 14px;
  cursor: pointer;
}

.aegis-mini-cart__qty-input {
  width: 36px;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 13px;
  color: #0f172a;
  -moz-appearance: textfield;
}

.aegis-mini-cart__qty-input::-webkit-outer-spin-button,
.aegis-mini-cart__qty-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.aegis-mini-cart__remove {
  align-self: center;
  color: #64748b;
  font-size: 12px;
  text-decoration: underline;
}

.woocommerce .aegis-mini-cart__drawer a.aegis-mini-cart__remove.remove {
  position: absolute;
  top: 0;
  right: 0;
  width: 18px !important;
  height: 18px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0 !important;
  line-height: 1 !important;
  text-indent: -9999px;
  overflow: hidden;
  color: #334155 !important;
  opacity: 0.55;
  background: transparent !important;
  border: 0 !important;
  border-radius: 4px;
  text-decoration: none;
  transform: none !important;
}

.woocommerce .aegis-mini-cart__drawer a.aegis-mini-cart__remove.remove::before {
  content: "×";
  font-size: 16px;
  line-height: 1;
  text-indent: 0;
  display: block;
}

.woocommerce .aegis-mini-cart__drawer a.aegis-mini-cart__remove.remove:hover,
.woocommerce .aegis-mini-cart__drawer a.aegis-mini-cart__remove.remove:focus {
  opacity: 0.85;
  text-decoration: none;
  transform: none !important;
}

.aegis-mini-cart__empty {
  margin: 0;
  padding: 16px 0;
  color: #64748b;
  font-size: 14px;
}

.aegis-mini-cart__summary {
  padding: 16px 18px 20px;
  border-top: 1px solid #e2e8f0;
  display: grid;
  gap: 12px;
  margin-top: auto;
  background: #ffffff;
  box-shadow: 0 -8px 16px rgba(15, 23, 42, 0.04);
}

.aegis-mini-cart__subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
}

.aegis-mini-cart__subtotal-label {
  color: #475569;
}

.aegis-mini-cart__actions {
  display: grid;
  gap: 10px;
}

.aegis-mini-cart__view-cart,
.aegis-mini-cart__checkout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid #0f172a;
  text-decoration: none;
  font-weight: 600;
  color: #0f172a;
  background: #ffffff;
  transition: background 0.2s ease, color 0.2s ease;
}

.aegis-mini-cart__checkout {
  background: #0f172a;
  color: #ffffff;
}

.aegis-mini-cart__view-cart:hover,
.aegis-mini-cart__view-cart:focus {
  background: #0f172a;
  color: #ffffff;
}

.aegis-mini-cart__checkout:hover,
.aegis-mini-cart__checkout:focus {
  background: #111827;
  color: #ffffff;
}

/* Mini cart: Checkout should be inverse by default */
.aegis-mini-cart__drawer .aegis-mini-cart__actions a.aegis-mini-cart__checkout,
.aegis-mini-cart__drawer a.aegis-mini-cart__checkout {
  background: #111827 !important;
  border-color: #111827 !important;
  color: #ffffff !important;
}

/* 防止内部节点继承成深色（如果按钮里有 span 等） */
.aegis-mini-cart__drawer a.aegis-mini-cart__checkout * {
  color: inherit !important;
}

/* hover/focus 仍保持反色（可轻微变化但不能变回不可读） */
.aegis-mini-cart__drawer a.aegis-mini-cart__checkout:hover,
.aegis-mini-cart__drawer a.aegis-mini-cart__checkout:focus {
  background: #111827 !important;
  color: #ffffff !important;
  opacity: 0.92;
}

.aegis-mini-cart__drawer a.aegis-mini-cart__view-cart {
  background: transparent !important;
  color: #111827 !important;
  border-color: #111827 !important;
}

.aegis-header__main:hover,
.aegis-header__main:focus-within {
  background: #ffffff;
  border-bottom-color: #e2e8f0;
}

.aegis-mega-header.is-home.mode-solid .aegis-header__main,
.aegis-mega-header.is-home.is-mega-open .aegis-header__main {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.aegis-mega-header.is-home.mode-solid .aegis-header__nav-item,
.aegis-mega-header.is-home.mode-solid .aegis-header__nav-item span,
.aegis-mega-header.is-home.mode-solid .aegis-header__tools,
.aegis-mega-header.is-home.mode-solid .aegis-header__brand-link,
.aegis-mega-header.is-home.is-mega-open .aegis-header__nav-item,
.aegis-mega-header.is-home.is-mega-open .aegis-header__nav-item span,
.aegis-mega-header.is-home.is-mega-open .aegis-header__tools,
.aegis-mega-header.is-home.is-mega-open .aegis-header__brand-link {
  color: #111111 !important;
}

.aegis-mega-header.is-home.mode-solid .aegis-header__search input[type="search"],
.aegis-mega-header.is-home.is-mega-open .aegis-header__search input[type="search"] {
  border-color: #cbd5e1;
  color: #0f172a;
  background: #ffffff;
}

.aegis-mega-header.is-home.mode-solid .aegis-header__search-btn,
.aegis-mega-header.is-home.is-mega-open .aegis-header__search-btn {
  border-color: #1f2937;
  background: #1f2937;
  color: #ffffff;
}

.aegis-mega-header.is-home.mode-overlay {
  background: transparent !important;
  border-bottom-color: transparent !important;
}

.aegis-mega-header.is-home.mode-overlay .aegis-header__main,
.aegis-mega-header.is-home.mode-overlay .aegis-header__main-inner,
.aegis-mega-header.is-home.mode-overlay .aegis-header__nav,
.aegis-mega-header.is-home.mode-overlay .aegis-header__tools {
  background: transparent !important;
  box-shadow: none !important;
  border-bottom: 0 !important;
}

.aegis-mega-header.is-home.mode-overlay .aegis-header__nav-item,
.aegis-mega-header.is-home.mode-overlay .aegis-header__nav-item span,
.aegis-mega-header.is-home.mode-overlay .aegis-header__brand-link,
.aegis-mega-header.is-home.mode-overlay .aegis-header__tools {
  color: #ffffff !important;
}

.aegis-mega-header.is-home.mode-overlay .aegis-header__search input[type="search"] {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
  color: #ffffff !important;
}

.aegis-mega-header.is-home.mode-overlay .aegis-header__search input[type="search"]::placeholder {
  color: rgba(255, 255, 255, 0.7) !important;
}

.aegis-mega-header.is-home.mode-overlay .aegis-header__search-btn {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.8) !important;
  color: #ffffff !important;
}

.aegis-mega-header.is-home.mode-overlay .aegis-header__cart {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
}

.aegis-mega-header.is-home.mode-solid .aegis-header__nav-item:hover span,
.aegis-mega-header.is-home.mode-solid .aegis-header__nav-item.is-active span,
.aegis-mega-header.is-home.mode-solid .aegis-header__nav-item[aria-expanded="true"] span,
.aegis-mega-header.is-home.is-mega-open .aegis-header__nav-item:hover span,
.aegis-mega-header.is-home.is-mega-open .aegis-header__nav-item.is-active span,
.aegis-mega-header.is-home.is-mega-open .aegis-header__nav-item[aria-expanded="true"] span {
  color: #ffffff !important;
}
.aegis-mobile-topbar,
.aegis-mobile-search,
.aegis-mobile-drawer,
.aegis-mobile-overlay {
  display: none;
}

/* ===== MEGA: panel wrapper ===== */
.aegis-header__mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  border-top: 1px solid #e2e8f0;
  z-index: 20;
  display: none;
}

.aegis-header__mega-inner {
  width: 100%;
}

.aegis-mega-header .aegis-header__mega,
.aegis-mega-header .aegis-header__mega-inner,
.aegis-mega-header .aegis-mega-header__panel,
.aegis-mega-header .aegis-mega-header__panel-grid {
  border-radius: 0 !important;
}

.aegis-header__mega.is-open {
  display: block;
}

.aegis-mega-header__panel {
  padding: 0;
}

.aegis-mega-header__panel[hidden] {
  display: none;
}

/* ===== MEGA: sidebar / columns / promo ===== */
.aegis-mega-header__panel-grid {
  max-width: var(--aegis-mega-max);
  margin: 0 auto;
  padding: 22px var(--aegis-mega-pad-x);
  display: grid;
  grid-template-columns: var(--aegis-mega-sidebar) 1fr var(--aegis-mega-promo);
  gap: var(--aegis-mega-gap);
  align-items: stretch;
}

.aegis-mega__sidebar {
  background: #f5f5f5;
  padding: 16px;
  border-radius: 0;
}

.aegis-mega__sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aegis-mega-header__panel-title {
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 15px;
}

.aegis-mega-header__panel-links,
.aegis-mega-header__column-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.aegis-mega-header__link {
  text-decoration: none;
  color: #1f2937;
  font-size: 14px;
}

.aegis-mega-header__link:hover,
.aegis-mega-header__link:focus {
  text-decoration: underline;
}

.aegis-mega__columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(var(--aegis-mega-col-min), 1fr));
  column-gap: 24px;
  row-gap: 16px;
  align-items: start;
  justify-content: start;
}

.aegis-mega-header__column-title {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
}

.aegis-mega-header__column-divider {
  height: 1px;
  background: #e2e8f0;
  margin-bottom: 10px;
}

.aegis-mega__promo {
  display: grid;
  gap: 12px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  padding: 12px;
  min-height: 100%;
  align-self: stretch;
  border-radius: 0;
}

.aegis-mega-header__promo-card {
  background: #f3f4f6;
  border: 1px dashed #cbd5e1;
  border-radius: 0;
  padding: 0;
  width: 100%;
  height: 220px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.aegis-mega-header .aegis-mega__sidebar,
.aegis-mega-header .aegis-mega__sidebar-inner,
.aegis-mega-header .aegis-mega__promo,
.aegis-mega-header .aegis-mega-header__promo-card {
  border-radius: 0 !important;
}

.aegis-mega-header__promo-image {
  flex: 1;
  overflow: hidden;
}

.aegis-mega-header__promo-image img,
.aegis-mega-header__promo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  max-width: none;
  border-radius: 0;
}

.aegis-mega-header__promo-label,
.aegis-mega-header__promo-note {
  padding: 10px 12px 0 12px;
}

.aegis-mega-header__promo-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
  color: #0f172a;
}

.aegis-mega-header__promo-note {
  color: #475569;
  font-size: 13px;
}

@media (max-width: 1280px) {
  .aegis-mega-header__panel-grid {
    grid-template-columns: var(--aegis-mega-sidebar) 1fr;
  }

  .aegis-mega__promo {
    grid-column: 1 / -1;
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 1100px) {
  .aegis-mega__columns {
    grid-template-columns: repeat(3, minmax(var(--aegis-mega-col-min), 1fr));
  }
}

.aegis-mega-header__panel-empty {
  color: #475569;
  font-size: 14px;
  padding: 12px;
}

@media (max-width: 960px) {
  .aegis-header__main {
    display: none;
  }

  .aegis-mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    gap: 12px;
    min-height: 56px;
    border-bottom: 1px solid #e2e8f0;
  }

  .aegis-mobile-logo .aegis-header__brand-link {
    font-size: 22px;
  }

  .aegis-mobile-logo {
    flex: 1;
    display: flex;
    justify-content: center;
  }

  .aegis-mobile-icons {
    display: flex;
    gap: 10px;
    align-items: center;
  }

  .aegis-mobile-icon {
    text-decoration: none;
    color: #0f172a;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .aegis-mobile-btn {
    background: none;
    border: 0;
    padding: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111111;
  }

  .aegis-mobile-search {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    align-items: stretch;
    border-bottom: 1px solid #e2e8f0;
  }

  .aegis-mobile-search input[type="search"] {
    flex: 1;
    border: 1px solid #d1d5db;
    padding: 0 12px;
    font-size: 14px;
    border-radius: 0;
    height: 38px;
    line-height: 38px;
    background: #ffffff;
    color: #111827;
  }

  .aegis-mobile-search input[type="search"]:hover,
  .aegis-mobile-search input[type="search"]:focus {
    border-color: #111827;
    outline: none;
    box-shadow: inset 0 0 0 1px #111827;
  }

  .aegis-mobile-search-btn {
    background: #ffffff;
    color: #111827;
    border: 1px solid #d1d5db;
    padding: 0 14px;
    border-radius: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    box-shadow: none;
  }

  .aegis-mobile-search-btn:hover,
  .aegis-mobile-search-btn:focus {
    border-color: #111827;
    outline: none;
    box-shadow: inset 0 0 0 1px #111827;
    background: #ffffff;
    color: #111827;
  }

  .aegis-mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 98;
  }

  .aegis-mobile-overlay[hidden] {
    display: none;
  }

  .aegis-mobile-drawer {
    display: block;
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 99;
    width: 100%;
    max-width: 100%;
    overflow-y: auto;
  }

  .aegis-mobile-drawer[hidden] {
    display: none;
  }

  .aegis-mobile-drawer__header {
    display: grid;
    grid-template-columns: 60px 1fr 60px;
    align-items: center;
    padding: 12px 10px;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
  }

  .aegis-mobile-drawer__title {
    font-weight: 700;
    font-size: 16px;
  }

  .aegis-mobile-view {
    padding: 0;
  }

  .aegis-mobile-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .aegis-mobile-row {
    width: 100%;
    border: 0;
    background: #ffffff;
    text-align: left;
    padding: 0 16px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    cursor: pointer;
    color: #0f172a;
    text-decoration: none;
    border-bottom: 1px solid #e5e7eb;
  }

  .aegis-mobile-row__chev {
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .aegis-mobile-subheader {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
  }

  .aegis-mobile-back {
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .aegis-mobile-subtitle {
    font-weight: 700;
    font-size: 16px;
  }

  .aegis-mobile-subcontent {
    padding: 12px 16px 24px;
    display: grid;
    gap: 14px;
  }

  .aegis-mobile-section {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
  }

  .aegis-mobile-section:last-child {
    border-bottom: 0;
  }

  .aegis-mobile-section__title {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 15px;
  }

  .aegis-mobile-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
  }

  .aegis-mobile-link {
    color: #0f172a;
    text-decoration: none;
    font-size: 15px;
  }

  .aegis-mobile-viewall {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #0f172a;
    font-weight: 600;
  }
}

@media (max-width: 640px) {
  .aegis-header__main-inner {
    padding: 14px 16px;
  }

  .aegis-header__brand-image,
  .aegis-header__brand-link svg {
    height: var(--aegis-logo-h-mobile, 32px);
  }

  .aegis-header__tools {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .aegis-header__search input[type="search"] {
    min-width: 120px;
  }
}

/* Desktop home: keep header fixed so Up-Reveal shows at viewport top */
@media (min-width: 961px) {
  .aegis-mega-header.is-home {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;
  }
}


/* Noto Sans SC font for aegis-mega-header */
.aegis-mega-header,
.aegis-mega-header * {
  font-family: "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
