:root{
  --bg:#f8fafc;
  --line:#e5e7eb;
  --text:#111827;
  --muted:#6b7280;
  --shadow:0 1px 2px rgba(0,0,0,.04), 0 10px 15px -3px rgba(0,0,0,.06);
}

/* ================= Base ================= */

*{box-sizing:border-box;}

html,body{
  margin:0;
  padding:0;
  color:var(--text);
  background:#fff;
  font-family:Inter,system-ui,"Segoe UI",Roboto,Helvetica,Arial;
}

a{
  color:inherit;
  text-decoration:none;
}

img{
  max-width:100%;
  display:block;
}

.container{
  width:min(1280px,94%);
  margin:0 auto;
}

.section{
  padding:24px 0;
}

.small{
  font-size:12px;
  color:var(--muted);
}

.badge{
  display:inline-block;
  border:1px solid var(--line);
  border-radius:999px;
  padding:2px 8px;
  margin-right:6px;
}

.card{
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  background:#fff;
  box-shadow:var(--shadow);
}

.card-media{
  aspect-ratio:4/3;
  background:#f8fafc;
  display:flex;
  align-items:center;
  justify-content:center;
}

.card-content{
  padding:10px 12px;
}

.grid4{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:3px;
}

@media(max-width:1024px){
  .grid4{grid-template-columns:repeat(2,1fr);}
}

@media(max-width:640px){
  .grid4{grid-template-columns:1fr;}
}

/* ================= New Header ================= */

/* 整体头部容器：粘顶、阴影 */
.site-header{
  position:relative;          /* 不再 sticky */
  top:auto;
  z-index:100;
  background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.06);
}

