/* 移动端菜单（与 main.js 内联样式保持一致） */
#header-placeholder {
  position: relative;
  z-index: 1000;
}
#site-header {
  position: relative;
  z-index: 1000;
  background: #fff;
}
#mobile-menu-btn {
  position: relative;
  z-index: 1001;
  cursor: pointer;
}
#mobile-menu {
  display: none !important;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 1002;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 16px 32px rgba(0, 43, 92, 0.14);
  max-height: min(75vh, 640px);
  overflow: auto;
}
#mobile-menu.is-open {
  display: block !important;
}
@media (min-width: 1024px) {
  #mobile-menu,
  #mobile-menu.is-open {
    display: none !important;
  }
  #mobile-menu-btn {
    display: none !important;
  }
}

/* 产品中心悬停 Mega Menu（倍福式卡片布局，与 main.js 内联样式保持一致） */
#mega-panel {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  top: 104px;
  z-index: 99999;
  box-sizing: border-box;
}
#mega-panel.is-open {
  display: block !important;
}
#mega-trigger {
  position: relative;
}
#mega-trigger .mega-chevron {
  transition: transform 0.2s ease;
}
#site-header.mega-open #mega-trigger {
  color: #004899 !important;
}
#site-header.mega-open #mega-trigger .mega-chevron {
  transform: rotate(180deg);
  color: #004899;
}
#site-header.mega-open #mega-trigger::after {
  content: '';
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0;
  height: 2px;
  background: #FF6B00;
}
#mega-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  top: 104px;
  z-index: 99998;
  background: rgba(0, 43, 92, 0.28);
}
#mega-backdrop.is-open {
  display: block !important;
}
#mega-panel .mega-sheet {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 16px 48px rgba(0, 43, 92, 0.16);
}
#mega-panel .mega-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2rem;
  max-height: min(78vh, 720px);
  overflow: auto;
  color: #1e293b;
  box-sizing: border-box;
}
@media (min-width: 1024px) {
  #mega-panel .mega-inner {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
#mega-cats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem 2rem;
}
@media (min-width: 640px) {
  #mega-cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  #mega-cats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
#mega-cats .mega-col {
  min-width: 0;
}
#mega-cats .mega-head-row {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin-bottom: 0.75rem;
  text-decoration: none;
  color: inherit;
}
#mega-cats .mega-head-row:hover .mega-name {
  color: #004899;
}
#mega-cats .mega-thumb {
  width: 72px;
  height: 54px;
  flex-shrink: 0;
  background: #F4F6F8;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#mega-cats .mega-thumb img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  display: block;
}
#mega-cats .mega-head-text {
  min-width: 0;
  padding-top: 0.1rem;
}
#mega-cats .mega-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
  letter-spacing: 0.01em;
}
#mega-cats .mega-desc {
  margin: 0.3rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #64748b;
}
#mega-cats .mega-links {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #e2e8f0;
}
#mega-cats .mega-links li {
  margin: 0;
  border-bottom: 1px solid #e2e8f0;
}
#mega-cats .mega-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.15rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #334155;
  text-decoration: none;
  transition: color 0.15s ease;
}
#mega-cats .mega-links a:hover {
  color: #004899;
}
#mega-cats .mega-links .mega-arrow {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid #FF6B00;
  border-top: 2px solid #FF6B00;
  transform: rotate(45deg);
  flex-shrink: 0;
  opacity: 0.95;
}

/* 全局搜索 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.site-search {
  position: relative;
  flex-shrink: 0;
  margin-left: 0.35rem;
  width: 11.5rem;
}
@media (min-width: 1280px) {
  .site-search {
    width: 13.5rem;
  }
}
.site-search--mobile {
  width: 100%;
  margin: 0;
}
.site-search-field {
  position: relative;
  display: flex;
  align-items: center;
}
.site-search-icon {
  position: absolute;
  left: 0.65rem;
  width: 0.9rem;
  height: 0.9rem;
  color: #94a3b8;
  pointer-events: none;
}
.site-search-field input {
  width: 100%;
  height: 2.15rem;
  padding: 0 0.7rem 0 2rem;
  border: 1px solid #e2e8f0;
  background: #F4F6F8;
  color: #0f172a;
  font-size: 0.8125rem;
  line-height: 1.25;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.site-search-field input::placeholder {
  color: #94a3b8;
}
.site-search-field input:hover {
  border-color: #cbd5e1;
  background: #fff;
}
.site-search-field input:focus {
  border-color: #004899;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 72, 153, 0.12);
}
.site-search-results {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 1003;
  max-height: min(60vh, 22rem);
  overflow: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 32px rgba(0, 43, 92, 0.14);
}
.site-search--mobile .site-search-results {
  position: relative;
  top: 0.4rem;
  box-shadow: none;
}
.site-search-item {
  display: block;
  padding: 0.65rem 0.8rem;
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
  color: inherit;
  transition: background-color 0.12s ease;
}
.site-search-item:last-child {
  border-bottom: 0;
}
.site-search-item:hover,
.site-search-item.is-active {
  background: #F4F6F8;
}
.site-search-item-title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #002B5C;
  line-height: 1.35;
}
.site-search-item-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.7rem;
  color: #64748b;
  line-height: 1.35;
}
.site-search-empty {
  padding: 0.85rem 0.8rem;
  font-size: 0.8125rem;
  color: #64748b;
}
.site-search-mark {
  color: #E30613;
  font-weight: 700;
  background: transparent;
}
