.site-header { --header-height: 76px; border-bottom: 1px solid #dce3ea; }
.site-header .header-container { width: min(1640px, calc(100% - 48px)); }
.site-header .nav-shell { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 16px; }
.site-header .brand { justify-self: start; }
.site-header .brand-logo { width: clamp(176px, 15vw, 226px); }
.site-header .global-nav { margin: 0; gap: clamp(14px,1.3vw,24px); justify-self: center; }
.site-header .global-nav > .global-link, .site-header .global-nav > .nav-dropdown > summary { font-size: 13px; font-weight: 500; letter-spacing: .005em; }
.site-header .header-tools { gap: 8px; margin: 0; justify-self: end; }
.site-header .header-tools .icon-button { width: 36px; min-width: 36px; height: 44px; }
.site-header .header-tools .library-header-button { min-height: 40px; padding: 8px 12px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.site-header .header-cta { padding: 10px 14px !important; font-size: 12px !important; font-weight: 600; white-space: nowrap; }
.site-header .language-switcher { display: inline-flex; position: relative; gap: 6px; min-width: 48px; min-height: 44px; justify-content: center; border-radius: 6px; }
.site-header .language-switcher select { position: absolute; inset: 0; opacity: 0; width: 100%; min-width: 0; z-index: 1; }
.site-header .language-switcher:focus-within { outline: 2px solid #df321f; outline-offset: 2px; }
.site-header .marketing-language-code { font-size: 12px; font-weight: 500; }
.site-header .mobile-language-switcher { justify-content: flex-end; padding-right: 16px; }
.site-header .menu-panel { border-radius: 12px; border: 1px solid #dce3ea; box-shadow: 0 14px 36px #16202d12; }
.site-header .mobile-nav .menu-panel { box-shadow: none; border: 0; }
.site-header .search-panel .container { width: min(1280px, calc(100% - 48px)); }
.site-header :is(a,button,summary,select):focus-visible { outline: 2px solid #df321f; outline-offset: 3px; }

.site-header .nav-shell:has(.products-mega-dropdown) { position: relative; }
.site-header .global-nav > .products-mega-dropdown { position: static; }
.site-header .global-nav .products-mega-panel {
  inset: calc(100% + 8px) auto auto 50%;
  width: min(1112px, 100%);
  transform: translateX(-50%);
  box-shadow: 0 14px 36px #16202d1f;
}

.site-header :is(.global-nav, .mobile-nav) .menu-panel.products-mega-panel {
  padding: 0;
  border: 1px solid var(--palette-line, #dce3ea);
  border-radius: 12px;
  background: var(--palette-surface, #fff);
  color: var(--palette-ink, #16202d);
}

.products-mega-layout { display: grid; gap: 18px; padding: 22px; }
.products-mega-dropdown[open] .products-mega-layout { animation: products-mega-open 180ms ease-out both; }

@keyframes products-mega-open {
  from { opacity: 0; translate: 0 -4px; }
  to { opacity: 1; translate: 0 0; }
}

.products-mega-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 16px 22px;
  border: 1px solid var(--palette-line, #dce3ea);
  border-radius: 10px;
  background: var(--palette-background, #f3f6fa);
}

.products-mega-copy { display: grid; gap: 8px; }
.products-mega-copy h2 { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.2; }
.products-mega-copy p { max-width: 68ch; margin: 0; color: #4f637b; font-size: 15px; line-height: 1.55; }
.products-mega-label { margin: 0 0 10px; color: var(--palette-ink, #16202d); font-size: 14px; font-weight: 700; line-height: 1.4; }
.products-mega-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

.site-header :is(.global-nav, .mobile-nav) .products-mega-panel a.products-mega-cta {
  display: inline-flex;
  margin-top: 5px;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--palette-action, #df321f);
  border-radius: 7px;
  background: var(--palette-action, #df321f);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.site-header :is(.global-nav, .mobile-nav) .products-mega-panel a.products-mega-cta:hover {
  border-color: var(--red-dark, #ad2114);
  background: var(--red-dark, #ad2114);
}

.site-header :is(.global-nav, .mobile-nav) .products-mega-panel a.products-mega-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: start;
  gap: 5px;
  min-width: 0;
  min-height: 108px;
  padding: 12px 13px 10px 16px;
  border: 1px solid var(--palette-line, #dce3ea);
  border-radius: 10px;
  background: var(--palette-background, #f3f6fa);
  color: var(--palette-ink, #16202d);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.products-mega-card::before {
  position: absolute;
  inset: 13px auto auto 0;
  width: 3px;
  height: 30px;
  border-radius: 0 3px 3px 0;
  background: #8192a5;
  content: '';
}

.products-mega-name { font-weight: 700; }
.products-mega-summary { color: #4f637b; font-size: 13px; line-height: 1.45; }
.products-mega-card > .icon { justify-self: end; }
.products-mega-panel :is(.products-mega-card, .products-mega-cta) > .icon {
  width: 14px;
  height: 14px;
  flex: none;
  transform: rotate(-90deg);
}

.site-header :is(.global-nav, .mobile-nav) .products-mega-panel a.products-mega-card:hover {
  background: var(--palette-accent-soft, #eaf0f6);
}

.site-header :is(.global-nav, .mobile-nav) .products-mega-panel a.products-mega-card[aria-current='page'] {
  border-color: #f0d5d0;
  background: var(--red-soft, #fff1ef);
  color: var(--red-dark, #ad2114);
}

.products-mega-card[aria-current='page']::before { background: var(--palette-action, #df321f); }

@media (max-width: 1439px) {
 .site-header .nav-shell { grid-template-columns: minmax(0,1fr) auto; gap: 12px; }
 .site-header .global-nav, .site-header .header-tools > .library-header-button, .site-header .header-tools > .header-cta { display: none; }
 .site-header .header-tools > .language-switcher { display: inline-flex; }
 .site-header .nav-toggle { display: block; }
 .site-header .mobile-nav { max-height: var(--available-panel-height,75dvh); overflow-y: auto; padding: 10px 24px 24px; }
 .site-header .mobile-nav:not([hidden]) { display: block; }
 .site-header .mobile-nav > .nav-dropdown { border-bottom: 1px solid #dce3ea; }
 .site-header .mobile-nav .nav-dropdown > summary { min-height: 52px; height: auto; justify-content: space-between; font-size: 15px; }
 .site-header .mobile-nav .nav-dropdown.current > summary { border-bottom: 0; }
 .site-header .mobile-nav .menu-panel { position: static; width: auto; padding: 0 0 12px 12px; }
 .site-header .mobile-nav .menu-panel a { border: 0; font-size: 14px; }
 .site-header .mobile-nav > .global-link { min-height: 52px; }
 .site-header .mobile-nav > .button { margin-top: 18px; }
 .site-header .mobile-nav .products-mega-panel { margin-bottom: 12px; }
 .products-mega-layout { padding: 16px; }
}
@media (max-width: 800px) {
 .products-mega-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
 .products-mega-layout { gap: 13px; padding: 12px; }
 .products-mega-overview { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 13px; }
 .products-mega-copy h2 { font-size: 19px; }
 .products-mega-copy p { font-size: 13px; }
 .products-mega-grid { gap: 6px; }
 .site-header .mobile-nav .products-mega-panel a.products-mega-card { padding: 8px 8px 8px 10px; font-size: 13px; }
 .products-mega-summary { font-size: 12px; }
 .site-header .mobile-nav .products-mega-panel a.products-mega-cta { justify-self: start; gap: 4px; padding-inline: 7px; font-size: 12px; }
 .products-mega-panel :is(.products-mega-card, .products-mega-cta) > .icon { width: 11px; }
}
@media (max-width: 480px) {
 .site-header { --header-height: 68px; }
 .site-header .header-container { width: calc(100% - 24px); }
 .site-header .brand-logo { width: 160px; }
 .site-header .header-tools { gap: 2px; }
 .site-header .header-tools .icon-button { width: 30px; min-width: 30px; }
 .site-header .language-switcher { min-width: 42px; gap: 4px; }
 .site-header .language-switcher > .icon { width: 15px; }
 .site-header .search-panel .container { width: calc(100% - 32px); }
 .site-header .search-results { grid-template-columns: 1fr; }
}
@media (max-width: 359px) {
 .site-header .brand-logo { width: 142px; }
 .site-header .nav-shell { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
 .products-mega-dropdown[open] .products-mega-layout { animation: none; }
 .site-header :is(.global-nav, .mobile-nav) .products-mega-panel a.products-mega-card { transition: none; }
}
