/* ===== 前台 style.css — 工业设备企业风格 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "Microsoft YaHei", "PingFang SC", sans-serif; color: #333; background: #fff; font-size: 14px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, li { list-style: none; }
.wrap { max-width: 90%; margin: 0 auto; padding: 0 20px; }

/* ===== 主色变量 ===== */
:root {
  --primary: #e67e22;
  --primary-dark: #d35400;
  --dark: #1a1a2e;
  --darker: #0f0f1a;
  --gray: #f5f6fa;
  --text: #333;
  --text-light: #777;
}

/* ===== 顶部导航 ===== */
.top-bar {
  background: var(--darker);
  color: #aaa;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.top-bar .wrap { display: flex; justify-content: space-between; align-items: center; }
.top-bar a { color: #aaa; margin-left: 16px; }
.top-bar a:hover { color: var(--primary); }

.header {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.logo-area { display: flex; flex-direction: column; }
/* LOGO 大字：公司名称（后台「站点设置 → LOGO 第二行大字」单独设置，保持原样式） */
.logo-area .logo-name { font-size: 22px; font-weight: 700; color: var(--primary); letter-spacing: 2px; }
.logo-area .logo-phone { font-size: 12px; color: #888; margin-top: 2px; }

.nav { display: flex; align-items: center; }
.nav a {
  color: #ccc;
  font-size: 15px;
  padding: 0 18px;
  height: 70px;
  line-height: 70px;
  position: relative;
  transition: color 0.3s;
}
.nav a:hover,
.nav a.active {
  color: var(--primary);
}
.nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.menu-btn { display: none; background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }

/* ===== 全屏轮播 ===== */
.banner-slider {
  position: relative;
  overflow: hidden;
  background: var(--darker);
}
.slides { display: flex; transition: transform 0.6s ease; }
.slide {
  min-width: 100%;
  min-height: 520px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}
.slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  max-width: 700px;
  padding: 0 20px;
}
.slide-content h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 3px;
}
.slide-content p {
  font-size: 18px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 32px;
}
.slide-content .btn-orange {
  display: inline-block;
  padding: 14px 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  transition: 0.3s;
}
.slide-content .btn-orange:hover { background: var(--primary-dark); }

/* 轮播控制 */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 50px;
  height: 50px;
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: 0.3s;
}
.slider-arrow:hover { background: var(--primary); }
.slider-arrow.prev { left: 30px; }
.slider-arrow.next { right: 30px; }

.slider-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
}
.slider-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: 0.3s;
}
.slider-dots span.active { background: var(--primary); transform: scale(1.2); }

