/**
 * Header Styles - 页头样式
 * 根据设计图 desgin/header.jpg 一比一还原
 * 左右两栏布局：左侧Logo，右侧两行内容
 */

/* ========================================
   Header Main Container - 页头主容器
   ======================================== */
.site-header {
  background-color: #000000;
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 15px 0;
}

.site-header .container-fluid {
  padding-left: 40px;
  padding-right: 40px;
}

/* Header整体布局：左右两栏 */
.header-wrapper {
  display: flex !important;
  align-items: center !important;
  gap: 60px;
  flex-direction: row !important;
  position: relative !important;  /* 为大型菜单提供定位上下文 */
}

/* ========================================
   Left Column - 左侧栏（Logo）
   ======================================== */
.header-left {
  flex-shrink: 0;
  display: block !important;
}

.navbar-brand {
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
}

.site-logo {
  max-height: 50px !important;
  width: auto !important;
  transition: all 0.3s ease;
}

.navbar-brand:hover .site-logo {
  opacity: 0.8;
}

/* ========================================
   Right Column - 右侧栏（两行内容）
   ======================================== */
.header-right {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 25px;
}

/* ========================================
   Top Row - 第一行（多语言+搜索 | 邮箱+电话）
   ======================================== */
.header-top-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-direction: row !important;
}

/* 左边：多语言切换 + 搜索框 */
.header-top-left {
  display: flex !important;
  align-items: center !important;
  gap: 15px;
  flex-direction: row !important;
}

/* 右边：邮箱 + 电话 */
.header-top-right {
  display: flex !important;
  align-items: center !important;
  gap: 85px;
  flex-direction: row !important;
}

