/* 识德机械官网 - 全站样式 */
:root {
  --primary: #0d4a8f;
  --primary-dark: #093768;
  --accent: #2b8ae0;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1f2d3d;
  --text-light: #6b7a8d;
  --border: #e3e9f0;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(13, 74, 143, .08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  color: var(--text); background: var(--bg); line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- 顶栏 ---------- */
.topbar { background: var(--primary-dark); color: #cfe0f2; font-size: 13px; }
.topbar .inner { max-width: 1180px; margin: 0 auto; padding: 5px 20px; display: flex; justify-content: space-between; }
.header { background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 100; }
.header .inner { max-width: 1180px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; height: 68px; gap: 40px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark { width: 44px; height: 44px; background: var(--primary); color: #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; letter-spacing: -1px; }
.logo-text .cn { font-size: 20px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.logo-text .en { font-size: 11px; color: var(--text-light); }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a { padding: 8px 16px; border-radius: 6px; font-size: 15px; color: var(--text); transition: .2s; }
.nav a:hover, .nav a.active { background: #eaf2fb; color: var(--primary); font-weight: 600; }
.menu-btn { display: none; background: none; border: none; font-size: 24px; color: var(--primary); cursor: pointer; margin-left: auto; }

/* ---------- Banner ---------- */
.hero {
  background: linear-gradient(120deg, rgba(9,55,104,.92), rgba(13,74,143,.85)),
              url('/assets/image3.jpg') center/cover;
  color: #fff; padding: 90px 20px; text-align: center;
}
.hero h1 { font-size: 42px; letter-spacing: 2px; margin-bottom: 12px; }
.hero p { font-size: 17px; opacity: .92; max-width: 720px; margin: 0 auto 30px; }
.hero .btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-block; padding: 12px 32px; border-radius: 6px; font-size: 15px; cursor: pointer; border: none; transition: .2s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #1f77c9; }
.btn-outline { border: 1px solid rgba(255,255,255,.7); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-ghost { background: var(--primary); color: #fff; }

/* ---------- 通用区块 ---------- */
.section { max-width: 1180px; margin: 0 auto; padding: 60px 20px; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 30px; color: var(--primary); }
.section-title .sub { color: var(--text-light); font-size: 14px; margin-top: 6px; }
.section-title::after { content: ''; display: block; width: 44px; height: 3px; background: var(--accent); margin: 14px auto 0; border-radius: 2px; }

/* 统计数字 */
.stats { background: var(--primary); color: #fff; }
.stats .inner { max-width: 1180px; margin: 0 auto; padding: 34px 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stats .num { font-size: 34px; font-weight: 700; }
.stats .num span { font-size: 16px; font-weight: 400; margin-left: 2px; }
.stats .label { font-size: 14px; opacity: .85; margin-top: 4px; }

/* ---------- 产品卡片 ---------- */
.grid { display: grid; gap: 24px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.product-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: .25s; display: block; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 8px 24px rgba(13,74,143,.16); }
.product-card .thumb { height: 210px; background: #eef1f5; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .info { padding: 14px 16px; }
.product-card .info h3 { font-size: 16px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-card .info p { font-size: 13px; color: var(--text-light); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge { display: inline-block; font-size: 12px; background: #eaf2fb; color: var(--primary); padding: 2px 10px; border-radius: 20px; margin-bottom: 6px; }

/* ---------- 特性/优势 ---------- */
.feature-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature { background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.feature .icon { width: 52px; height: 52px; border-radius: 12px; background: #eaf2fb; display: flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 16px; }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--text-light); }

/* ---------- 客户墙 ---------- */
.customers { background: #fff; }
.customer-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 16px; }
.customer-grid .logo-cell { border: 1px solid var(--border); border-radius: 8px; height: 74px; display: flex; align-items: center; justify-content: center; padding: 12px; background: #fff; }
.customer-grid img { max-height: 46px; object-fit: contain; filter: grayscale(20%); }

/* ---------- 关于页 ---------- */
.about-flex { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.about-flex img { border-radius: var(--radius); box-shadow: var(--shadow); }
.rich p { margin-bottom: 14px; text-align: justify; }
.equip-table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; }
.equip-table th, .equip-table td { padding: 12px 18px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border); }
.equip-table th { background: var(--primary); color: #fff; font-weight: 500; }
.equip-table tr:last-child td { border-bottom: none; }
.equip-table tr:nth-child(even) td { background: #f8fafc; }

/* ---------- 产品详情 ---------- */
.detail { display: grid; grid-template-columns: 480px 1fr; gap: 40px; background: #fff; padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow); }
.detail .main-img { height: 380px; border-radius: 8px; overflow: hidden; background: #eef1f5; display: flex; align-items: center; justify-content: center; }
.detail .main-img img { width: 100%; height: 100%; object-fit: contain; background:#fff; }
.detail .thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.detail .thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.detail .thumbs img.on { border-color: var(--accent); }
.detail h1 { font-size: 26px; color: var(--primary); margin-bottom: 8px; }
.detail .meta { color: var(--text-light); font-size: 14px; margin-bottom: 20px; }
.detail .desc { white-space: pre-line; margin-bottom: 20px; }
.spec-box { background: #f4f8fc; border-left: 3px solid var(--accent); padding: 16px 20px; border-radius: 6px; white-space: pre-line; font-size: 14px; }

/* ---------- 联系/留言 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 30px; }
.contact-card { background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.contact-card h3 { color: var(--primary); margin-bottom: 14px; font-size: 18px; }
.contact-item { display: flex; gap: 12px; margin-bottom: 14px; font-size: 14.5px; }
.contact-item .ico { color: var(--accent); }
.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--text); }
.form-item label b { color: #d33; }
.form-item input, .form-item textarea, .form-item select {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-family: inherit; outline: none; transition: .2s; background:#fff;
}
.form-item input:focus, .form-item textarea:focus { border-color: var(--accent); }
.form-item textarea { min-height: 120px; resize: vertical; }

/* ---------- 页脚 ---------- */
.footer { background: var(--primary-dark); color: #b9cadb; margin-top: 60px; }
.footer .inner { max-width: 1180px; margin: 0 auto; padding: 46px 20px 24px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.footer h4 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.footer a:hover { color: #fff; }
.footer li, .footer p { font-size: 13.5px; margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); text-align: center; padding: 16px; font-size: 13px; }

/* 提示消息 */
.toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); background: #323c48; color: #fff; padding: 10px 24px; border-radius: 6px; font-size: 14px; z-index: 999; opacity: 0; transition: .3s; pointer-events: none; }
.toast.show { opacity: 1; }
.empty-tip { text-align: center; color: var(--text-light); padding: 60px 0; grid-column: 1/-1; }

/* 筛选栏 */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-bar button { padding: 8px 20px; border-radius: 20px; border: 1px solid var(--border); background: #fff; font-size: 14px; cursor: pointer; transition: .2s; }
.filter-bar button.on, .filter-bar button:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 响应式 */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .feature-list { grid-template-columns: 1fr 1fr; }
  .customer-grid { grid-template-columns: repeat(4, 1fr); }
  .stats .inner { grid-template-columns: repeat(2, 1fr); }
  .about-flex, .detail, .contact-grid { grid-template-columns: 1fr; }
  .footer .inner { grid-template-columns: 1fr; }
  .nav { position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 10px 20px; box-shadow: 0 6px 16px rgba(0,0,0,.08); display: none; }
  .nav.open { display: flex; }
  .menu-btn { display: block; }
  .hero h1 { font-size: 30px; }
}
@media (max-width: 560px) {
  .grid-4, .grid-3, .feature-list { grid-template-columns: 1fr; }
  .customer-grid { grid-template-columns: repeat(3, 1fr); }
}
