/* HB-357 — sticky real #site-sticky-header on storefront (theme-safe; no C7/BN2) */
html.storefront-root {
  --hb357-header-z: 1200;
}

html.storefront-root,
html.storefront-root body {
  overflow-x: clip !important;
  overflow-y: visible !important;
}

/* Keep sticky ancestors from clipping the header */
html.storefront-root #root,
html.storefront-root #root > div,
html.storefront-root main,
html.storefront-root [data-hb357-overflow-fix="1"] {
  overflow: visible !important;
  overflow-x: clip !important;
  overflow-y: visible !important;
}

html.storefront-root #site-sticky-header,
html.storefront-root header.saas-sticky-header,
#site-sticky-header.saas-sticky-header {
  position: sticky !important;
  top: 0 !important;
  z-index: var(--hb357-header-z, 1200) !important;
  visibility: visible !important;
  pointer-events: auto !important;
  display: block !important;
  width: 100% !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
}

/* Injected auth-page header (real chrome: logo / search / nav / login) */
#site-sticky-header[data-hb357-injected="1"] {
  box-sizing: border-box;
  border-bottom: 1px solid #d7e4ee;
  background: #ffffff;
  color: #102033;
  font-family: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

#site-sticky-header[data-hb357-injected="1"] *,
#site-sticky-header[data-hb357-injected="1"] *::before,
#site-sticky-header[data-hb357-injected="1"] *::after {
  box-sizing: border-box;
}

#site-sticky-header[data-hb357-injected="1"] .hb357-announce {
  background: linear-gradient(90deg, #f0f9ff 0%, #ecfeff 50%, #f0f9ff 100%);
  border-bottom: 1px solid #dbeafe;
  color: #0f172a;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
}

#site-sticky-header[data-hb357-injected="1"] .hb357-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.65rem 1rem;
}

#site-sticky-header[data-hb357-injected="1"] .hb357-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

#site-sticky-header[data-hb357-injected="1"] .hb357-logo img {
  display: block;
  height: 2.75rem;
  width: auto;
  max-width: 9.5rem;
  object-fit: contain;
}

#site-sticky-header[data-hb357-injected="1"] .hb357-search {
  flex: 1 1 14rem;
  min-width: 10rem;
  display: flex;
  align-items: stretch;
  border: 1px solid #c9d7e2;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
}

#site-sticky-header[data-hb357-injected="1"] .hb357-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 0.55rem 0.85rem;
  font-size: 0.95rem;
  color: #102033;
  background: transparent;
}

#site-sticky-header[data-hb357-injected="1"] .hb357-search button {
  border: 0;
  background: #0891b2;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0 0.95rem;
  cursor: pointer;
  white-space: nowrap;
}

#site-sticky-header[data-hb357-injected="1"] .hb357-search button:hover {
  background: #0e7490;
}

#site-sticky-header[data-hb357-injected="1"] .hb357-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-left: auto;
}

#site-sticky-header[data-hb357-injected="1"] .hb357-actions a {
  text-decoration: none;
  color: #0f766e;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.35rem 0.55rem;
  border-radius: 0.5rem;
}

#site-sticky-header[data-hb357-injected="1"] .hb357-actions a:hover {
  background: #ecfeff;
  color: #115e59;
}

#site-sticky-header[data-hb357-injected="1"] .hb357-nav {
  border-top: 1px solid #e8f0f6;
  background: #f8fbfd;
}

#site-sticky-header[data-hb357-injected="1"] .hb357-nav-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.35rem 1rem 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.15rem;
  align-items: center;
}

#site-sticky-header[data-hb357-injected="1"] .hb357-nav a {
  text-decoration: none;
  color: #1e293b;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  border-radius: 0.55rem;
}

#site-sticky-header[data-hb357-injected="1"] .hb357-nav a:hover,
#site-sticky-header[data-hb357-injected="1"] .hb357-nav a[aria-current="page"] {
  background: #e0f2fe;
  color: #0e7490;
}

@media (max-width: 640px) {
  #site-sticky-header[data-hb357-injected="1"] .hb357-logo img {
    height: 2.25rem;
    max-width: 7.5rem;
  }
  #site-sticky-header[data-hb357-injected="1"] .hb357-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}