/* 顶部长条：50px 高度、橙色 */
.topbar{
  background:#f59e0b;
  color:#fff;
  font-size:15px;
}
.topbar-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  min-height:60px;
}
.topbar-left{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.topbar-right{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.topbar-right span{
  white-space:nowrap;
}
.topbar a{
  color:#fff;
  text-decoration:none;
}
.topbar a:hover{
  text-decoration:underline;
}
.topbar-link{
  font-weight:600;
}


/* 中间文案居中显示 */
.topbar-center{
  flex:1;
  text-align:center;
  font-weight:500;
  white-space:nowrap;
}


/* 中间区域：Logo + 搜索框 + 联系信息，整体高度 118px */

.main-header{
  background:#fff;
  padding:0;
}
.header-row{
  display:flex;
  align-items:center;
  gap:24px;
  min-height:118px;
}
.logo img{
  height:118px;
  width:auto;
  display:block;
}

/* 搜索框样式 */




.header-quick-links{
  flex:1;
  display:flex;
  justify-content:center;
  gap:22px;
  font-size:16px;
  font-weight:600;
  white-space:nowrap;
}
.header-quick-links a{
  padding:6px 12px;
  border-radius:999px;
  border:1px solid transparent;
  color:#111827;
  text-decoration:none;
  transition:all .2s ease;
}
.header-quick-links a:hover{
  border-color:#f59e0b;
  color:#f59e0b;
  background:#fffbeb;
}
@media(max-width:960px){
  .header-quick-links{
    order:3;
    width:100%;
    justify-content:flex-start;
    flex-wrap:wrap;
    gap:10px;
    margin-top:4px;
  }
}






















/* 右侧联系信息 */
.header-contact{
  text-align:right;
  font-size:20px;
  line-height:1.4;
  white-space:nowrap;
}
.hc-label{
  color:#000;
}
.hc-phone{
  font-size:16px;
  font-weight:700;
  color:#111827;
}
.hc-email a{
  color:#f59e0b;
  text-decoration:none;
  font-size:18px;
}
.hc-email a:hover{
  text-decoration:underline;
}

/* 导航：两排对称、居中、竖线分隔 */






.main-nav{
  background:#fff;
  border-top:1px solid #e5e7eb;
  border-bottom:1px solid #e5e7eb;
  height:60px;
  display:flex;
  align-items:center;
}
.main-nav .container{
  width:min(1280px,94%);
  margin:0 auto;
}
.main-nav ul{
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:10px 15px;
  font-size:16px;
  width:100%;
  height:100%;
}



















.main-nav li{
  position:relative;
  padding:0 6px;
}

.main-nav a{
  display:block;
  padding:4px 0;
  color:#111827;
  text-decoration:none;
}

.main-nav a:hover{
  color:#0077b6;
}

/* 竖线分隔符（从第二个开始） */
.main-nav li + li::before{
  content:"";
  position:absolute;
  left:-4px;
  top:50%;
  width:1px;
  height:14px;
  background:#e5e7eb;
  transform:translateY(-50%);
}

/* Get a Quote 按钮 */
.main-nav .nav-quote{
  padding:4px 14px;
  margin-left:4px;
  border-radius:999px;
  background:#ffbf00;
  font-weight:600;
  color:#111827;
}
.main-nav .nav-quote:hover{
  background:#facc15;
  color:#111827;
}

/* Header：移动端适配 */



@media(max-width:960px){
  .topbar-inner{
    flex-direction:column;
    align-items:flex-start;
    gap:2px;
    min-height:auto;
    padding:4px 0;
  }
  .header-row{
    flex-direction:column;
    align-items:flex-start;
    min-height:auto;
    padding:6px 0;
  }
  .header-contact{
    text-align:left;
    white-space:normal;
  }

  /* 关键：手机端不强制 60px，高度自适应 */
  .main-nav{
    height:auto;
  }

  .main-nav ul{
    justify-content:flex-start;
    flex-wrap:nowrap;
    overflow-x:auto;
    gap:10px;
  }
  .main-nav li{
    padding:0;
  }
  .main-nav li + li::before{
    display:none; /* 手机端去掉竖线，避免拥挤 */
  }
}

























/* ================= Banner ================= */

.banner{
  margin-bottom:20px; /* 与 About 间距 */
}
.banner .wrap{
  width:100%;
  max-width:1350px;
  margin:18px auto 0;
  padding:0 8px;
}
.banner .media{
  width:100%;
  border-radius:18px;
  overflow:hidden;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  aspect-ratio:14/5;          /* 对应 1400x500 */
  position:relative;
}
.banner .media img{
  width:100%;
  height:100%;
  object-fit:cover;
}

/* 轮播基础 */
.banner-slider{position:relative;}
.banner-slider .slide{
  position:absolute;
  inset:0;
  opacity:0;
  transition:opacity .6s ease;
}
.banner-slider .slide.active{
  opacity:1;
  z-index:1;
}
.banner-slider .slide img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.banner-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:32px;
  height:32px;
  border-radius:50%;
  border:none;
  background:rgba(0,0,0,.35);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index:2;
  padding:0;
  font-size:18px;
  transition:background .2s ease, transform .2s ease;
}
.banner-arrow:hover{
  background:rgba(0,0,0,.55);
  transform:translateY(-50%) scale(1.05);
}
.banner-prev{left:10px;}
.banner-next{right:10px;}
.banner-dots{
  position:absolute;
  left:50%;
  bottom:10px;
  transform:translateX(-50%);
  display:flex;
  gap:6px;
  z-index:2;
}
.banner-dots span{
  width:8px;
  height:8px;
  border-radius:50%;
  background:rgba(255,255,255,.5);
  cursor:pointer;
  transition:all .2s ease;
}
.banner-dots span.active{
  width:18px;
  border-radius:999px;
  background:#ffbf00;
}

/* ================= About Us ================= */

.about-grid{
  display:block;
}
.about-content{
  max-width:100%;
}

#about.section{
  margin-top:0;
  padding-top:0;
  background:transparent;
}

#about .about-content p,
#about .about-content li{
  line-height:1.8;
}

#about .about-content li{
  margin-bottom:2px;
}

/* ================= Forms ================= */

.form{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.form .full{
  grid-column:1/-1;
}
.input{
  width:100%;
  padding:10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
}
.btn{
  border:1px solid var(--line);
  background:#fff;
  border-radius:12px;
  padding:8px 14px;
  cursor:pointer;
}
.cta.primary{
  display:inline-block;
  padding:10px 16px;
  border-radius:999px;
  background:#ffbf00;
  border:none;
}

/* ================= Catalog & Sidebar ================= */

.catalog-grid{
  display:grid;
  grid-template-columns:280px 1fr;
  gap:24px;
  align-items:start;
}

.sidebar{
  position:sticky;
  top:20px;              /* 只在视口顶部留一点距离，整块都能看到 */
  height:fit-content;
}



.cat-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}

