/* ============================================
   德旭森系统门窗官网 样式
   ============================================ */
:root {
  --blue: #0f4fa2;
  --blue-deep: #0a3a7d;
  --blue-light: #2f7ad9;
  --blue-bg: #f0f5fc;
  --gold: #c9a063;
  --text: #333;
  --text-light: #777;
  --border: #e5e9f0;
  --shadow: 0 10px 30px rgba(15, 79, 162, .10);
  --radius: 10px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
.container { width: min(1200px, 92%); margin: 0 auto; }

/* ---------- 顶部栏 ---------- */
.topbar { background: var(--blue-deep); color: rgba(255,255,255,.85); font-size: 13px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 36px; }
.topbar strong { color: #fff; letter-spacing: 1px; }

/* ---------- 导航 ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: box-shadow .3s;
}
.header-inner { display: flex; align-items: center; height: 76px; gap: 32px; }
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo img { height: 58px; width: auto; }
.logo-text b { display: block; font-size: 22px; color: var(--blue); letter-spacing: 2px; line-height: 1.2; }
.logo-text i { font-style: normal; font-size: 10px; color: var(--text-light); letter-spacing: 1px; text-transform: uppercase; }
.nav { display: flex; gap: 8px; margin-left: auto; }
.nav a { padding: 8px 16px; font-size: 16px; color: var(--text); border-radius: 6px; transition: .25s; position: relative; }
.nav a:hover, .nav a.active { color: var(--blue); }
.nav a.active::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: -2px;
  height: 3px; border-radius: 2px; background: var(--blue);
}
.header-phone { text-align: right; flex-shrink: 0; }
.header-phone em { font-style: normal; color: var(--blue-light); font-size: 20px; font-weight: bold; margin-right: 2px; }
.header-phone b { font-size: 22px; color: var(--blue); letter-spacing: 1px; }
.header-phone::before {
  content: "☎"; display: block; font-size: 11px; color: var(--text-light); line-height: 1;
  transform: translateY(2px);
}
.menu-btn { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-btn span { width: 24px; height: 2.5px; background: var(--blue); border-radius: 2px; transition: .3s; }

/* ---------- 首屏 ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(120deg, var(--blue-deep), var(--blue) 55%, var(--blue-light));
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,58,125,.88) 0%, rgba(15,79,162,.55) 55%, rgba(15,79,162,.25) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 110px 0 130px; max-width: 720px; }
.hero-tag {
  display: inline-block; font-size: 14px; letter-spacing: 4px;
  border: 1px solid rgba(255,255,255,.45); padding: 6px 18px; border-radius: 30px;
  margin-bottom: 26px; color: rgba(255,255,255,.9);
}
.hero h1 { font-size: 54px; line-height: 1.25; letter-spacing: 3px; font-weight: 700; }
.hero h1 span { color: #ffd98a; }
.hero-sub { margin: 22px 0 38px; font-size: 17px; color: rgba(255,255,255,.88); letter-spacing: 1px; }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 14px 38px; border-radius: 40px;
  font-size: 16px; letter-spacing: 2px; transition: .3s; cursor: pointer; border: none;
}
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: #b8924f; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(201,160,99,.4); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.hero-stats {
  position: absolute; right: 0; bottom: 0; z-index: 3;
  background: rgba(255,255,255,.96); color: var(--text);
  display: flex; border-radius: var(--radius) 0 0 0; padding: 26px 40px 22px; gap: 42px;
  box-shadow: var(--shadow);
}
.hero-stats b { font-size: 34px; color: var(--blue); font-weight: 700; display: block; line-height: 1.1; }
.hero-stats b i { font-style: normal; font-size: 16px; margin-left: 2px; }
.hero-stats span { font-size: 13px; color: var(--text-light); }

/* ---------- 通用板块 ---------- */
.section { padding: 90px 0; }
.section-gray { background: var(--blue-bg); }
.sec-head { text-align: center; margin-bottom: 56px; }
.sec-en { font-size: 13px; letter-spacing: 6px; color: var(--blue-light); text-transform: uppercase; }
.sec-head h2 { font-size: 36px; letter-spacing: 4px; margin: 6px 0 14px; color: var(--text); }
.sec-line { width: 56px; height: 3px; background: var(--gold); margin: 0 auto 14px; border-radius: 2px; }
.sec-desc { color: var(--text-light); font-size: 15px; }

/* ---------- 分类入口 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cat-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4/3; box-shadow: var(--shadow); background: #dde6f2;
  transition: .35s;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(15,79,162,.18); }
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.cat-card:hover img { transform: scale(1.06); }
.cat-card .mask {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px; background: linear-gradient(180deg, transparent 40%, rgba(10,40,90,.82));
  color: #fff;
}
.cat-card .mask h3 { font-size: 22px; letter-spacing: 2px; }
.cat-card .mask p { font-size: 12px; color: rgba(255,255,255,.75); letter-spacing: 1px; margin-bottom: 4px; }
.cat-card .mask .more {
  margin-top: 10px; font-size: 13px; color: #ffd98a; letter-spacing: 1px;
  opacity: 0; transform: translateY(8px); transition: .3s;
}
.cat-card:hover .more { opacity: 1; transform: none; }

/* ---------- 产品网格 ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); transition: .3s; cursor: pointer; display: block;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: transparent; }
.product-card .pic { aspect-ratio: 4/3; overflow: hidden; background: #eef2f7; }
.product-card .pic img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.product-card:hover .pic img { transform: scale(1.05); }
.product-card .info { padding: 16px 18px; }
.product-card .info h3 { font-size: 16px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-card .info p { font-size: 12.5px; color: var(--text-light); margin-top: 4px; }

/* 产品中心页：分类 tab */
.cat-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 44px; }
.cat-tabs a {
  padding: 10px 26px; border-radius: 30px; font-size: 15px;
  background: #fff; border: 1px solid var(--border); color: var(--text); transition: .25s;
}
.cat-tabs a:hover { color: var(--blue); border-color: var(--blue-light); }
.cat-tabs a.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- 产品详情 ---------- */
.detail-wrap { display: none; }
.detail-wrap.show { display: block; }
.detail-main { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; }
.detail-gallery .main-pic {
  border-radius: var(--radius); overflow: hidden; background: #eef2f7;
  aspect-ratio: 4/3; box-shadow: var(--shadow);
}
.detail-gallery .main-pic img { width: 100%; height: 100%; object-fit: cover; }
.detail-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.detail-thumbs img {
  width: 76px; height: 57px; object-fit: cover; border-radius: 6px; cursor: pointer;
  border: 2px solid transparent; opacity: .75; transition: .25s;
}
.detail-thumbs img.active, .detail-thumbs img:hover { border-color: var(--blue); opacity: 1; }
.detail-info h1 { font-size: 30px; letter-spacing: 1px; margin: 4px 0 18px; }
.detail-info .cat-tag {
  display: inline-block; font-size: 12.5px; color: var(--blue); background: var(--blue-bg);
  padding: 3px 12px; border-radius: 20px; letter-spacing: 1px;
}
.spec-box { border-top: 1px dashed var(--border); padding-top: 20px; margin-top: 6px; }
.spec-box p { font-size: 14.5px; color: #555; margin-bottom: 6px; }
.spec-box p b { color: var(--blue); font-weight: 600; }
.detail-cta { display: flex; gap: 14px; margin-top: 28px; align-items: center; flex-wrap: wrap; }
.detail-cta .tel { font-size: 15px; color: var(--text-light); }
.detail-cta .tel strong { color: var(--blue); font-size: 20px; }
.detail-note { margin-top: 26px; font-size: 12.5px; color: #aab4c2; }
.crumb { font-size: 13.5px; color: var(--text-light); margin-bottom: 28px; }
.crumb a:hover { color: var(--blue); }
.crumb .sep { margin: 0 8px; color: #ccd5e0; }

/* ---------- 优势 ---------- */
.strength-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.strength-item {
  background: #fff; border-radius: var(--radius); padding: 38px 30px;
  box-shadow: var(--shadow); transition: .3s; position: relative; overflow: hidden;
}
.strength-item::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light)); transform: scaleX(0); transform-origin: left; transition: .35s;
}
.strength-item:hover::before { transform: scaleX(1); }
.strength-item:hover { transform: translateY(-5px); }
.strength-icon {
  width: 62px; height: 62px; border-radius: 50%; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: #fff; font-size: 26px; display: flex; align-items: center; justify-content: center;
}
.strength-item h3 { font-size: 19px; margin-bottom: 10px; letter-spacing: 1px; }
.strength-item p { font-size: 14px; color: var(--text-light); }

/* ---------- 案例 ---------- */
.case-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.case-item { border-radius: var(--radius); overflow: hidden; position: relative; aspect-ratio: 4/3; cursor: pointer; }
.case-item img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.case-item:hover img { transform: scale(1.07); }
.case-item .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 12px;
  background: linear-gradient(180deg, transparent, rgba(10,40,90,.85));
  color: #fff; font-size: 14.5px; letter-spacing: 1px;
}

