/* ========== Header头部导航样式 ========== */
.header {
  display: flex;
  align-items: center;
  vertical-align: middle;
  justify-content: space-between;
  padding: 16px 0px;
  position: sticky;
  top: 0;
  z-index: 99;
}
.mobile-nav-box {
  display: flex;
  align-items: center;
  vertical-align: middle;
}

/* AI搜索 */

.header-icons {
  cursor: pointer;
}
.ui-btn-box-ai {
  float: right;
}

.ui-btn-box {
  display: flex;
  align-items: center;
  width: 100px;
  height: 30px;
  font-size: 12px;
  background: none;
  line-height: 32px;
  border-radius: 8px;
  color: var(--theme-color1);
  -webkit-transition: all 300ms ease;
  transition: all 300ms ease;
  border: 1px solid rgba(34, 48, 53, 0.2);
  margin: 0 6px 0 0;

}

.header-1 .ui-btn-box {
  border: 1px solid rgba(255, 255, 255, 1) !important;
}
.ui-btn-box img {
  width: auto;
  height: 20px;
  margin: 0 6px 0 10px;

}
.ui-btn-box .ui-btn {
  display: block;
  display: flex;
  color:#666;
  
}

/*  */

.logo {
  height: 48px;
  width: auto;
}

.nav {
  display: flex;
  justify-content: space-between;
  flex:0.6;
  gap: 36px;
}

.nav a {
  text-decoration: none;
  color: #333;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s;
}

.nav .current {
  /* color: #5a42ec; */
  /* 渐变底线核心代码 */
  background: linear-gradient(to right, #09bbfe, #5a42ec);
  /* 左→右渐变颜色 */
  background-size: 100% 3px;
  /* 底线宽度100%，高度3px（可改粗细） */
  background-repeat: no-repeat;
  background-position: left bottom;
  /* 固定在文字底部 */
  padding-bottom: 4px;
  /* 文字和底线的间距（可调整） */
}

.nav .nav-box {
  position: relative;
  display: inline-block;
}

/* 下拉菜单默认状态 —— 隐藏 + 动画准备 */
.nav .dropdown-box {
  position: absolute;
  left: 50%;
  width: 180px;
  top: 110%;
  z-index: 100;
  text-align: center;
  background-color: #fff;
  margin-left: -90px;
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
  padding-top: 4px;
  /* 动画核心 ↓↓↓ */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  /* 向上偏移，滑入效果 */
  transition: all 0.28s ease;
  /* 平滑过渡时间 */
}

.nav .dropdown-box p {
  height: 36px;
  line-height: 36px;
}

/* 鼠标悬停显示 —— 淡入 + 滑下 */
.nav .nav-box:hover .dropdown-box {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  /* 滑回正常位置 */
}

.nav a:hover {
  color: #5a42ec;
}

/* ========== 手机端导航核心样式 ========== */
.mobile-nav-btn {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  /* 高于遮罩层 */
}

.mobile-nav-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: #333;
  position: relative;
  transition: all 0.3s;
}

.mobile-nav-btn span::before,
.mobile-nav-btn span::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: #333;
  left: 0;
  transition: all 0.3s;
}

.mobile-nav-btn span::before {
  top: -8px;
}

.mobile-nav-btn span::after {
  bottom: -8px;
}

/* 菜单展开时的汉堡按钮样式 */
.mobile-nav-btn.active span {
  background: transparent;
}

.mobile-nav-btn.active span::before {
  top: 0;
  transform: rotate(45deg);
}

.mobile-nav-btn.active span::after {
  bottom: 0;
  transform: rotate(-45deg);
}

/* 手机端导航面板 */
.mobile-nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: #fff;
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  padding: 80px 20px 20px;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav-panel.active {
  transform: translateX(0);
}

.mobile-nav-panel .mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mobile-nav-panel .mobile-nav-list a {
  text-decoration: none;
  color: #333;
  font-size: 16px;
  font-weight: 500;
}

.mobile-nav-panel .mobile-nav-list a.current {
  color: #5a42ec;
}

.mobile-nav-panel .mobile-nav-list a:hover {
  color: #5a42ec;
}

/* 遮罩层 */
.mobile-nav-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.mobile-nav-mask.active {
  display: block;
}

/* 移动端适配头部 */
@media (max-width: 768px) {
  .header {
    padding: 6px 0px;
  }

  .logo {
    height: 34px !important;
  }

  /* 显示汉堡按钮，隐藏PC导航 */
  .mobile-nav-btn {
    display: flex;
  }

  .nav {
    display: none !important;
  }
  .ui-btn-box {
    width: 80px;
  }
}

/* 手机导航头部logo+关闭按钮 */
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.mobile-logo {
  height: 36px;
  width: auto;
}
.mobile-nav-close {
  font-size: 28px;
  color: #333;
  cursor: pointer;
  line-height:1;
  padding:4px 8px;
  margin-right:10px;
}
.mobile-nav-close:hover{
  color:#5a42ec;
}
/* 调整面板内边距，原来padding-top:80px 改成更小，由头部占位 */
.mobile-nav-panel {
  padding: 20px 20px 20px !important;
}

/* ========== 移动端二级子菜单样式 ========== */
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  border-bottom:1px solid #eee;
}
.mobile-nav-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding:8px 0;
}
.mobile-nav-main a {
  font-size:16px;
  color:#333;
  font-weight:500;
  text-decoration:none;
}
.mobile-nav-arrow {
  width:10px;
  height:10px;
  border-right:2px solid #666;
  border-bottom:2px solid #666;
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}
.mobile-nav-arrow.active {
  transform: rotate(-135deg);
}
.mobile-nav-sub {
  max-height:0;
  overflow:hidden;
  transition: max-height 0.3s ease;
  padding-left:16px;
}
.mobile-nav-sub.active {
  max-height:500px;
}
.mobile-nav-sub a {
  display:block;
  padding:10px 0;
  font-size:15px;
  color:#555;
  text-decoration:none;
  border-bottom:0 !important;
}
.mobile-nav-sub a.current{
  color:#5a42ec;
}
/* ========= AI SEARCH 弹窗CSS 全部 ais_前缀 防冲突 ========= */
.ais_mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, .4);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease-out;
}

