/* BuildFastener.com - 全局样式 */
:root {
  --primary: #0b3d63;
  --primary-dark: #082c49;
  --primary-light: #e8f1f8;
  --accent: #e8590c;
  --accent-dark: #c74f0a;
  --text: #1f2937;
  --text-muted: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f4f7fa;
  --border: #e5e7eb;
  --success: #16a34a;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(11, 61, 99, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
}
[dir="rtl"] body { font-family: "Segoe UI", "Noto Naskh Arabic", "Tahoma", Arial, sans-serif; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3, h4 { line-height: 1.3; font-weight: 700; }

/* 顶部信息条 */
.topbar {
  background: var(--primary-dark);
  color: #cbd5e1;
  font-size: 13px;
  padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.topbar a { color: #e2e8f0; }
.topbar .topbar-contact { display: flex; gap: 18px; flex-wrap: wrap; }

/* 导航 */
.header { background: var(--bg); box-shadow: 0 1px 8px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 100; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; color: var(--primary); }
.logo .logo-icon {
  width: 42px; height: 42px; background: var(--primary); color: #fff; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.logo small { display: block; font-size: 11px; font-weight: 400; color: var(--text-muted); letter-spacing: .5px; }
.nav-menu { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-menu a { display: block; padding: 8px 14px; border-radius: 8px; font-weight: 500; color: var(--text); }
.nav-menu a:hover, .nav-menu a.active { color: var(--accent); background: #fff4ec; }
.lang-switch { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg); cursor: pointer; font-size: 14px; font-weight: 500;
}
.lang-dropdown {
  position: absolute; top: 44px; right: 0; background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow); min-width: 180px; padding: 6px; display: none; z-index: 200;
}
.lang-switch:hover .lang-dropdown, .lang-switch:focus-within .lang-dropdown { display: block; }
.lang-dropdown a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 6px; font-size: 14px; }
.lang-dropdown a:hover { background: var(--primary-light); }
.lang-dropdown a.active { color: var(--accent); font-weight: 700; }
.nav-toggle { display: none; background: none; border: none; font-size: 26px; cursor: pointer; color: var(--primary); }

/* Hero */
.hero {
  background: linear-gradient(120deg, var(--primary-dark) 0%, var(--primary) 60%, #12527e 100%);
  color: #fff;
  padding: 80px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px;
  border: 40px solid rgba(255,255,255,.05); border-radius: 50%;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: 42px; margin-bottom: 16px; max-width: 700px; }
.hero p { font-size: 18px; opacity: .92; max-width: 640px; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 8px; font-weight: 600; font-size: 15px;
  transition: all .2s; border: none; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.6); }
.btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-dark { background: var(--primary); color: #fff; }
.btn-dark:hover { background: var(--primary-dark); color: #fff; }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { background: var(--primary-light); }

/* 区块 */
.section { padding: 70px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head h2 { font-size: 32px; color: var(--primary); margin-bottom: 12px; }
.section-head p { color: var(--text-muted); font-size: 16px; }

/* 产品分类卡片 */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.cat-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 22px; text-align: center; transition: all .25s; display: block; color: var(--text);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary); color: var(--text); }
.cat-card .cat-icon { width: 64px; height: 64px; margin: 0 auto 16px; background: var(--primary-light); color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.cat-card h3 { font-size: 18px; margin-bottom: 8px; }
.cat-card p { font-size: 14px; color: var(--text-muted); }

/* 产品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.product-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: all .25s; display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.product-card .thumb { height: 200px; background: var(--bg-alt); display: flex; align-items: center; justify-content: center; position: relative; }
.product-card .thumb .ph { font-size: 56px; opacity: .5; }
.product-card .badge { position: absolute; top: 12px; left: 12px; background: var(--accent); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 20px; }
.product-card .body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.product-card .body h3 { font-size: 16px; margin-bottom: 8px; }
.product-card .body p { font-size: 14px; color: var(--text-muted); flex: 1; }
.product-card .body .link { margin-top: 12px; font-weight: 600; font-size: 14px; color: var(--accent); }

/* 优势 */
.adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.adv-item { background: var(--bg); border-radius: var(--radius); padding: 28px 24px; border: 1px solid var(--border); }
.adv-item .adv-icon { font-size: 30px; margin-bottom: 14px; }
.adv-item h3 { font-size: 17px; margin-bottom: 8px; color: var(--primary); }
.adv-item p { font-size: 14px; color: var(--text-muted); }

/* 应用 */
.app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.app-item { text-align: center; padding: 30px 20px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); }
.app-item .app-icon { font-size: 34px; margin-bottom: 12px; }
.app-item h3 { font-size: 16px; margin-bottom: 8px; }
.app-item p { font-size: 14px; color: var(--text-muted); }

/* 新闻 */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.news-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: block; color: var(--text); transition: all .25s; }
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); color: var(--text); }
.news-card .date { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.news-card h3 { font-size: 16px; margin-bottom: 8px; }
.news-card p { font-size: 14px; color: var(--text-muted); }

/* FAQ */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq-item summary { padding: 18px 22px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::after { content: "+"; font-size: 22px; color: var(--accent); }
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-a { padding: 0 22px 18px; color: var(--text-muted); font-size: 15px; }

/* 询盘表单 */
.quote-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.quote-info h3 { font-size: 24px; color: var(--primary); margin-bottom: 14px; }
.quote-info ul { list-style: none; }
.quote-info li { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; font-size: 15px; }
.quote-info .qi { width: 40px; height: 40px; background: var(--primary-light); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 15px; font-family: inherit; background: var(--bg); transition: border-color .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-group textarea { min-height: 110px; resize: vertical; }
.form-status { margin-top: 12px; font-size: 14px; display: none; }
.form-status.ok { color: var(--success); display: block; }
.form-status.err { color: #dc2626; display: block; }

/* 社媒 */
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a {
  width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.12); color: #fff; transition: all .2s; font-size: 18px;
}
.socials a:hover { background: var(--accent); transform: translateY(-2px); color: #fff; }
.socials.dark a { background: var(--primary-light); color: var(--primary); }
.socials.dark a:hover { background: var(--primary); color: #fff; }

/* 页脚 */
.footer { background: var(--primary-dark); color: #cbd5e1; padding: 60px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 36px; padding-bottom: 40px; }
.footer h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer p { font-size: 14px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { color: #cbd5e1; font-size: 14px; }
.footer ul a:hover { color: #fff; }
.footer .contact-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-bottom: 12px; }
.footer .contact-list .ci { font-size: 16px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-bottom a { color: #94a3b8; }

/* 面包屑 */
.breadcrumb { background: var(--primary-light); padding: 14px 0; font-size: 14px; }
.breadcrumb a { color: var(--primary); }
.breadcrumb span { color: var(--text-muted); }
.breadcrumb .sep { margin: 0 8px; color: #94a3b8; }

/* 页面标题 */
.page-hero { background: var(--primary); color: #fff; padding: 56px 0; }
.page-hero h1 { font-size: 34px; margin-bottom: 8px; }
.page-hero p { opacity: .9; max-width: 700px; }

/* 产品详情 */
.pd-wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: 44px; }
.pd-gallery .pd-img { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); height: 380px; display: flex; align-items: center; justify-content: center; font-size: 110px; }
.pd-info h1 { font-size: 28px; color: var(--primary); margin-bottom: 14px; }
.pd-info .sku { font-size: 14px; color: var(--text-muted); margin-bottom: 14px; }
.pd-info .desc { color: var(--text-muted); margin-bottom: 20px; }
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.spec-table th, .spec-table td { border: 1px solid var(--border); padding: 12px 14px; font-size: 15px; text-align: left; }
.spec-table th { background: var(--bg-alt); width: 30%; font-weight: 600; }
[dir="rtl"] .spec-table th, [dir="rtl"] .spec-table td { text-align: right; }

/* 关于页 */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 44px; align-items: center; }
.about-img { background: var(--primary-light); border-radius: var(--radius); height: 320px; display: flex; align-items: center; justify-content: center; font-size: 90px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 44px; }
.stat-item { text-align: center; background: var(--bg-alt); border-radius: var(--radius); padding: 24px 10px; }
.stat-item .num { font-size: 30px; font-weight: 800; color: var(--accent); }
.stat-item .label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* 联系页 */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 44px; }
.contact-card { display: flex; gap: 16px; align-items: flex-start; background: var(--bg-alt); padding: 20px; border-radius: var(--radius); margin-bottom: 14px; }
.contact-card .cc-icon { width: 46px; height: 46px; background: var(--primary); color: #fff; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.contact-card h4 { font-size: 15px; margin-bottom: 4px; }
.contact-card p, .contact-card a { font-size: 15px; color: var(--text-muted); word-break: break-all; }
.contact-card a:hover { color: var(--accent); }

/* 新闻详情 */
.article { max-width: 820px; margin: 0 auto; }
.article h1 { font-size: 30px; color: var(--primary); margin-bottom: 10px; }
.article .meta { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.article .content { font-size: 16px; }
.article .content p { margin-bottom: 16px; }

/* 404 */
.notfound { text-align: center; padding: 100px 0; }
.notfound h1 { font-size: 80px; color: var(--primary-light); }
.notfound h2 { font-size: 26px; margin-bottom: 12px; }
.notfound p { color: var(--text-muted); margin-bottom: 24px; }

/* 响应式 */
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute; top: 72px; left: 0; right: 0; background: var(--bg);
    flex-direction: column; align-items: stretch; padding: 10px 20px 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,.1); display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 12px 8px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .lang-switch { align-self: flex-start; }
  .lang-dropdown { right: auto; left: 0; }
  .hero h1 { font-size: 32px; }
  .quote-wrap, .pd-wrap, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .section { padding: 50px 0; }
  .section-head h2 { font-size: 26px; }
  .hero { padding: 60px 0 70px; }
  .hero h1 { font-size: 27px; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar .topbar-contact { display: none; }
}

/* 浮动联系按钮 */
.float-contact { position: fixed; bottom: 22px; right: 22px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
[dir="rtl"] .float-contact { right: auto; left: 22px; }
.float-contact a {
  width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.2); color: #fff; font-size: 22px; transition: transform .2s;
}
.float-contact a:hover { transform: scale(1.08); }
.float-contact .wa { background: #25d366; }
.float-contact .wechat { background: #07c160; }
.float-contact .email { background: var(--primary); }