/* 原始按钮基础，会在脚本中转成 .cat-toggle 结构 */
.cat-list .acc{
  width:100%;
  text-align:left;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  display:flex;
  justify-content:space-between;
  align-items:center;
  cursor:pointer;
}

/* 橙色折叠样式（脚本会添加 .cat-item / .cat-toggle 等类名） */

.sidebar .cat-item{
  margin:0;
}

.sidebar .cat-toggle{
  width:100%;
  padding:10px 14px;
  border:none;
  background:#f59e0b;
  color:#fff;
  font-size:14px;
  font-weight:600;
  display:flex;
  justify-content:space-between;
  align-items:center;
  cursor:pointer;
  border-radius:10px;
  box-sizing:border-box;
}

.sidebar .cat-label{
  flex:1;
  margin-right:8px;
  line-height:1.3;
}

.sidebar .cat-right{
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.sidebar .cat-right .count{
  min-width:20px;
  padding:0 6px;
  height:18px;
  font-size:11px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.7);
  display:flex;
  align-items:center;
  justify-content:center;
  margin-left:0;
}

.sidebar .cat-right .arrow{
  width:16px;
  height:16px;
  border-radius:50%;
  border:1px solid #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
}

/* 加减号由脚本通过 .open 控制 */
.sidebar .cat-right .arrow::before{
  content:"+";
}
.sidebar .cat-item.open .cat-right .arrow::before{
  content:"−";
}

/* 子列表 */
.sidebar .cat-sub{
  display:none;
  margin:0;
  padding:8px 14px 10px 18px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-top:none;
  list-style:none;
}
.sidebar .cat-item.open > .cat-sub{
  display:block;
}
.sidebar .cat-sub li{
  margin:0;
}
.sidebar .cat-sub a{
  display:block;
  padding:3px 0;
  font-size:13px;
  color:#111827;
  text-decoration:none;
}
.sidebar .cat-sub a:hover{
  text-decoration:underline;
}

.catalog-main .cat-section{
  padding:12px 0;
  border-bottom:1px dashed var(--line);
}

@media(max-width:1024px){
  .catalog-grid{
    grid-template-columns:1fr;
  }
  .sidebar{
    position:static;
    top:auto;
  }
}

/* ================= Product Detail Layout ================= */

.pd{
  padding:24px 0;
}

.pd-grid{
  display:grid;
  grid-template-columns:420px 1fr;
  grid-template-areas:
    "cover desc"
    "cover thumbs"
    "spec spec";
  gap:24px;
  align-items:start;
}

.pd-cover{
  grid-area:cover;
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  background:#fff;
  box-shadow:var(--shadow);
}
.pd-cover .square{
  aspect-ratio:1/1;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f8fafc;
}
.pd-cover img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.pd-desc{
  grid-area:desc;
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  background:#fff;
  box-shadow:var(--shadow);
}

.pd-thumbs{
  grid-area:thumbs;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
}
.pd-thumb{
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  overflow:hidden;
}
.pd-thumb .square{
  aspect-ratio:1/1;
  background:#f8fafc;
  display:flex;
  align-items:center;
  justify-content:center;
}
.pd-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.pd-spec{
  grid-area:spec;
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
  background:#fff;
  box-shadow:var(--shadow);
}
.pd-spec img{
  width:100%;
  height:auto;
  display:block;
}

@media(max-width:1024px){
  .pd-grid{
    grid-template-columns:1fr;
    grid-template-areas:
      "cover"
      "desc"
      "thumbs"
      "spec";
  }
}

/* ================= Detail 文本适配 & 粘贴内容修正 ================= */