.ais_mask.show {
  opacity: 1;
  pointer-events: auto;
}

.ais_popup {
  width: min(760px, 92vw);
  max-height: 78vh;
  background: linear-gradient(90deg, #f5f0ff, #edf4ff);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.14);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.92) translateY(14px);
  transition: all 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.ais_mask.show .ais_popup {
  transform: scale(1) translateY(0);
}

.ais_popup_box {
  width: 100%;
  margin: 0 auto;
}

.ais_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 96%;
  padding: 8px 12px;
  border-radius: 6px;
  gap: 10px;
  background: #fff;
  margin: 10px auto;
  flex-wrap: nowrap;
}

.ais_search_input_wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ais_icon_search {
  width: 14px;
  height: auto;
}

.ais_search_input_wrap input {
  height: 30px;
  flex: 1;
  border: none;
  outline: none;
  font-size: 12px;
  background: transparent;
  color: #1e293b;
  font-weight: 600;
  min-width: 0;
  padding:0 ;
}

.ais_search_input_wrap input::placeholder {
  color: #94a3b8;
}

.ais_search_input_wrap input:disabled {
  color: #b8c2d1;
  cursor: not-allowed;
}

.ais_header_right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.ais_tag_open {
  cursor: pointer;
  font-size: 13px;
  color: #dc2626;
  font-weight: 500;
  white-space: nowrap;
}

.ais_tag_open.ais_disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.ais_close_btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  transition: background 0.2s;
}

.ais_close_btn:hover {
  background: #cbd5e1;
}

.ais_close_btn.ais_disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.ais_tabs {
  width: 96%;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  padding: 0 0 16px;
  background: linear-gradient(90deg, #f5f0ff, #edf4ff);
  overflow-x: auto;
}

.ais_tabs::-webkit-scrollbar {
  height: 0;
}

.ais_tab_item {
  flex-shrink: 0;
  padding: 0px 10px;
  background: #fff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}

.ais_tab_item:hover {
  color: #dc2626;
}

.ais_tab_item.ais_disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.ais_content_wrap_wrapper {
  background-color: #fff;
}

.ais_content_wrap {
  width: 96%;
  margin: 0 auto;
}

.ais_title_fixed {
  font-size:16px;
  text-align: left;
  padding: 6px 0;
  background: linear-gradient(135deg, rgb(226, 52, 255), rgb(77, 80, 255), rgb(64, 148, 253));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ais_content {
  padding: 0 0 20px 0;
  overflow-y: auto;
  max-height: calc(78vh - 160px);
}

.ais_intro {
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  border-radius: 8px;
}

.ais_intro img {
  width: 80px;
  height: auto;
}

.ais_intro p {
  margin: 6px 0;
  font-size: 14px;
}

.ais_intro ul,
.ais_intro ol {
  padding-left: 22px;
  margin: 8px 0;
}

.ais_intro li {
  margin: 4px 0;
}

.ais_intro code {
  background: #eee;
  padding: 2px 6px;
  border-radius: 4px;
}

.ais_intro pre {
  background: #f1f1f1;
  padding: 10px;
  border-radius: 6px;
  overflow-x: auto;
}

.ais_intro blockquote {
  border-left: 3px solid #b8c2d1;
  padding-left: 10px;
  color: #555;
  margin: 8px 0;
}

.ais_intro h1,
.ais_intro h2,
.ais_intro h3,
.ais_intro h4 {
  margin: 10px 0 4px;
  font-weight: bold;
}
.ais_intro h1 {
  font-size: 18px !important;
}
.ais_intro h2 {
  font-size: 18px !important;
}
.ais_intro h3 {
  font-size: 18px !important;
}
.ais_intro h4 {
  font-size: 16px !important;
}
.ais_intro h5 {
  font-size: 16px !important;
}

.ais_info_block {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #e5e7eb;
}

.ais_block_title {
  font-size: 14px;
  color: #1e293b;
  font-weight: 600;
  margin-bottom: 16px;
}

.ais_tip_text {
  font-size: 14px;
  line-height: 1.75;
  color: #475569;
}

.ais_scroll_hint {
  cursor: pointer;
  text-align: center;
  margin-top: 36px;
  font-size: 14px;
  color: #94a3b8;
}

.ais_scroll_hint.ais_disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.ais_goods_wrap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.ais_goods_item {
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  background: rgb(249 248 248);
  padding: 10px 10px;
  text-decoration: none;
}

.ais_goods_item img {
  width: 100px;
  border-radius: 6px;
  height: auto;
  object-fit: cover;
  display: block;
}

.ais_goods_info {
  padding: 10px;
}

.ais_goods_name1 {
  font-size: 14px;
  margin: 0 0 6px 0;
  color: #222;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ais_goods_name {
  font-size: 12px;
  line-height: 1.2;
  color: #999;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ais_goods_price {
  font-size: 10px;
  color: #999;
  font-weight: 600;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 760px) {
  .ais_goods_wrap {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .ais_header {
    padding: 6px 10px;
    gap: 8px;
  }

  .ais_tag_open {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .header-top-content .ai-protect p {
    display: none;
  }
  .header-top-content .middle-content .p1 {
    display: none;
  }
}

@media (max-width: 500px) {
  .header-top-content .middle {
    display: none !important;
  }
}