/* 无轮播时默认 */
.slide-default {
  min-height: 420px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== 通用区块 ===== */
.section { padding: 80px 0; }
.section-gray { background: var(--gray); }
.sec-header { text-align: center; margin-bottom: 50px; }
.sec-header h2 { font-size: 32px; color: var(--text); margin-bottom: 12px; letter-spacing: 2px; }
.sec-header p { color: var(--text-light); font-size: 14px; }
.sec-header .line { width: 60px; height: 3px; background: var(--primary); margin: 16px auto 0; border-radius: 2px; }

/* ===== 关于我们 ===== */
.about-section { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-img { border-radius: 8px; overflow: hidden; box-shadow: 0 8px 30px rgba(0,0,0,0.1); }
.about-img img { width: 100%; height: 400px; object-fit: cover; }
/* 后台未上传配图时的占位底色块：沿用站点品牌橙，与整体风格一致 */
.about-img-placeholder {
  width: 100%;
  height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 20px;
}
.about-img-placeholder .aip-icon { font-size: 72px; line-height: 1; opacity: .92; }
.about-img-placeholder .aip-text strong {
  display: block;
  font-size: 20px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.about-img-placeholder .aip-text span {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,.78);
}
/* 图片地址失效（onerror）时，容器自动撑开高度并显示底色，避免出现塌陷的空白块 */
.about-img.about-img-empty {
  height: 400px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.about-text h2 { font-size: 28px; margin-bottom: 20px; }
.about-text h2 span { color: var(--primary); }
.about-text p { color: var(--text-light); margin-bottom: 16px; line-height: 1.8; }
.about-stats { display: flex; gap: 40px; margin-top: 30px; }
.about-stats .stat-item b { font-size: 36px; color: var(--primary); font-weight: 700; }
.about-stats .stat-item span { font-size: 14px; color: var(--text-light); display: block; margin-top: 4px; }

/* ===== 产品卡片网格 ===== */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
}
.product-card:hover { transform: translateY(-6px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.product-card .card-img { height: 220px; overflow: hidden; }
.product-card .card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.product-card:hover .card-img img { transform: scale(1.08); }
.product-card .card-body { padding: 16px; text-align: center; }
.product-card .card-body h4 { font-size: 15px; margin-bottom: 8px; color: var(--text); }
.product-card .card-body p { font-size: 12px; color: var(--text-light); margin-bottom: 14px; min-height: 36px; }
.product-card .card-body .btn-sm {
  display: inline-block;
  padding: 6px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  font-size: 12px;
  transition: 0.3s;
}
.product-card .card-body .btn-sm:hover { background: var(--primary-dark); }
.view-all-wrap { text-align: center; margin-top: 40px; }
.btn-view-all {
  display: inline-block;
  padding: 12px 36px;
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: 4px;
  font-size: 14px;
  transition: 0.3s;
}
.btn-view-all:hover { background: var(--primary); color: #fff; }

/* ===== 企业实力 ===== */
.strength-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 40px; }
.strength-card {
  background: #fff;
  border-radius: 8px;
  padding: 36px 20px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s;
}
.strength-card:hover { transform: translateY(-4px); }
.strength-card .icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 16px;
}
.strength-card h4 { font-size: 16px; margin-bottom: 10px; }
.strength-card p { font-size: 12px; color: var(--text-light); line-height: 1.7; }

.strength-banner {
  position: relative;
  height: 300px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #2c3e50, #1a1a2e);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}
.strength-banner h3 { font-size: 28px; margin-bottom: 10px; }
.strength-banner p { color: rgba(255,255,255,0.7); font-size: 14px; margin-bottom: 20px; }
.strength-banner .banner-btns { display: flex; gap: 12px; justify-content: center; }
.strength-banner .banner-btns a {
  padding: 8px 24px;
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  border-radius: 4px;
  font-size: 13px;
  transition: 0.3s;
}
.strength-banner .banner-btns a:hover { background: var(--primary); border-color: var(--primary); }
.strength-banner .banner-btns a.active { background: var(--primary); border-color: var(--primary); }

/* ===== 新闻列表 ===== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s;
}
.news-card:hover { transform: translateY(-4px); }
.news-card .news-img { height: 200px; overflow: hidden; }
.news-card .news-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.news-card:hover .news-img img { transform: scale(1.05); }
.news-card .news-body { padding: 20px; }
.news-card .news-date { font-size: 12px; color: var(--primary); margin-bottom: 8px; }
.news-card .news-body h4 { font-size: 15px; margin-bottom: 10px; line-height: 1.4; }
.news-card .news-body p { font-size: 12px; color: var(--text-light); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== 联系信息条 ===== */
.contact-bar {
  background: var(--gray);
  padding: 40px 0;
}
.contact-bar .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; }
.contact-item .ci-icon { font-size: 32px; color: var(--primary); margin-bottom: 12px; }
.contact-item h4 { font-size: 15px; margin-bottom: 8px; }
.contact-item p { font-size: 13px; color: var(--text-light); }

/* ===== 页脚 ===== */
.footer {
  background: var(--darker);
  color: #999;
  padding: 40px 0 0;
}
.footer-links { text-align: center; margin-bottom: 20px; }
.footer-links a { color: #ccc; margin: 0 12px; font-size: 13px; transition: 0.3s; }
.footer-links a:hover { color: var(--primary); }
.footer-info { text-align: center; font-size: 12px; line-height: 2; padding-bottom: 30px; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 20px; }
.footer-info a { color: #999; }
.footer-info a:hover { color: var(--primary); }

/* ===== 列表页 ===== */
.page-banner {
  height: 200px;
  background: linear-gradient(135deg, var(--dark), var(--darker));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}
/* 后台「子页轮播」设置了图片时生效；
   叠加深色遮罩，保证白色标题在任意图片上都清晰可读 */
.page-banner.has-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}
.page-banner.has-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,26,46,.72), rgba(15,15,26,.72));
}
.page-banner.has-img > div { position: relative; z-index: 1; }
.page-banner h1 { font-size: 32px; letter-spacing: 3px; }
.page-banner p { font-size: 14px; color: rgba(255,255,255,0.6); margin-top: 8px; }

/* 分类筛选 */
.filter-bar { display: flex; justify-content: center; gap: 12px; margin-bottom: 30px; flex-wrap: wrap; }
.filter-bar a {
  padding: 8px 24px;
  border: 1px solid #ddd;
  border-radius: 20px;
  color: var(--text);
  font-size: 14px;
  transition: 0.3s;
}
.filter-bar a:hover,
.filter-bar a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 产品列表 */
.products-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* 搜索框 */
.search-box { max-width: 600px; margin: 0 auto 30px; display: flex; gap: 0; }
.search-box input { flex: 1; padding: 12px 16px; border: 2px solid #ddd; border-right: none; border-radius: 4px 0 0 4px; font-size: 14px; outline: none; }
.search-box input:focus { border-color: var(--primary); }
.search-box button { padding: 12px 24px; background: var(--primary); color: #fff; border: 2px solid var(--primary); border-radius: 0 4px 4px 0; cursor: pointer; font-size: 14px; transition: 0.3s; }
.search-box button:hover { background: var(--primary-dark); }

/* 详情页 */
.detail-wrap { max-width: 90%; margin: 0 auto; padding: 60px 20px; }
.detail-wrap .detail-title { font-size: 28px; text-align: center; margin-bottom: 16px; }
.detail-wrap .detail-meta { text-align: center; color: var(--text-light); font-size: 13px; margin-bottom: 30px; }
.detail-wrap .detail-img { max-width: 100%; margin: 0 auto 30px; border-radius: 8px; }
.detail-wrap .detail-content { line-height: 2; font-size: 15px; color: #555; }
.detail-wrap .detail-content img { max-width: 100%; margin: 12px auto; }

/* 分页 */
.pager { text-align: center; margin-top: 40px; display: flex; justify-content: center; gap: 8px; }
.pager a { padding: 8px 16px; border: 1px solid #ddd; border-radius: 4px; color: var(--text); transition: 0.3s; }
.pager a:hover,
.pager a.on { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 联系我们表单 */
.contact-page { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding: 60px 0; }
.contact-info-block h3 { font-size: 20px; margin-bottom: 20px; }
.contact-info-block p { margin-bottom: 12px; color: var(--text-light); font-size: 14px; }
.contact-info-block .ci-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.contact-info-block .ci-row .ci-icon2 { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.contact-form { background: var(--gray); padding: 36px; border-radius: 8px; }
.contact-form h3 { font-size: 20px; margin-bottom: 20px; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: 0.3s;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--primary); }
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form .btn-submit { width: 100%; padding: 14px; background: var(--primary); color: #fff; border: none; border-radius: 4px; font-size: 15px; cursor: pointer; transition: 0.3s; }
.contact-form .btn-submit:hover { background: var(--primary-dark); }

/* ===== 留言验证码 ===== */
.captcha-row { display: flex; align-items: stretch; gap: 10px; margin-bottom: 16px; }
.captcha-row input { flex: 1; margin-bottom: 0; }
.captcha-img {
  width: 132px;
  height: 46px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  display: block;
  background: #f6f7f9;
}
.captcha-img:hover { border-color: var(--primary); }
/* 蜜罐字段：对真实访客不可见 */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
/* 联系我们整页内容（单页管理可视化编辑后展示） */
.page-content-block { padding-bottom: 20px; }
.page-content-block img { max-width: 100%; margin: 12px auto; }
.page-content-block h1, .page-content-block h2, .page-content-block h3 { margin: 18px 0 10px; color: #333; }
.page-content-block h1 { font-size: 24px; }
.page-content-block h2 { font-size: 20px; }
.page-content-block h3 { font-size: 17px; }

/* ===== 空数据状态 ===== */
.empty { text-align: center; padding: 80px 0; color: var(--text-light); }
.empty-icon { font-size: 56px; margin-bottom: 16px; opacity: .45; line-height: 1; }
.empty p { font-size: 14px; }

/* ===== 详情页 上一篇/下一篇 ===== */
.page-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  font-size: 14px;
  color: var(--text-light);
  flex-wrap: wrap;
}
.page-nav span { min-width: 0; }
.page-nav a { color: var(--text); transition: 0.3s; }
.page-nav a:hover { color: var(--primary); }

/* ===== 状态标签 ===== */
.tag-on, .tag-off {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.6;
  vertical-align: middle;
}
.tag-on { background: rgba(230,126,34,.12); color: var(--primary-dark); }
.tag-off { background: #f1f2f6; color: #999; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .product-grid, .products-list, .strength-grid { grid-template-columns: repeat(3, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 70px; left: 0; right: 0; background: var(--dark); flex-direction: column; padding: 10px 0; box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
  .nav.open { display: flex; }
  .nav a { height: auto; line-height: 2; padding: 10px 20px; }
  .nav a.active::after { display: none; }
  .slide-content h1 { font-size: 28px; }
  .about-section { grid-template-columns: 1fr; gap: 30px; }
  .product-grid, .products-list, .strength-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .contact-page { grid-template-columns: 1fr; gap: 30px; }
  .contact-bar .wrap { grid-template-columns: 1fr; gap: 24px; }
  .about-stats { flex-wrap: wrap; gap: 20px; }
  .slider-arrow { width: 36px; height: 36px; font-size: 14px; }
  .slider-arrow.prev { left: 10px; }
  .slider-arrow.next { right: 10px; }
}