.header-contact-item {
  color: #ffffff;
  text-decoration: none;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease; position: relative;
}
.header-contact-item:after{ content:''; width:7px; height:15px; border-radius:10px; background:#fff; display:block; position:absolute; Right:-45px; top:5px;}
.header-top-right .header-contact-item:last-child:after{ display:none}
.site-header{ position:relative}
.site-header:after{ content:''; width:100%; height:47px; background:url(/wp-content/themes/eleven/assets/images/head-bg.webp) right center no-repeat; position:absolute; right:0; top:10px; display: block; z-index: -1;}

.header-contact-item:hover {
  color: #dc3545;
  text-decoration: none;
}

.header-contact-btn .btn-contact{ background:#e60012; border-radius:10px; font-size:20px}

/* ========================================
   Language Dropdown - 多语言切换
   ======================================== */
.language-dropdown {
  position: relative;
}

.btn-language {
  background-color: transparent;
  border: none;
  color: #ffffff;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-language:hover,
.btn-language:focus {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-language .flag-icon {
  width: 24px;
  height: 16px;
  object-fit: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-language .lang-code {
  font-weight: 600;
}

/* 语言Dropdown菜单 */
.language-dropdown .dropdown-menu {
  background-color: #1a1a1a;
  border: none;
  border-radius: 0;
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
  min-width: 280px;
}

.dropdown-languages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.language-dropdown .dropdown-item {
  color: #ffffff;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  transition: all 0.3s ease;
}

.language-dropdown .dropdown-item:hover,
.language-dropdown .dropdown-item:focus {
  background-color: #dc3545;
  color: #ffffff;
}

.language-dropdown .dropdown-item img {
  width: 24px;
  height: 16px;
  object-fit: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========================================
   Inline Search Box - 内联搜索框
   ======================================== */
.header-search-inline {
  display: flex;
  align-items: center;
  background-color: #2a2a2a;
  border-radius: 20px;
  padding: 6px 15px;
  height: 32px;
}

.header-search-inline .search-icon {
  color: #999;
  font-size: 13px;
  margin-right: 8px;
}

.search-form-inline {
  margin: 0;
  flex: 1;
}

.search-input-inline {
  background: transparent;
  border: none;
  color: #ffffff;
  outline: none;
  width: 140px;
  font-size: 13px;
  padding: 0;
}

.search-input-inline::placeholder {
  color: #999;
}

.search-input-inline:focus {
  outline: none;
}

/* ========================================
   Bottom Row - 第二行（导航菜单 + Contact Us按钮）
   ======================================== */
.header-bottom-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-direction: row !important;
}

/* 导航菜单容器 - 桌面端始终显示 */
.navbar-collapse {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex: 1 !important;
  flex-direction: row !important;
}

/* 主导航菜单 */
.main-navigation {
  flex: 1 !important;
}

.navbar-nav {
  display: flex !important;
  align-items: center !important;
  gap: 15px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  flex-direction: row !important;
}

.navbar-nav .nav-item {
  position: relative;
}

.navbar-nav .nav-link {
  color: #ffffff !important;
  font-size: 20px !important;
  font-weight: 400 !important;
  padding: 8px 18px !important;
  transition: all 0.3s ease;
  text-transform: none !important;
  text-decoration: none !important;
  display: block !important;font-family: var(--font-family-3);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #dc3545 !important;
}

/* Products菜单项激活状态 - 和下拉菜单一体化 */
.navbar-nav .mega-menu-item.show > .nav-link,
.navbar-nav .mega-menu-item:hover > .nav-link {
  background-color: #ffffff !important;
  color: #000000 !important;
  border-radius: 8px 8px 0 0 !important;
  position: relative !important;
  z-index: 10000 !important;
}

/* 修复Products下拉箭头图标 */
.navbar-nav .mega-menu-item > .nav-link::after {
  display: inline-block;
  margin-left: 0.3em;
  vertical-align: 0.15em;
  content: "";
  border-top: 0.3em solid;
  border-right: 0.3em solid transparent;
  border-bottom: 0;
  border-left: 0.3em solid transparent;
}

/* 激活状态时箭头颜色 */
.navbar-nav .mega-menu-item.show > .nav-link::after,
.navbar-nav .mega-menu-item:hover > .nav-link::after {
  border-top-color: #000000;
}

/* Dropdown菜单 */
.navbar-nav .dropdown-menu {
  background-color: #1a1a1a;
  border: none;
  border-radius: 0;
  margin-top: 0;
  padding: 10px 0;
}

.navbar-nav .dropdown-item {
  color: #ffffff;
  padding: 10px 20px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.navbar-nav .dropdown-item:hover,
.navbar-nav .dropdown-item:focus {
  background-color: #dc3545;
  color: #ffffff;
}

/* ========================================
   Contact Us Button - Contact Us按钮
   ======================================== */
.header-contact-btn {
  flex-shrink: 0;
}

.btn-contact {
  background-color: #dc3545;
  color: #ffffff;
  border: none;
  padding: 10px 25px;
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  border-radius: 4px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-contact:hover {
  background-color: #c82333;
  color: #ffffff;
  text-decoration: none;
}

.btn-contact i {
  font-size: 12px;
}
.navbar-nav>.menu-item>.nav-link{ position:relative}
.navbar-nav>.menu-item:hover>.nav-link:after{ content:''; width:15px; height:5px;background: #e60012; border-radius: 10px; display:block; position:absolute; left:50%; bottom:0;transform: translateX(-50%);border:0;margin: 0;}

/* ========================================
   Search Overlay - 搜索弹出层
   ======================================== */
.search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.search-overlay.active {
  display: flex;
}

.search-overlay-content {
  position: relative;
  width: 90%;
  max-width: 600px;
}

.search-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-close:hover {
  color: #dc3545;
}

.logo-search {
  text-align: center;
  margin-bottom: 30px;
}

.logo-search img {
  max-height: 60px;
  width: auto;
}

.search-form {
  display: flex;
  background-color: #ffffff;
  border-radius: 50px;
  overflow: hidden;
}

.search-input {
  flex: 1;
  padding: 15px 25px;
  border: none;
  font-size: 16px;
  outline: none;
}

.search-submit {
  background-color: #dc3545;
  border: none;
  padding: 15px 30px;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-submit:hover {
  background-color: #c82333;
}

/* 移动端汉堡菜单按钮 */
.navbar-toggler {
  display: none;
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.navbar-toggler-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff;
  position: relative;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff;
  position: absolute;
  left: 0;
}

.navbar-toggler-icon::before {
  top: -8px;
}

.navbar-toggler-icon::after {
  bottom: -8px;
}

/* ========================================
   Mobile Responsive - 移动端响应式
   ======================================== */
@media (max-width: 991px) {
  .site-header .container-fluid {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Header改为垂直布局 */
  .header-wrapper {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }

  .header-left {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .site-logo {
    max-height: 40px;
  }

  /* 显示汉堡菜单按钮 */
  .navbar-toggler {
    display: block;
  }

  /* 右侧栏改为垂直布局 */
  .header-right {
    gap: 10px;
  }

  /* 第一行改为垂直布局 */
  .header-top-row {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .header-top-left {
    justify-content: space-between;
  }

  .header-top-right {
    justify-content: center;
    gap: 15px;
  }

  .header-contact-item {
    font-size: 12px;
  }

  /* 搜索框调整 */
  .search-input-inline {
    width: 100px;
  }

  /* 第二行：导航菜单折叠 */
  .header-bottom-row {
    flex-direction: column;
    align-items: stretch;
  }

  .navbar-collapse {
    display: none !important;
    flex-direction: column;
    background-color: #1a1a1a;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
  }

  .navbar-collapse.show {
    display: flex !important;
  }

  .main-navigation {
    width: 100%;
  }

  .navbar-nav {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .navbar-nav .nav-link {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .header-contact-btn {
    width: 100%;
    margin-top: 15px;
  }

  .btn-contact {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .header-top-left {
    flex-direction: column;
    gap: 10px;
  }

  .language-dropdown,
  .header-search-inline {
    width: 100%;
  }

  .btn-language {
    width: 100%;
    justify-content: center;
  }

  .header-top-right {
    flex-direction: column;
    gap: 10px;
  }
}
