/* Shared LMC Metal customer Header shell.
   This file loads after the page-specific styles so the main site and the
   frozen Materials Library keep one effective geometry and breakpoint model. */

.site-header {
  min-height: 76px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 26px;
  padding: 0 40px;
}

.site-header .brand {
  min-width: 0;
  display: flex;
  align-items: center;
}

.site-header .brand img {
  width: 170px;
  height: auto;
  max-height: 40px;
  object-fit: contain;
}

.site-header .main-nav {
  min-width: 0;
  gap: 24px;
}

.site-header .mobile-nav {
  display: none;
}

.site-header .main-nav a,
.site-header .header-nav-item {
  min-height: 76px;
  font-size: 13px;
  font-weight: 700;
}

.site-header .mini-inquiry {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .site-header {
    gap: 18px;
    padding: 0 24px;
  }

  .site-header .main-nav {
    gap: 15px;
  }

  .site-header .language-switch a {
    min-width: 33px;
    padding-right: 7px;
    padding-left: 7px;
  }
}

@media (max-width: 1000px) {
  .site-header {
    min-height: 68px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    padding: 10px 24px;
  }

  .site-header .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .site-header .language-switch {
    grid-column: 2;
    grid-row: 1;
  }

  .site-header .nav-disclosure {
    grid-column: 3;
    grid-row: 1;
    display: inline-flex;
  }

  .site-header .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 6px;
    background: rgba(7, 7, 8, .99);
  }

  .site-header.is-menu-open .main-nav {
    display: grid;
  }

  .site-header .main-nav a,
  .site-header .header-nav-item {
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 4px;
    background: rgba(255, 255, 255, .04);
    font-size: 12px;
  }

  .site-header .main-nav a::after,
  .site-header .header-nav-item::after {
    display: none;
  }

  .site-header .mini-inquiry {
    display: none;
  }

  /* The same product destinations stay available in the collapsed header. */
  .products-mega {
    display: block;
    padding: 8px 12px 12px;
  }

  .products-mega .products-mega-panel {
    max-width: 680px;
    max-height: calc(100dvh - var(--menu-top) - 20px);
    overflow: auto;
    padding: 16px;
  }

  .products-mega .products-mega-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: auto;
    gap: 8px;
  }

  .products-mega .products-mega-card {
    display: flex !important;
    align-items: center;
    height: auto !important;
    min-height: 44px !important;
    max-height: none !important;
  }

  .products-mega .products-mega-card > .products-mega-media,
  .products-mega .products-mega-card small {
    display: none !important;
  }

  .products-mega .products-mega-card > span:not(.products-mega-media) {
    position: static;
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 12px;
    background: none;
  }

  .products-mega .products-mega-card strong {
    font-size: 13px;
    line-height: 1.4;
  }

  .products-mega .products-mega-controls {
    flex-wrap: wrap;
    gap: 10px;
  }

  .products-mega .products-mega-foot {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 4px 16px;
    margin-top: 12px;
    white-space: normal;
  }

  .products-mega .products-mega-foot a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

@media (max-width: 760px) {
  .products-mega .products-mega-panel {
    max-width: 420px;
  }

  .products-mega .products-mega-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    min-height: auto;
    gap: 8px;
    padding: 12px 16px 9px;
  }

  .site-header .brand img {
    width: min(156px, 100%);
  }

  .site-header .language-switch {
    padding: 2px;
  }

  .site-header .language-switch a {
    min-width: 31px;
    min-height: 30px;
    padding-right: 6px;
    padding-left: 6px;
    font-size: 11px;
  }

  .site-header .nav-disclosure {
    min-width: 82px;
    padding-right: 11px;
    padding-left: 11px;
  }
}
