/* ===================================================================
   犇特建材官网 公共样式
   =================================================================== */
:root {
  --brand: #E60012;
  --brand-dark: #B3000E;
  --ink: #222222;
  --gray: #666666;
  --bg-light: #F7F7F8;
  --white: #FFFFFF;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(0, 0, 0, .08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--ink); background: var(--white); line-height: 1.7;
}
a { color: inherit; }
img { display: block; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
h2.section-title { font-size: 30px; text-align: center; margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--gray); margin-bottom: 10px; font-size: 15px; }
.swipe-hint { text-align: center; color: #aaa; font-size: 12.5px; margin-bottom: 22px; letter-spacing: 1px; }
section { padding: 60px 0; }
section.alt { background: var(--bg-light); }

/* 顶部导航 */
header.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white); box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav img.logo { height: 44px; }
.nav ul { display: flex; gap: 30px; list-style: none; }
.nav a { text-decoration: none; color: var(--ink); font-size: 15.5px; }
.nav a:hover, .nav a.active { color: var(--brand); font-weight: bold; }
.nav .contact-quick { color: var(--brand); font-weight: bold; font-size: 15px; text-decoration: none; }
.menu-btn { display: none; font-size: 26px; background: none; border: none; color: var(--brand); cursor: pointer; }

/* 首屏：固定建材质感背景图 + 品牌红半透明蒙层（图片缺失时回退红色渐变） */
.hero { position: relative; background: url('/images/hero-bg.jpg') center/cover no-repeat, linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; text-align: center; padding: 96px 20px 104px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(135deg, rgba(179,0,14,.62) 0%, rgba(90,0,8,.72) 100%); }
.hero > .hero-inner { position: relative; z-index: 1; }
.hero h1 { font-size: 40px; letter-spacing: 4px; margin-bottom: 16px; }
.hero p { font-size: 18px; opacity: .92; margin-bottom: 34px; }
.btn { display: inline-block; padding: 12px 34px; border-radius: 999px; text-decoration: none; font-size: 15.5px; transition: .2s; cursor: pointer; border: none; }
.btn-white { background: #fff; color: var(--brand); font-weight: bold; }
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { border: 1.5px solid #fff; color: #fff; margin-left: 12px; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-red { background: var(--brand); color: #fff; font-weight: bold; }
.btn-red:hover { background: var(--brand-dark); }
.btn-sm { padding: 8px 20px; font-size: 14px; }

/* 横向滑动 */
.scroller { position: relative; }
.track {
  display: flex; gap: 22px; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 6px 2px 16px; scrollbar-width: none; -ms-overflow-style: none;
}
.track::-webkit-scrollbar { display: none; }
.track.dragging { scroll-behavior: auto; }
.track.dragging * { user-select: none; }
.slide { flex: 0 0 auto; scroll-snap-align: start; }
.nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  background: #fff; border: 1px solid #ececef; box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
  color: var(--brand); font-size: 20px; line-height: 1; cursor: pointer; z-index: 5; transition: .2s;
}
.nav-btn:hover { background: var(--brand); color: #fff; }
.nav-btn[disabled] { opacity: .25; cursor: default; }
.nav-btn[disabled]:hover { background: #fff; color: var(--brand); }
.nav-btn.prev { left: -10px; }
.nav-btn.next { right: -10px; }

/* 通用卡片 */
.card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: .25s; position: relative;
  display: block; text-decoration: none; color: var(--ink);
}
.card:hover { transform: translateY(-6px); }
.card .pic { height: 180px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #f2f2f4; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.card .pic.ph { color: #fff; font-size: 30px; font-weight: bold; letter-spacing: 2px; }
.ph-shell { background: linear-gradient(135deg, #f2d9d0, #e8b4a0, #d98d7e); }
.ph-sand { background: linear-gradient(135deg, #f7f1e3, #e6dcc3, #d9c9a3); }
.ph-pu { background: linear-gradient(135deg, #cfe3f2, #a9c6de, #8fb3cc); }
.ph-default { background: linear-gradient(135deg, #dfe3e6, #c2c9cd); }
.card .info { padding: 16px 18px 20px; }
.card .info h3 { font-size: 18px; margin-bottom: 5px; }
.card .info p { font-size: 13.5px; color: var(--gray); }
.tag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(230, 0, 18, .85); color: #fff;
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
}
.slide-product { width: 262px; }
.slide-news, .slide-case { width: 336px; }

/* 关于我们：整屏分屏 */
.about-slider .track-full { gap: 0; }
.slide-panel { flex: 0 0 100%; width: 100%; scroll-snap-align: start; }
.panel { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 34px 38px; min-height: 372px; }
.panel-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.panel-head h3 { font-size: 20px; }
.panel-head span { font-size: 12.5px; color: #b0b0b5; letter-spacing: 1px; }
.about { display: flex; gap: 44px; align-items: flex-start; }
.about img { width: 300px; border-radius: var(--radius); flex: 0 0 300px; }
.about-text { flex: 1; min-width: 0; }
.about-text p { color: var(--gray); margin-bottom: 14px; text-align: justify; }
.stats { display: flex; gap: 38px; margin-top: 18px; }
.stats b { display: block; font-size: 28px; color: var(--brand); }
.stats span { font-size: 13.5px; color: var(--gray); }
.adv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.adv { background: var(--bg-light); border: 1px solid #efeff2; border-radius: 10px; padding: 24px 18px; text-align: center; }
.adv .icon { font-size: 30px; line-height: 1; }
.adv h4 { font-size: 16px; margin: 10px 0 6px; }
.adv p { font-size: 13px; color: var(--gray); line-height: 1.6; }
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; list-style: none; }
.flow li { position: relative; background: var(--bg-light); border-radius: 10px; padding: 22px 16px 20px; text-align: center; }
.flow li::after { content: "›"; position: absolute; right: -12px; top: 50%; transform: translateY(-50%); color: #d5d5da; font-size: 20px; }
.flow li:last-child::after { content: none; }
.flow .num { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; font-weight: bold; margin-bottom: 10px; }
.flow h4 { font-size: 15px; margin-bottom: 4px; }
.flow p { font-size: 12.5px; color: var(--gray); line-height: 1.55; }
.dots { display: flex; justify-content: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.dot { border: 1px solid #e2e2e6; background: #fff; color: var(--gray); font-size: 13px; padding: 6px 16px; border-radius: 999px; cursor: pointer; transition: .2s; }
.dot:hover { border-color: var(--brand); color: var(--brand); }
.dot.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: bold; }

/* 新闻卡片 */
.news-card .thumb {
  height: 168px; display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, .92); font-size: 13px; letter-spacing: 2px;
  background-color: #c9736a;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .07) 0 12px, transparent 12px 24px);
  background-size: cover; background-position: center;
}
.news-card .body { padding: 16px 18px 20px; }
.news-date { font-size: 12.5px; color: var(--brand); letter-spacing: 1px; }
.news-card h3 { font-size: 16.5px; margin: 5px 0 7px; line-height: 1.5; }
.news-card .excerpt { font-size: 13px; color: var(--gray); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.more-link { display: inline-block; margin-top: 10px; font-size: 12.5px; color: var(--brand); }

/* 案例卡片 */
.case-card .cover {
  height: 224px; display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, .9); font-size: 13px; letter-spacing: 2px;
  background-color: #9aa7b1;
  background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .07) 0 14px, transparent 14px 28px);
  background-size: cover; background-position: center;
}
.case-card .meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 38px 18px 14px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); }
.case-card .meta h3 { font-size: 16.5px; margin-bottom: 2px; }
.case-card .meta span { font-size: 12.5px; opacity: .85; }

/* 联系我们 */
.contact-wrap { display: flex; gap: 46px; flex-wrap: wrap; align-items: flex-start; }
.contact-info { flex: 1; min-width: 280px; }
.contact-info li { list-style: none; margin-bottom: 14px; font-size: 15.5px; }
.contact-info b { color: var(--brand); margin-right: 8px; display: inline-block; min-width: 72px; }
.contact-info a { color: var(--brand); text-decoration: none; }
.qrcode-card { text-align: center; background: #fff; border-radius: var(--radius); padding: 22px 30px; box-shadow: var(--shadow); }
.qrcode-card img { width: 176px; height: 176px; margin: 0 auto; }
.qrcode-card p { font-size: 13.5px; color: var(--gray); margin-top: 10px; }
.form-card { flex: 1; min-width: 300px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 28px; }
.form-card h3 { font-size: 18px; margin-bottom: 16px; }
.form-row { display: flex; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 160px; }
input.field, textarea.field, select.field {
  width: 100%; border: 1px solid #e2e2e6; border-radius: 8px;
  padding: 10px 12px; font-size: 14px; font-family: inherit; color: var(--ink); outline: none;
}
input.field:focus, textarea.field:focus, select.field:focus { border-color: var(--brand); }
textarea.field { resize: vertical; min-height: 92px; }
.form-tip { font-size: 12.5px; color: #999; margin-top: 10px; }

/* 页脚 */
footer.site-footer { background: #1f1f1f; color: #bbb; text-align: center; padding: 26px 20px; font-size: 14px; }
footer.site-footer .icp-link { color: #bbb; text-decoration: none; }
footer.site-footer .icp-link:hover { color: #fff; }

/* 内页通用 */
.page-head { background: var(--bg-light); padding: 34px 0; border-bottom: 1px solid #eee; }
.breadcrumb { font-size: 13.5px; color: #888; }
.breadcrumb a { color: #888; text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span { margin: 0 6px; }
.detail-wrap { display: flex; gap: 44px; flex-wrap: wrap; padding: 46px 0 20px; }
.gallery { flex: 0 0 420px; max-width: 100%; }
.gallery .main-img { width: 100%; height: 360px; border-radius: var(--radius); background: #f4f4f6; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.gallery .thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery .thumbs img { width: 74px; height: 74px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.gallery .thumbs img.active { border-color: var(--brand); }
.detail-info { flex: 1; min-width: 300px; }
.detail-info h1 { font-size: 30px; line-height: 1.4; margin-bottom: 8px; }
.detail-info .subtitle { color: var(--gray); margin-bottom: 18px; }
.detail-meta { border-top: 1px solid #eee; padding-top: 18px; margin-bottom: 22px; }
.detail-meta p { font-size: 14.5px; color: var(--gray); margin-bottom: 8px; }
.detail-meta b { color: var(--ink); display: inline-block; min-width: 76px; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.richtext { font-size: 15.5px; line-height: 1.9; color: #333; }
.richtext p { margin-bottom: 14px; }
.richtext img { max-width: 100%; height: auto; border-radius: 8px; margin: 10px 0; }
.richtext h3 { font-size: 19px; margin: 28px 0 12px; padding-left: 10px; border-left: 4px solid #E60012; line-height: 1.4; }
.richtext ul { padding-left: 22px; margin-bottom: 14px; }
.richtext li { margin-bottom: 8px; }
.richtext table { width: 100%; border-collapse: collapse; margin: 14px 0 20px; font-size: 14px; }
.richtext th, .richtext td { border: 1px solid #e5e5e9; padding: 9px 12px; text-align: left; }
.richtext th { background: #fafafa; font-weight: 600; white-space: nowrap; }
.richtext .faq-q { font-weight: 600; color: #222; margin-bottom: 6px; }
.richtext .faq-a { margin-bottom: 16px; color: #555; }
.article { padding: 40px 0 50px; }
.article h1 { font-size: 30px; line-height: 1.45; margin-bottom: 12px; }
.article .article-meta { color: #999; font-size: 13.5px; padding-bottom: 18px; border-bottom: 1px solid #eee; margin-bottom: 26px; }
.article-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin-bottom: 24px; }
.related { padding: 20px 0 56px; }
.related h3 { font-size: 20px; margin-bottom: 18px; }

/* 列表页 */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.filter-bar a, .filter-bar button {
  text-decoration: none; border: 1px solid #e2e2e6; background: #fff; color: var(--gray);
  font-size: 14px; padding: 7px 18px; border-radius: 999px; cursor: pointer; font-family: inherit;
}
.filter-bar .active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: bold; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 36px; flex-wrap: wrap; }
.pager button { border: 1px solid #e2e2e6; background: #fff; color: var(--gray); padding: 7px 14px; border-radius: 8px; cursor: pointer; font-family: inherit; }
.pager button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager button[disabled] { opacity: .45; cursor: default; }
.empty { text-align: center; color: #aaa; padding: 60px 0; font-size: 15px; }

/* 提示 */
.toast {
  position: fixed; left: 50%; bottom: 80px; transform: translate(-50%, 12px);
  background: rgba(0, 0, 0, .85); color: #fff; font-size: 14px;
  padding: 11px 22px; border-radius: 999px; z-index: 999;
  opacity: 0; pointer-events: none; transition: .25s; max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.loading { text-align: center; color: #bbb; padding: 30px 0; font-size: 14px; }

/* 响应式 */
@media (max-width: 768px) {
  .nav ul { display: none; }
  .menu-btn { display: block; }
  .nav img.logo { height: 36px; }
  .nav .contact-quick { display: none; }
  .hero h1 { font-size: 25px; letter-spacing: 2px; }
  .hero { padding: 62px 16px 70px; }
  .hero p { font-size: 15px; }
  h2.section-title { font-size: 24px; }
  section { padding: 42px 0; }
  .nav-btn { display: none; }
  .slide-product { width: 74vw; }
  .slide-news, .slide-case { width: 82vw; }
  .about { flex-direction: column; gap: 24px; }
  .about img { width: 100%; flex: 0 0 auto; }
  .stats { gap: 24px; }
  .stats b { font-size: 24px; }
  .panel { padding: 22px 18px 24px; min-height: auto; }
  .adv-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .adv { padding: 18px 12px; }
  .flow { grid-template-columns: 1fr; gap: 10px; }
  .flow li { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; }
  .flow li::after { content: none; }
  .flow .num { margin-bottom: 0; flex: 0 0 28px; width: 28px; height: 28px; }
  .flow h4 { font-size: 14.5px; margin: 0 0 2px; }
  .flow li > div { flex: 1; }
  .dot { font-size: 12px; padding: 5px 12px; }
  .gallery { flex: 1 1 100%; }
  .gallery .main-img { height: 260px; }
  .detail-info h1 { font-size: 23px; }
  .article h1 { font-size: 23px; }
}
