/* ====== fanhappy 官网样式 ====== */

/* 基础重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif; color: #333; padding-top: 0; }

/* 顶部导航 */
/* ===== 整个网站头部：fixed 叠在 banner 上 ===== */
.site-header {
  position: fixed; left: 0; top: 0; right: 0; z-index: 1001;
  background: transparent;
  /* 下拉面板将相对此容器定位（absolute + top:100% 跟随导航栏高度变化） */
  transition: background 0.3s, box-shadow 0.3s;
}
.site-header.scrolled {
  background: #fff;
  box-shadow: 0 3px 16px rgba(0,0,0,0.1);
}
/* hover 时白底（invitop 效果） */
.site-header:hover {
  background: #fff;
  box-shadow: 0 3px 16px rgba(0,0,0,0.1);
}
/* hover 时细线颜色变深 */
.site-header:hover .header-up {
  border-bottom-color: #e6e6e6;
}
.site-header:hover .header-up .header-contact a,
.site-header:hover .yuyan-top p {
  color: #333;
}

/* ===== 顶部细线（电话+邮箱）===== */
.header-up {
  border-bottom: 1px solid rgba(255,255,255,0.2);
  height: 36px;
  line-height: 36px;
  transition: opacity 0.3s, border-color 0.3s;
  overflow: hidden;
}
.site-header.scrolled .header-up {
  display: none;
}
.header-up-inner {
  width: 80%; max-width: 1360px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  height: 36px;
}
.header-contact a {
  color: rgba(255,255,255,0.8); font-size: 13px;
  text-decoration: none; margin-right: 20px;
  transition: color 0.3s;
}
.header-contact a:hover { color: #fff; }
.header-langs { display: flex; gap: 12px; align-items: center; }
.header-langs a { color: rgba(255,255,255,0.8); font-size: 13px; text-decoration: none; transition: color 0.3s; }
.header-langs a:hover { color: #fff; }
.header-langs a.cur { color: #fff; font-weight: bold; }
.site-header:hover .header-langs a { color: #333; }
.site-header:hover .header-langs a:hover { color: #002fa7; }
.site-header:hover .header-langs a.cur { color: #002fa7; }
.site-header.scrolled .header-langs a { color: #333; }
.site-header.scrolled .header-langs a:hover { color: #002fa7; }
.site-header.scrolled .header-langs a.cur { color: #002fa7; }

/* ===== 主导航栏 ===== */
.header-down { height: 76px; margin-top: 10px; }
.header-down-inner {
  width: 80%; max-width: 1360px; margin: 0 auto;
  display: flex !important; align-items: center; justify-content: space-between;
  height: 76px;
  position: relative; /* 下拉面板相对此容器定位 */
}
.site-header .logo {
  display: inline-flex; align-items: center;
  color: #fff !important; background: transparent !important;
  font-size: 48px; font-weight: bold; letter-spacing: 2px; line-height: 1;
  text-decoration: none; height: 76px;
  transition: color 0.3s;
}
.site-header .logo img {
  max-height: 50px; width: auto; display: block;
}
.site-header:hover .logo, .site-header.scrolled .logo { color: #1c223d !important; }

/* 菜单 */
.site-header .nav-top-quanju {
  display: flex; list-style: none; margin: 0; padding: 0; justify-content: center;
}
.site-header .nav-top-quanju > li { display: block; }
.site-header .nav-top-quanju > li > a {
  color: #fff; font-size: 20px; margin: 0 20px; padding: 22px 0;
  transition: color 0.3s, border-bottom-color 0.3s;
  border-bottom: 3px solid transparent;
  display: inline-block; background: transparent !important;
  text-decoration: none; font-weight: 400; letter-spacing: 0.3px;
}
/* hover/scrolled 白底环境：黑字 */
.site-header:hover .nav-top-quanju > li > a,
.site-header.scrolled .nav-top-quanju > li > a {
  color: #1c223d;
}
.site-header .nav-top-quanju > li > a:hover { color: #002fa7; border-bottom-color: #002fa7; }
.site-header .nav-top-quanju > li.active > a { color: #fff; border-bottom-color: #fff; }
.site-header:hover .nav-top-quanju > li.active > a,
.site-header.scrolled .nav-top-quanju > li.active > a {
  color: #002fa7; border-bottom-color: #002fa7;
}

/* 轮播图 */
.i_banner { width: 100%; min-height: 690px; overflow: hidden; margin-bottom: 30px; }
/* 产品中心首页轮播 banner 上移 40px（2026-09-04，仅产品中心页） */
.products-banner { margin-bottom: -30px; }
.i_banner .swiper-slide img { width: 100%; height: auto; display: block; }
.i_banner > img { width: 100%; height: auto; display: block; }
.i_banner .swiper-pagination-bullet-active { background: #c41230; }

/* 产品展示区 */
.I_con { padding: 50px 0; }
.I_con .team { margin-bottom: 30px; }
.I_con .img_man { position: relative; overflow: hidden; }
.I_con .img_man img { width: 100%; transition: transform 0.4s; }
.I_con .img_man:hover img { transform: scale(1.05); }
.I_con .img_man .mask { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.6); color: #fff; padding: 12px; text-align: center; }
.I_con .img_man .mask h4 { font-size: 16px; margin: 0; }

/* 产品分类入口 */
.cat-entry { display: block; text-align: center; padding: 30px 15px; border: 1px solid #eee; margin-bottom: 20px; transition: all 0.3s; text-decoration: none; color: #333; }
.cat-entry:hover { border-color: #c41230; color: #c41230; text-decoration: none; transform: translateY(-4px); box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.cat-entry .cat-icon { font-size: 40px; margin-bottom: 10px; }
.cat-entry h4 { font-size: 16px; margin: 8px 0; }

/* 产品详情页（模仿阿里巴巴） */
.product-detail { }
.product-detail .pd-left { position: sticky; top: 80px; }
.product-detail .main-image { width: 100%; border: 1px solid #eee; margin-bottom: 10px; }
.product-detail .main-image img { width: 100%; }
.product-detail .thumb-list { display: flex; gap: 8px; }
.product-detail .thumb-list .thumb { width: 60px; height: 60px; border: 2px solid transparent; cursor: pointer; object-fit: cover; }
.product-detail .thumb-list .thumb.active { border-color: #c41230; }
.product-detail .pd-title { font-size: 22px; font-weight: bold; margin-bottom: 10px; }
.product-detail .pd-price { font-size: 24px; color: #c41230; font-weight: bold; margin: 12px 0; }
.product-detail .pd-moq { color: #888; font-size: 13px; }
.product-detail .pd-params { margin: 20px 0; }
.product-detail .pd-params table { width: 100%; }
.product-detail .pd-params td { padding: 8px 12px; border: 1px solid #eee; font-size: 13px; }
.product-detail .pd-params td:first-child { background: #f9f9f9; width: 120px; color: #666; }
.product-detail .pd-video { margin: 20px 0; }
.product-detail .pd-detail-images img { width: 100%; margin-bottom: 10px; }

/* 产品列表 */
.product-card { border: 1px solid #eee; padding: 20px; margin-bottom: 25px; transition: all 0.3s; }
.product-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); transform: translateY(-2px); }
.product-card img { width: 100%; height: 280px; object-fit: cover; }
.product-card h4 { font-size: 18px; margin: 12px 0 6px; display: flex; align-items: center; gap: 6px; }
.product-card .price { color: #c41230; font-weight: bold; font-size: 16px; }

/* 页脚 */
.Footer { background: #1a1a1a; color: #999; padding: 40px 0 0; }
.Footer h5 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.Footer a { color: #999; text-decoration: none; font-size: 13px; line-height: 2; }
.Footer a:hover { color: #fff; }
.Footer .copyright { background: #111; padding: 12px 0; margin-top: 30px; text-align: center; font-size: 12px; color: #666; }

/* 通用 */
.P30_top { padding-top: 80px; }
.P30_bottom { padding-bottom: 30px; }
.text-muted { color: #888; }
.Flex { display: flex; }
.Flex-wrap { flex-wrap: wrap; }
.row-flex { display: flex; flex-wrap: wrap; }

@media (max-width: 767px) {
  .i_banner { }
  .i_banner .swiper-slide img { }
  .Top_nav { padding: 0 15px; height: 56px; }
  .Top_nav .nav-top-quanju { display: block; }
  .Top_nav .nav-top-quanju > li { display: block; }
  .Top_nav .nav-top-quanju > li > a { padding: 12px 15px; margin: 0; border-bottom: none; color: #333; }
  .Top_nav .nav-top-quanju > li.active > a { color: #c41230; }
  #navbar { background: #222; border: none; }
}

/* 语言切换 */


/* 全局：所有页面的非 banner 内容宽度为屏幕 80% */
.container {
  width: 80% !important;
  max-width: none !important;
}

/* ===== 产品页左侧分类导航（新版） ===== */
.sidebar-cat {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  margin-bottom: 20px;
}
.sidebar-title {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 18px;
  letter-spacing: 0.5px;
}
.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}
.sidebar-list > li {
  position: relative;
}
.sidebar-list > li > a {
  display: block;
  padding: 12px 18px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}
.sidebar-list > li > a:hover {
  background: #f8f9fa;
  color: #3498db;
  border-left-color: #3498db;
}
.sidebar-list > li.active > a,
.sidebar-list > li.open > a {
  background: #ebf5fb;
  color: #3498db;
  border-left-color: #3498db;
  font-weight: 600;
}
.sidebar-list .cat-label {
  display: inline-block;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.sidebar-list .arrow {
  float: right;
  margin-top: 4px;
  transition: transform 0.3s;
  font-size: 12px;
  color: #999;
}
.sidebar-list > li.open .arrow {
  transform: rotate(180deg);
  color: #3498db;
}
.sidebar-list .cat-children {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #f8f9fa;
  border-top: 1px solid #eee;
}
.sidebar-list .cat-children li a {
  display: block;
  padding: 10px 18px 10px 36px;
  color: #666;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.3s;
}
.sidebar-list .cat-children li a:hover {
  background: #eef5fb;
  color: #3498db;
}
.sidebar-list .cat-children li.active a {
  background: #eef5fb;
  color: #3498db;
  font-weight: 600;
}
.sidebar-list .fa {
  font-size: 14px;
}

/* 箭头用 CSS 画（替代 FontAwesome） */
.sidebar-list .arrow {
  float: right;
  margin-top: 5px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #999;
  border-bottom: 2px solid #999;
  transform: rotate(45deg);
  transition: transform 0.3s;
}
.sidebar-list > li.open .arrow {
  transform: rotate(225deg);
  border-color: #3498db;
}
/* 子项前的引导小线 */
.sidebar-list .cat-children li a::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ccc;
  margin-right: 8px;
  vertical-align: middle;
  transition: background 0.3s;
}
.sidebar-list .cat-children li a:hover::before,
.sidebar-list .cat-children li.active a::before {
  background: #3498db;
}

/* ===== 产品页左侧分类导航美化 ===== */
.cat-nav {
  border: none !important;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  overflow: hidden;
}
.cat-nav .list-group-item {
  border: none;
  border-radius: 0 !important;
  padding: 0;
  margin-bottom: 0;
}
.cat-nav .list-group-item > a {
  display: block;
  padding: 12px 18px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}
.cat-nav .list-group-item > a:hover {
  background: #f8f9fa;
  color: #3498db;
  border-left-color: #3498db;
}
.cat-nav .list-group-item.active > a,
.cat-nav .list-group-item.active-parent > a {
  background: #ebf5fb;
  color: #3498db !important;
  border-left-color: #3498db;
  font-weight: 600;
}
.cat-nav .list-group-item.active-parent > a .caret {
  transform: rotate(180deg);
}
.cat-nav .cat-children {
  padding-left: 0 !important;
  border-top: 1px solid #eee;
}
.cat-nav .cat-children > div {
  padding: 10px 18px 10px 36px !important;
  border-bottom: 1px solid #f0f0f0;
}
.cat-nav .cat-children > div:last-child {
  border-bottom: none;
}
.cat-nav .cat-children a {
  font-size: 13px;
  color: #666;
  text-decoration: none;
  transition: color 0.3s;
}
.cat-nav .cat-children a:hover {
  color: #3498db;
}
.cat-nav .cat-children a[style*="#c41230"] {
  color: #c41230 !important;
  font-weight: 600;
}
/* panel-heading 美化 */
.panel-heading {
  background: linear-gradient(135deg, #3498db, #2980b9) !important;
  color: #fff !important;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 18px !important;
  border-radius: 8px 8px 0 0;
  letter-spacing: 0.5px;
}

/* 去掉导航栏点击/聚焦时的蓝色边框 */
.Top_nav a,
.Top_nav a:focus,
.Top_nav a:active,
.Top_nav button:focus,
.Top_nav button:active {
  outline: none !important;
  -webkit-focus-ring-color: transparent;
}
.Top_nav .nav-top-quanju > li > a:focus {
  outline: none !important;
  box-shadow: none !important;
}
/* 去掉移动端汉堡菜单按钮的蓝色边框 */
.Top_nav .navbar-toggle:focus,
.Top_nav .navbar-toggle:active {
  outline: none !important;
  box-shadow: none !important;
}

/* 强制去掉产品分类 panel 的所有边框和细线 */
.panel.panel-default {
  border: none !important;
  box-shadow: none !important;
  border-radius: 8px;
}
.cat-nav .list-group {
  border-radius: 0 0 8px 8px;
}
.cat-nav .list-group-item {
  border: none !important;
  border-bottom: 1px solid #f0f0f0 !important;
}
.cat-nav .list-group-item:last-child {
  border-bottom: none !important;
}
.cat-nav .panel-heading {
  border: none !important;
  border-bottom: none !important;
}

/* 产品页左侧分类栏：跟随页面滚动 */
.products-row > .col-sm-2 {
  position: sticky;
  top: 71px;  /* 导航栏高度 56px + 间距 15px */
  align-self: flex-start;
  z-index: 1000;
}
/* 去掉 Bootstrap col 的 float，让 sticky 在 flex 容器内生效 */
.products-row {
  display: flex;
  flex-wrap: wrap;
}
.products-row > .col-sm-2 {
  float: none !important;
}

/* 产品页孙类目按钮组 */
.child-cats-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.child-cat-link {
  display: inline-block;
  font-size: 18px;
  padding: 8px 24px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fff;
  color: #555;
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.child-cat-link:hover {
  border-color: #c41230;
  color: #c41230;
  box-shadow: 0 4px 12px rgba(196,18,48,0.12);
  transform: translateY(-1px);
  text-decoration: none;
}
.child-cat-link.active {
  background: #c41230;
  border-color: #c41230;
  color: #fff;
  box-shadow: 0 2px 8px rgba(196,18,48,0.25);
}
.child-cat-link.active:hover {
  background: #a91020;
  border-color: #a91020;
  color: #fff;
  transform: none;
}

/* ===== 导航栏右侧（搜索图标）===== */
.header-right { display: flex; align-items: center; gap: 10px; }
/* 搜索按钮在菜单 ul 内最后一项 */
.search-nav-item {
  display: block !important;  /* 与普通菜单项一致 */
  border-bottom: none !important;
}
.search-nav-item > a.header-search-btn {
  font-size: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; border-radius: 0 !important;
  color: #fff; font-size: 16px; text-decoration: none;
  transition: color 0.3s, background 0.3s;
  background: transparent !important; cursor: pointer !important;
  border-bottom: none !important;
  margin: 0 14px; padding: 22px 0;
}

.header-search-btn:hover { color: #002fa7; background: transparent !important; }
.site-header:hover .header-search-btn,
.site-header.scrolled .header-search-btn { color: #333; background: transparent !important; }
.site-header:hover .header-search-btn:hover,
.site-header.scrolled .header-search-btn:hover { color: #002fa7; background: transparent !important; }
.header-search-btn { background: transparent !important; border: none !important; }
.header-search-btn:hover { color: #002fa7; background: transparent !important; }
.site-header:hover .header-search-btn,
.site-header.scrolled .header-search-btn { color: #333; background: transparent !important; }
.site-header:hover .header-search-btn:hover,
.site-header.scrolled .header-search-btn:hover { color: #002fa7; background: transparent !important; }

/* ===== 搜索弹出框 ===== */
.search-popup {
  position: fixed; left: 0; top: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  z-index: 99999;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 30vh;
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
body.search-active .search-popup { opacity: 1; visibility: visible; }
.search-popup form {
  position: relative;
  width: 80%; max-width: 700px;
  transform: scaleX(0.5);
  transition: transform 0.4s ease;
}
body.search-active .search-popup form { transform: scaleX(1); }
.search-popup input[type="text"],
.search-popup input[type="search"] {
  width: 100%; height: 70px; font-size: 20px; padding: 0 60px 0 30px;
  border: none; outline: none; background: #fff; color: #333;
  box-shadow: none !important;
}
.search-popup button[type="submit"] {
  position: absolute; right: 5px; top: 5px; bottom: 5px; width: 50px;
  background: transparent; border: none; font-size: 20px; color: #333; cursor: pointer;
}
.search-popup button[type="submit"]:hover { color: #002fa7; }

/* ===== 导航菜单布局 ===== */
.header-down .site-navbar { flex: 1; display: flex; justify-content: center; margin: 0; }
.header-down .about-nav-py { width: 100%; display: flex; justify-content: center; align-items: center; }
.header-down .navbar-header { display: none; }
.header-down .navbar-collapse { padding: 0; }
.header-down .collapse.navbar-collapse { display: flex !important; justify-content: center; }

/* 内页 banner 与内容间距 */
.page-banner { margin-bottom: 50px; }

/* ===== 全局取消焦点框/轮廓（2026-09-04）===== */
a:focus,
a:active,
button:focus,
button:active,
input:focus,
input:active,
textarea:focus,
textarea:active,
select:focus,
select:active,
[class*="btn"]:focus,
[class*="btn"]:active,
[tabindex]:focus,
.swiper-pagination-bullet:focus,
.swiper-pagination-bullet:active {
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}
/* 搜索输入框聚焦无阴影/无边框 */
.search-popup input[name="q"]:focus,
.search-popup input[name="q"]:active,
.search-popup input[name="q"]:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border-color: #ccc !important;
  -webkit-focus-ring-color: transparent !important;
}

/* 自定义 col-sm-5（约 41.67%，用于 about 页图片放大 30%） */
@media (min-width: 768px) {
  .col-sm-5 { width: 41.66666667%; float: left; position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; }
}