/* ---------- 关于 ---------- */
.about-flex { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-flex .pic-box { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; background: #e8eef6; }
.about-flex .pic-box img { width: 100%; height: 100%; object-fit: cover; }
.about-text h2 { font-size: 32px; letter-spacing: 3px; margin-bottom: 8px; }
.about-text .en { color: var(--blue-light); font-size: 13px; letter-spacing: 3px; text-transform: uppercase; }
.about-text p { margin-top: 20px; font-size: 15px; color: #555; text-align: justify; }
.about-nums { display: flex; gap: 40px; margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--border); }
.about-nums b { font-size: 36px; color: var(--blue); display: block; line-height: 1.1; }
.about-nums b i { font-style: normal; font-size: 15px; }
.about-nums span { font-size: 13px; color: var(--text-light); }

/* ---------- 联系 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; }
.contact-list li { display: flex; gap: 16px; margin-bottom: 30px; }
.contact-list .ic {
  width: 50px; height: 50px; flex-shrink: 0; border-radius: 10px;
  background: var(--blue-bg); color: var(--blue); font-size: 22px;
  display: flex; align-items: center; justify-content: center;
}
.contact-list h4 { font-size: 16px; margin-bottom: 4px; }
.contact-list p { font-size: 14.5px; color: var(--text-light); }
.contact-list p strong { color: var(--blue); font-size: 18px; letter-spacing: 1px; }
.form-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px; }
.form-card h3 { font-size: 22px; margin-bottom: 6px; }
.form-card .tip { font-size: 13px; color: var(--text-light); margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-card input, .form-card select, .form-card textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14.5px; font-family: inherit; margin-bottom: 16px; outline: none; transition: .25s; background: #fafbfd;
}
.form-card input:focus, .form-card select:focus, .form-card textarea:focus { border-color: var(--blue-light); background: #fff; }
.form-card textarea { resize: vertical; min-height: 96px; }
.form-ok { display: none; text-align: center; padding: 30px 0; color: var(--blue); }
.form-ok.show { display: block; }

/* ---------- CTA 横幅 ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--blue-deep), var(--blue)); color: #fff;
  padding: 64px 0; text-align: center;
}
.cta-banner h2 { font-size: 30px; letter-spacing: 3px; margin-bottom: 10px; }
.cta-banner p { color: rgba(255,255,255,.8); margin-bottom: 28px; }

/* ---------- 页脚 ---------- */
.footer { background: #0b2c55; color: rgba(255,255,255,.72); padding: 64px 0 0; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; padding-bottom: 44px; }
.footer h4 { color: #fff; font-size: 17px; letter-spacing: 2px; margin-bottom: 20px; }
.footer .flogo { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.footer .flogo img { height: 44px; }
.footer .flogo b { color: #fff; font-size: 19px; letter-spacing: 2px; }
.footer p { line-height: 2; }
.footer li { line-height: 2.4; transition: .25s; }
.footer li:hover { color: #fff; padding-left: 4px; }
.footer .tel { font-size: 26px; color: #ffd98a; font-weight: 700; letter-spacing: 1px; display: block; margin: 6px 0; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; text-align: center; font-size: 12.5px; color: rgba(255,255,255,.45); }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 999; background: rgba(8,18,35,.92);
  display: none; align-items: center; justify-content: center; padding: 4%;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 8px; }
.lightbox .close {
  position: absolute; top: 20px; right: 28px; font-size: 40px; color: rgba(255,255,255,.7);
  cursor: pointer; line-height: 1;
}

/* ---------- 招商加盟 ---------- */
.join-hero {
  background: linear-gradient(120deg, var(--blue-deep), var(--blue) 60%, var(--blue-light));
  color: #fff; padding: 84px 0; position: relative; overflow: hidden;
}
.join-hero::after {
  content: "JOIN US"; position: absolute; right: -1%; bottom: -18%;
  font-size: 150px; font-weight: 800; letter-spacing: 10px;
  color: rgba(255,255,255,.06); pointer-events: none;
}
.join-hero h1 { font-size: 40px; letter-spacing: 4px; }
.join-hero p { margin-top: 14px; color: rgba(255,255,255,.85); font-size: 16px; letter-spacing: 1px; }
.join-hero .btn { margin-top: 30px; }

.step-flow { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; counter-reset: step; }
.step-item {
  background: #fff; border-radius: var(--radius); padding: 28px 16px 22px;
  text-align: center; box-shadow: var(--shadow); position: relative; counter-increment: step;
}
.step-item::before {
  content: counter(step, decimal-leading-zero);
  display: block; font-size: 26px; font-weight: 800; color: rgba(15,79,162,.18);
  margin-bottom: 8px; line-height: 1;
}
.step-item::after {
  content: "→"; position: absolute; right: -14px; top: 50%; transform: translateY(-50%);
  color: var(--blue-light); font-size: 16px; z-index: 2;
}
.step-item:last-child::after { display: none; }
.step-item h4 { font-size: 16px; margin-bottom: 6px; color: var(--text); }
.step-item p { font-size: 12px; color: var(--text-light); line-height: 1.6; }

.join-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: start; }
.join-points li { display: flex; gap: 14px; margin-bottom: 22px; }
.join-points .ic {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; font-size: 19px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: #fff; display: flex; align-items: center; justify-content: center;
}
.join-points h4 { font-size: 16.5px; margin-bottom: 3px; }
.join-points p { font-size: 13.5px; color: var(--text-light); }

@media (max-width: 1024px) {
  .step-flow { grid-template-columns: repeat(3, 1fr); }
  .step-item::after { display: none; }
  .join-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 720px) {
  .step-flow { grid-template-columns: repeat(2, 1fr); }
  .join-hero h1 { font-size: 30px; }
}

/* ---------- 滚动显现 ---------- */
.fade-up { opacity: 0; transform: translateY(30px); transition: .7s ease; }
.fade-up.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .cat-grid, .product-grid, .case-grid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 42px; }
  .hero-stats { position: static; margin: 50px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 26px 36px; border-radius: var(--radius); }
  .hero-inner { padding: 80px 0 60px; }
  .detail-main { grid-template-columns: 1fr; gap: 30px; }
  .about-flex, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .topbar-inner { justify-content: center; }
  .topbar-inner span:first-child { display: none; }
  .header-inner { height: 64px; gap: 14px; }
  .logo img { height: 40px; }
  .logo-text b { font-size: 17px; }
  .header-phone { display: none; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 10px 4%; box-shadow: 0 12px 24px rgba(0,0,0,.1);
  }
  .nav.open { display: flex; }
  .menu-btn { display: flex; }
  .cat-grid, .product-grid, .case-grid { grid-template-columns: repeat(2, 1fr); }
  .strength-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .hero-sub { font-size: 15px; }
  .section { padding: 60px 0; }
  .sec-head h2 { font-size: 28px; }
  .form-card { padding: 26px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .detail-info h1 { font-size: 24px; }
}