.pd-spec,
.desc-html{
  max-width:1055px;
  width:100%;
  margin-left:auto;
  margin-right:auto;
  line-height:1.8;
  box-sizing:border-box;
  overflow-x:hidden;
}
.pd-spec *,
.desc-html *{
  white-space:normal !important;
  word-break:break-word !important;
  overflow-wrap:anywhere !important;
  hyphens:auto !important;
}
.pd-spec pre,
.pd-spec code,
.pd-spec samp,
.desc-html pre,
.desc-html code,
.desc-html samp{
  white-space:pre-wrap !important;
  word-break:break-word !important;
}
.pd-spec nobr,
.desc-html nobr{
  white-space:normal !important;
}
.pd-spec [style*="width:"],
.desc-html [style*="width:"]{
  max-width:100% !important;
  width:auto !important;
}
.pd-spec [style*="min-width"],
.desc-html [style*="min-width"]{
  min-width:0 !important;
}
.pd-spec table,
.desc-html table{
  width:100% !important;
  max-width:100% !important;
  table-layout:auto !important;
  border-collapse:collapse;
}
.pd-spec td,
.pd-spec th,
.desc-html td,
.desc-html th{
  word-break:break-word !important;
  vertical-align:top;
}
.pd-spec img,
.desc-html img{
  max-width:100% !important;
  height:auto !important;
  display:inline-block;
}

/* 描述块跨列居中 */
.pd .pd-grid > section[class*="pd-spec"]{
  grid-column:1 / -1 !important;
  max-width:1100px !important;
  width:100% !important;
  margin:12px auto 0 !important;
  justify-self:center !important;
  box-sizing:border-box;
}
.pd .pd-grid > section[class*="pd-spec"] *{
  white-space:normal !important;
  word-break:break-word !important;
  overflow-wrap:anywhere !important;
}
.pd .pd-grid > section[class*="pd-spec"] table{
  width:100% !important;
  max-width:100% !important;
  table-layout:auto !important;
  border-collapse:collapse;
}
.pd .pd-grid > section[class*="pd-spec"] img{
  max-width:100% !important;
  height:auto !important;
}
.pd .pd-grid > section[class*="pd-spec"] [width],
.pd .pd-grid > section[class*="pd-spec"] [style*="width:"]{
  width:auto !important;
  max-width:100% !important;
}

/* ================= 首页分类卡片规范 ================= */

#catalog .catalog-main .cat-section h2 + .grid4 .card{
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:flex-start !important;
  min-height:305px !important;
}
#catalog .catalog-main .cat-section h2 + .grid4 .card .card-media{
  width:240px !important;
  height:240px !important;
  flex:0 0 240px !important;
  aspect-ratio:auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  margin:0 auto !important;
  box-sizing:border-box;
}
#catalog .catalog-main .cat-section h2 + .grid4 .card > figure,
#catalog .catalog-main .cat-section h2 + .grid4 .card > picture,
#catalog .catalog-main .cat-section h2 + .grid4 .card > img:first-child{
  width:240px !important;
  height:240px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  margin:0 auto !important;
}
#catalog .catalog-main .cat-section h2 + .grid4 .card .card-media img,
#catalog .catalog-main .cat-section h2 + .grid4 .card > figure img,
#catalog .catalog-main .cat-section h2 + .grid4 .card > picture img,
#catalog .catalog-main .cat-section h2 + .grid4 .card > img:first-child{
  max-width:100% !important;
  max-height:100% !important;
  width:auto !important;
  height:auto !important;
  object-fit:contain !important;
  display:block !important;
}
#catalog .catalog-main .cat-section h2 + .grid4 .card h5,
#catalog .catalog-main .cat-section h2 + .grid4 .card h4,
#catalog .catalog-main .cat-section h2 + .grid4 .card .title,
#catalog .catalog-main .cat-section h2 + .grid4 .card p{
  width:240px !important;
  min-height:35px !important;
  max-height:50px !important;
  margin:8px auto 0 !important;
  text-align:center;
  line-height:1.25;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  text-overflow:ellipsis;
  box-sizing:border-box;
}

/* ================= Footer Grid ================= */

.footer .grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:20px;
}

@media(max-width:900px){
  .footer .grid{grid-template-columns:1fr;}
}








/* 解决左侧分类锚点被头部遮挡的问题 */
.catalog-main .cat-section {
  scroll-margin-top: 60px;    /* 留一点空，标题不会贴死在浏览器顶 */
}






/* ===== Back to Top Button ===== */

/* ===== Back-to-Top Button ===== */

.back-to-top {
  position: fixed;
  bottom: 40px;
  /* 按内容宽度计算，固定在内容区右侧再往外 94px，避开产品 */
  right: calc((100vw - min(1280px, 94vw)) / 2 - 94px);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9998;
  transition: transform .25s ease;
}

