/* =========================================================
   XKY — Header + Nav + Hero (Core Only)
   ========================================================= */

/* ---------- A) 全局小修复 ---------- */
p:empty { display: none; }
::placeholder { color: #666; font-weight: 500; }


/* ---------- B) Header 布局 ---------- */
.xky-header{ position: relative; overflow: visible; }

.xky-headerbar{
  position: relative;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
}

.xky-headerbar__left{
  flex: 0 0 auto !important;
  min-width: 190px;
  overflow: visible !important;
  line-height: 0;
}

.xky-headerbar__center{
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex;
  justify-content: center;
}

.xky-headerbar__right{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1000000;
}

/* Logo */
a.xky-logo{ display: inline-flex; align-items: center; line-height: 0; }
a.xky-logo > img{ display: block; object-fit: contain !important; }

a.xky-logo > img.xky-logo__img--desktop{ display: block !important; height: 44px !important; width: auto !important; }
a.xky-logo > img.xky-logo__img--mobile{ display: none !important; }

@media (max-width: 1024px){
  a.xky-logo > img.xky-logo__img--desktop{ display: none !important; }
  a.xky-logo > img.xky-logo__img--mobile{
    display: block !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 10px !important;
  }
  .xky-headerbar{
    justify-content: flex-start !important;
    gap: 10px !important;
  }
  .xky-headerbar__center{ justify-content: flex-start !important; }
  .xky-headerbar__right{ margin-left: auto !important; }
}

/* 仅首页：白色背景 */
body.home .xky-headerbar{ background: #fff !important; }
body.home .xky-headerbar a,
body.home .xky-headerbar .menu-item > a{ color: #111 !important; }


/* ---------- C) 桌面导航 + Mega Menu（通用） ---------- */
.xky-nav-desktop{ display: flex; }
.xky-nav-mobile{ display: none; }

.desktop-nav{
  position: relative !important;  /* 定位基准 */
  display: flex;
  align-items: center;
  gap: 24px;
  height: 80px;
}

.desktop-nav .nav-item{
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.desktop-nav .nav-link{
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 6px;
  text-decoration: none;
  color: #111;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: .2px;
  text-transform: uppercase;
  position: relative;
  transition: color .2s ease;
}

.desktop-nav .nav-link::after{
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 18px;
  height: 3px;
  width: 0%;
  background: #dc2626;
  transition: width .25s ease;
}
.desktop-nav .nav-item:hover .nav-link{ color: #dc2626; }
.desktop-nav .nav-item:hover .nav-link::after{ width: 100%; }

/* Mega dropdown：absolute，跟着导航走 */
.xky-header .mega-dropdown{
  position: absolute !important;
  top: 100% !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) translateY(12px) !important;
  width: 1060px !important;
  max-width: 96vw !important;

  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 26px;
  box-shadow: 0 24px 60px rgba(0,0,0,.12);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
  transition-delay: 0.3s;
  z-index: 999999 !important;
  max-height: calc(100vh - 120px);
  overflow: hidden;
}

/* 打开状态 */
.xky-header .nav-item:hover .mega-dropdown{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) !important;
  transition-delay: 0s;
}

/* 透明桥接：填掉 nav-item 和 dropdown 之间的空隙 */
.xky-header .mega-dropdown::before{
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
  background: transparent;
}

/* 内层内容居中 */
.xky-header .mega-grid{
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 22px;
  max-height: calc(100vh - 120px);
  overflow: hidden;
}

.xky-header .category-title{
  display: block;
  font-size: .78rem;
  font-weight: 900;
  color: #dc2626;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin: 0 0 8px;
  padding: 0 0 6px;
  border-bottom: 2px solid #f2f2f2;
}

.xky-header .mega-tabs{ display: flex; flex-direction: column; gap: 6px; }
.xky-header .mega-tab{
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: #111;
  font-weight: 800;
  font-size: .86rem;
  line-height: 1.15;
  transition: background .15s ease, color .15s ease, transform .15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xky-header .mega-tab:hover,
.xky-header .mega-tab.active{
  background: #f6f6f6;
  color: #dc2626;
  transform: translateX(2px);
}

.xky-header .mega-panel{ display: none; }
.xky-header .mega-panel.active{ display: block; }

.xky-header .mega-products{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.xky-header .menu-product-item{
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background .15s ease, transform .15s ease, border-color .15s ease;
}
.xky-header .menu-product-item:hover{
  background: #fafafa;
  border-color: #eee;
  transform: translateY(-1px);
}

.xky-header .menu-thumb{
  width: 46px; height: 46px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #eee;
  background: #fff;
  flex-shrink: 0;
}

.xky-header .menu-text-group{ display: flex; flex-direction: column; line-height: 1.2; }
.xky-header .menu-model{ font-size: .92rem; font-weight: 900; color: #111; line-height: 1.15; }
.xky-header .menu-desc{
  font-size: .78rem;
  font-weight: 600;
  color: #777;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 440px;
}
.xky-header .menu-product-item:hover .menu-model{ color: #dc2626; }

.xky-header .mega-empty{
  padding: 14px;
  color: #666;
  background: #fafafa;
  border: 1px dashed #eee;
  border-radius: 10px;
}

@media (max-width: 1150px){
  .desktop-nav{ display: none; }
}


/* ---------- D) Machine Mega Menu — 三栏布局 ---------- */

/* 三栏：左分类 / 中产品列表 / 右预览图 */
.nav-item.has-mega.xky-mega-machine .mega-dropdown .mega-grid{
  display: grid !important;
  grid-template-columns: 260px 1fr 280px !important;
  gap: 18px !important;
  align-items: start !important;
}

/* 原 mega-right 只当数据源，不参与布局 */
.nav-item.has-mega.xky-mega-machine .mega-dropdown .mega-column.mega-right{
  display: none !important;
}

/* 左栏分割线 */
.nav-item.has-mega.xky-mega-machine .mega-column.mega-left{
  border-right: 1px solid #eef2f6 !important;
  padding-right: 12px !important;
}

/* 中栏 / 右栏 */
.nav-item.has-mega.xky-mega-machine .xky-list-col,
.nav-item.has-mega.xky-mega-machine .xky-preview-col{
  min-width: 0;
}

.nav-item.has-mega.xky-mega-machine .xky-list-col{
  padding-top: 18px !important;
  overflow: hidden !important;
  max-height: none !important;
}

/* 中栏：产品列表横向滚动 */
.nav-item.has-mega .xky-list-col .mega-products{
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 18px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(30,58,95,.35) transparent;
}
.nav-item.has-mega .xky-list-col .mega-products::-webkit-scrollbar{ height: 8px; }
.nav-item.has-mega .xky-list-col .mega-products::-webkit-scrollbar-thumb{
  background: rgba(30,58,95,.28);
  border-radius: 999px;
}

/* 每列固定宽度，纵向排列 */
.nav-item.has-mega .xky-list-col .mega-products > .xky-products-col{
  flex: 0 0 170px !important;
}
.nav-item.has-mega .xky-list-col .xky-products-col{
  display: flex !important;
  flex-direction: column !important;
  row-gap: 10px !important;
}

/* 产品行：文字链接，无图 */
.nav-item.has-mega.xky-mega-machine .xky-list-col a.menu-product-item{
  display: block !important;
  width: 100% !important;
  padding: 6px 2px !important;
  background: transparent !important;
  border-radius: 0 !important;
  text-decoration: none !important;
}
.nav-item.has-mega.xky-mega-machine .xky-list-col a.menu-product-item img{
  display: none !important;
}

/* model 文字 + 下划线 hover */
.nav-item.has-mega.xky-mega-machine .xky-list-col .menu-model{
  display: inline-block !important;
  font-weight: 700 !important;
  color: #1e3a5f !important;
  padding-bottom: 6px !important;
  border-bottom: 2px solid transparent !important;
}
.nav-item.has-mega.xky-mega-machine .xky-list-col a.menu-product-item:hover .menu-model,
.nav-item.has-mega.xky-mega-machine .xky-list-col a.menu-product-item.is-active .menu-model{
  color: #1e3a5f !important;
  font-weight: 800 !important;
  border-bottom-color: #1e3a5f !important;
}

/* 右侧预览图 */
.nav-item.has-mega.xky-mega-machine .xky-mega-preview{
  border: 1px solid #e6e9ef;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}
.nav-item.has-mega.xky-mega-machine .xky-mega-preview-img{
  width: 100%;
  height: 300px;
  object-fit: contain;
  display: block;
}


/* ---------- E) 移动端菜单 ---------- */
@media (max-width: 1024px){
  .xky-nav-desktop{ display: none !important; }
  .xky-nav-mobile{ display: block !important; }

  nav.xky-nav-mobile{ position: static !important; }

  .xky-nav-mobile .xky-mobile-toggle{
    width: 44px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #eee;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(0,0,0,.06);
  }
  .xky-nav-mobile .xky-toggle-text{ display: none !important; }

  .xky-nav-mobile .xky-burger{
    width: 22px; height: 14px;
    position: relative;
    background: linear-gradient(#111,#111) center/100% 2px no-repeat;
    transition: background .2s ease;
  }
  .xky-nav-mobile .xky-burger::before,
  .xky-nav-mobile .xky-burger::after{
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: #111;
    border-radius: 2px;
    transition: transform .2s ease, top .2s ease;
  }
  .xky-nav-mobile .xky-burger::before{ top: 0; }
  .xky-nav-mobile .xky-burger::after{ top: 12px; }

  .xky-nav-mobile.is-open .xky-burger{ background-size: 0 0; }
  .xky-nav-mobile.is-open .xky-burger::before{ top: 6px; transform: rotate(45deg); }
  .xky-nav-mobile.is-open .xky-burger::after{ top: 6px; transform: rotate(-45deg); }

  nav.xky-nav-mobile ul.xky-mobile-menu{
    display: none !important;
    flex-direction: column;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 12px;
  }
  nav.xky-nav-mobile.is-open ul.xky-mobile-menu{
    display: flex !important;
    position: absolute !important;
    left: 0 !important; right: 0 !important;
    top: calc(100% + 10px) !important;
    background: #fff !important;
    border: 1px solid #eee !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 40px rgba(0,0,0,.10) !important;
    z-index: 999999 !important;
    max-height: 70vh;
    overflow: auto;
  }

  nav.xky-nav-mobile ul.xky-mobile-menu a{
    text-decoration: none;
    color: #111;
    font-weight: 800;
    padding: 12px;
    border-radius: 12px;
    display: block;
    background: #fff;
    border: 1px solid transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
  }
  nav.xky-nav-mobile ul.xky-mobile-menu a:hover{
    background: #f6f6f6;
    color: #dc2626;
    border-color: #eee;
  }
}


/* ---------- F) 右侧：搜索 + 语言 ---------- */
.xky-search-pop{ z-index: 1000001 !important; }

.xky-search-btn{
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid #e9e9e9;
  background: #fff;
  color: #111;
  cursor: pointer;
}
.xky-search-btn:hover{ border-color: #ddd; }

.xky-headerbar__right .gtranslate_wrapper{
  display: flex;
  align-items: center;
  position: relative;
}
.xky-headerbar__right .gtranslate_wrapper select{
  height: 36px;
  max-width: 180px;
  padding: 0 34px 0 12px;
  border-radius: 10px;
  border: 1px solid #e9e9e9;
  background: #fff;
  font-weight: 900;
  letter-spacing: .4px;
  text-transform: uppercase;
  cursor: pointer;
  appearance: none;
}
.xky-headerbar__right .gtranslate_wrapper::after{
  content: '';
  position: absolute;
  right: 12px;
  width: 9px; height: 9px;
  border-right: 2px solid #111;
  border-bottom: 2px solid #111;
  transform: rotate(45deg);
  pointer-events: none;
}

@media (max-width: 1024px){
  .xky-headerbar__right .gtranslate_wrapper select{
    max-width: 68px;
    padding-left: 10px;
    padding-right: 26px;
    font-size: 12px;
  }
}


/* ---------- G) Hero ---------- */
.xky-hero{
  font-family: system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  color: #111827;
}

.xky-hero h1.xky-hero__title,
h1.xky-hero__title{
  font-size: clamp(28px, 2.6vw + 14px, 38px) !important;
  line-height: 1.05 !important;
}

.xky-hero__chips{ display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.xky-chip{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #0b3a6f;
  background: rgba(11,58,111,.08);
  border: 1px solid rgba(11,58,111,.18);
}

.xky-hero__meta{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: #374151;
  font-size: 13px;
  margin: 0 0 14px;
}
.xky-hero__meta strong{ color: #111827; }

.xky-hero__cta{ display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 10px; }
.xky-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
}
.xky-btn--primary{ background: #0b3a6f; color: #fff; }
.xky-btn--primary:hover{ background: #0a2f59; }
.xky-btn--ghost{ background: #fff; color: #0b3a6f; border-color: rgba(11,58,111,.28); }
.xky-btn--ghost:hover{ background: rgba(11,58,111,.06); }

.xky-hero__trust{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: #374151;
  font-size: 13px;
}
.xky-hero__dot{ opacity: .7; }
.mega-tabs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mega-tab {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #222;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.3;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
    cursor: pointer;
}

.mega-tab:hover {
    background: #f3f5f7;
    color: #1e3a5f;
}

.mega-tab.active {
    background: #eef3fb;
    color: #1e3a5f;
    box-shadow: inset 3px 0 0 #1e3a5f;
}
.xky-spec-card{margin:0 0 14px}
.xky-spec-card__grid{display:grid;grid-template-columns:1fr;gap:0;margin:0;padding:8px 14px 12px}
.xky-spec-card__row{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:8px 0;border-bottom:1px dashed #e5e7eb}
.xky-spec-card__row:last-child{border-bottom:none}
.xky-spec-card__k{margin:0;color:#6b7280;font-size:13px;font-weight:700}
.xky-spec-card__v{margin:0;color:#111827;font-size:13px;font-weight:750;justify-self:end;text-align:right}
.xky-spec-card__note{color:#6b7280;font-weight:650}
.xky-spec-table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  border:1px solid #e5e7eb;
  border-radius:14px;
  overflow:hidden;
  background:#fff;
}

.xky-spec-table thead th{
  background:#f8fafc;
  color:#111827;
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  font-weight:900;
  padding:12px 14px;
  border-bottom:1px solid #e5e7eb;
}

.xky-spec-table td{
  padding:12px 14px;
  border-bottom:1px solid #eef2f7;
  vertical-align:top;
  font-size:14px;
}

.xky-spec-table tr:last-child td{border-bottom:none}
.xky-spec-table__k{color:#374151;font-weight:750;width:42%}
.xky-spec-table__v{color:#111827;font-weight:800}
.xky-spec-table__note{color:#6b7280;font-weight:650}
@media (max-width: 768px) {
  .elementor-widget-text-editor table{
    display:block;
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  .elementor-widget-text-editor table td,
  .elementor-widget-text-editor table th{
    min-width:120px;
    white-space:nowrap;
  }
}
/* === Compact Related Products (6 columns) === */
.xky-related-wrapper{
  margin: 28px 0 24px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.xky-related-title{
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 1.6px !important;
  text-transform: uppercase !important;
  color: #111827 !important;
  margin-bottom: 14px !important;
  position: relative !important;
  padding-bottom: 10px !important;
}

.xky-related-title::after{
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 36px !important;
  height: 2px !important;
  background: #111827 !important;
}

.xky-related-grid{
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.xky-related-item{
  text-decoration: none !important;
  display: block !important;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease !important;
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 10px !important;
  padding: 12px 10px 10px !important;
  text-align: center !important;
  box-shadow: none !important;
}

.xky-related-item:hover{
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(17,24,39,.08) !important;
  border-color: rgba(11,58,111,.28) !important;
}

.xky-related-image{
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  background: #fff !important;
  border: 1px solid #eef2f7 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  margin: 0 auto 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px !important;
}

.xky-related-image img{
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}

.xky-related-model{
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #0b3a6f !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  line-height: 1.25 !important;
}

@media (max-width: 1024px){
  .xky-related-grid{ grid-template-columns: repeat(4, 1fr) !important; }
}
@media (max-width: 768px){
  .xky-related-grid{ grid-template-columns: repeat(2, 1fr) !important; }
}