/* 箭头样式：白色 */
.back-to-top svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
}

/* 悬停轻微上浮（颜色保持白色） */
.back-to-top:hover {
  transform: translateY(-2px);
}

























/* ========= Back-to-Top：控制出现/隐藏 ========= */

/* 默认隐藏，不占点击事件 */
.back-to-top {
  opacity: 0;
  pointer-events: none;
}

/* 加上 visible 类时显示（JS 已经在控制） */
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ========= 手机端整体优化（≤ 768px） ========= */

@media (max-width: 768px) {

  /* 顶部橙色条：字小一点、竖排 */
  .topbar {
    font-size: 11px;
  }

  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-height: auto;
    padding: 4px 8px;
  }

  .topbar-center {
    text-align: left;
    white-space: normal;
    font-size: 11px;
  }

  /* 头部：Logo + 联系方式 改为上下排 */
  .header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-height: auto;
    padding: 8px 8px 10px;
  }

  .logo img {
    height: 72px;
    width: auto;
  }

  .header-contact {
    text-align: left;
    font-size: 14px;
    line-height: 1.5;
    white-space: normal;
  }

  .hc-phone {
    font-size: 15px;
  }

  .hc-email a {
    font-size: 13px;
  }

  /* 顶部 4 个快捷分类：两列按钮，更像手机菜单 */
  .header-quick-links {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
    margin-top: 4px;
    font-size: 13px;
  }

  .header-quick-links a {
    flex: 1 1 calc(50% - 8px);
    text-align: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #f59e0b;
    background: #fffbeb;
  }

  /* 导航：横向滚动标签，不再挤成两排 */
  .main-nav {
    height: auto;
  }

  .main-nav ul {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding: 6px 0;
  }

  .main-nav a {
    font-size: 13px;
    padding: 6px 8px;
  }

  .main-nav li + li::before {
    display: none; /* 手机端去掉竖线，减少杂乱感 */
  }

  /* Banner 高度稍微降低，看起来更紧凑 */
  .banner .wrap {
    margin-top: 10px;
    padding: 0 8px;
  }

  .banner .media {
    border-radius: 14px;
    aspect-ratio: 16 / 9;
  }

  /* About Us 文本稍微大一点、舒服一点 */
  .about-content {
    padding-top: 6px;
  }

  #about .about-content p,
  #about .about-content li {
    font-size: 14px;
  }

  /* 目录区：手机端上下排，侧栏不再 sticky */
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    top: auto;
  }

  /* Footer 三列改一列 */
  .footer .grid {
    grid-template-columns: 1fr;
  }

  /* 浮动 WhatsApp / Email 在手机上稍微缩窄一点 */
  .stjh-btn {
    width: 130px;
    height: 46px;
    font-size: 14px;
    padding: 0 12px;
  }

  .stjh-icon {
    width: 30px;
    height: 30px;
  }

  /* 返回顶部在手机上靠右下，不挡内容 */
  .back-to-top {
    right: 16px;
    bottom: 24px;
  }
}









/* ========= 产品列表：手机端一排两个 ========= */
@media (max-width: 640px) {
  .grid4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========= Header：手机端 Logo 左 / 联系方式右 ========= */
@media (max-width: 768px) {
  /* 让手机端也保持左右排布，而不是之前的上下堆叠 */
  .header-row {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    min-height: auto;
    padding: 6px 0;
  }

  /* 左侧 Logo 稍微小一点，避免占满一行 */
  .logo img {
    height: 90px;
    width: auto;
  }

  /* 右侧联系方式整体右对齐，和 Logo 对齐 */
  .header-contact {
    text-align: right;
    white-space: normal;
    font-size: 14px;
    line-height: 1.5;
  }

  .hc-phone {
    font-size: 16px;
    font-weight: 700;
  }

  .hc-email a {
    font-size: 14px;
    word-break: break-all;
  }
}

/* ========= 返回顶部按钮：滚动后显示，右下角固定 ========= */

/* 默认隐藏，由 JS 加 .visible 才显示 */
.back-to-top {
  opacity: 0;
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* 手机端位置改在屏幕右下角，不再跑出内容区外 */
@media (max-width: 768px) {
  .back-to-top {
    right: 16px;
    bottom: 24px;
  }
}

