/* ============================================================
   元宏纺织 YUANHONG TEXTILE — 全新官网样式
   架构：纯静态（Serverless 零运维可部署）
   品牌色：深青蓝 #1f5c7a / 古铜金 #c9a24b（克制点缀）
   说明：图片全部以内联 SVG / CSS 占位，不依赖任何外部图床
         —— 杜绝老站「厂商图床挂掉→图片全失」的故障
   ============================================================ */

:root {
  --blue: #1f5c7a;
  --blue-dark: #174860;
  --blue-deep: #0e3247;
  --yellow: #c9a24b;
  --ink: #1a2330;
  --gray: #5c6675;
  --gray-light: #f4f6f8;
  --line: #e4e8ec;
  --white: #ffffff;
  --maxw: 1200px;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(14,50,71,.08);
  --shadow-lg: 0 16px 48px rgba(14,50,71,.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部通告条 ---------- */
.topbar {
  background: var(--blue-deep);
  color: #cfe0ea;
  font-size: 13px;
  text-align: center;
  padding: 7px 20px;
}
.topbar a { color: var(--yellow); font-weight: 600; }

/* ---------- 导航 ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  display: grid; place-items: center; color: var(--yellow); font-weight: 900;
}
.brand .name { font-size: 18px; color: var(--blue-deep); letter-spacing: .5px; }
.brand .name small { display: block; font-size: 10px; color: var(--gray); font-weight: 600; letter-spacing: 2px; }
.brand-logo { height: 32px; width: auto; display: block; }
.brand .brand-name { font-size: 18px; font-weight: 800; color: var(--blue-deep); letter-spacing: .4px; white-space: nowrap; line-height: 1.1; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px; font-size: 15px; color: var(--ink);
  font-weight: 500; transition: .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--blue); background: var(--gray-light); }

.nav-right { display: flex; align-items: center; gap: 12px; }
.lang-switch { font-size: 14px; color: var(--gray); }
.lang-switch a { padding: 4px 8px; border-radius: 6px; }
.lang-switch a.active { color: var(--blue); font-weight: 700; background: var(--gray-light); }

.btn {
  display: inline-block; padding: 11px 22px; border-radius: 999px;
  font-weight: 700; font-size: 15px; transition: .2s; cursor: pointer; border: none;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.6); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.12); }
.btn-outline { background: #fff; color: var(--blue); border: 2px solid var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }

.menu-toggle { display: none; background: none; border: none; font-size: 26px; cursor: pointer; color: var(--blue-deep); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 100%);
  color: #fff; padding: 90px 0 100px;
}
.hero::after {
  content: ""; position: absolute; right: -10%; top: -20%;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(120,170,200,.14), transparent 70%);
}
.hero .container { position: relative; z-index: 1; }
.hero .eyebrow {
  display: inline-block; background: rgba(201,162,75,.16); color: var(--yellow);
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: 1px;
  margin-bottom: 18px;
}
.hero h1 { font-size: 44px; line-height: 1.2; font-weight: 800; margin-bottom: 18px; }
.hero h1 .hl { color: var(--yellow); }
.hero p.lead { font-size: 18px; max-width: 620px; color: #e6eef3; margin-bottom: 30px; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 56px; flex-wrap: wrap; }
.hero-stats .s { }
.hero-stats .s b { font-size: 34px; color: #fff; display: block; line-height: 1.1; }
.hero-stats .s span { font-size: 14px; color: #b8d0de; }

/* ---------- 通用区块 ---------- */
.section { padding: 80px 0; }
.section.alt { background: var(--gray-light); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 50px; }
.section-head .tag {
  color: var(--blue); font-weight: 700; letter-spacing: 2px; font-size: 13px; text-transform: uppercase;
}
.section-head h2 { font-size: 32px; margin: 10px 0 14px; color: var(--blue-deep); }
.section-head p { color: var(--gray); font-size: 16px; }

/* ---------- 产品分类卡片 ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: .25s; box-shadow: var(--shadow);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .thumb {
  aspect-ratio: 4/3; display: grid; place-items: center;
  background: linear-gradient(135deg, #edf1f4, #e0e6ec);
  color: var(--blue); font-weight: 700;
}
.card .body { padding: 18px 20px 22px; }
.card .body h3 { font-size: 18px; color: var(--blue-deep); margin-bottom: 6px; }
.card .body p { font-size: 14px; color: var(--gray); }
.card .body .more { display: inline-block; margin-top: 12px; color: var(--blue); font-weight: 700; font-size: 14px; }

/* ---------- 实力 / 数据条 ---------- */
.stats-band { background: var(--blue-deep); color: #fff; }
.stats-band .grid { gap: 0; }
.stats-band .stat { text-align: center; padding: 30px 10px; border-right: 1px solid rgba(255,255,255,.12); }
.stats-band .stat:last-child { border-right: none; }
.stats-band .stat b { font-size: 40px; color: var(--yellow); display: block; }
.stats-band .stat span { font-size: 14px; color: #cfe0ea; }

/* ---------- 特性列表 ---------- */
.feature { display: flex; gap: 16px; align-items: flex-start; padding: 18px; border-radius: 10px; }
.feature .ic {
  flex: 0 0 46px; height: 46px; border-radius: 10px; background: var(--gray-light);
  display: grid; place-items: center; color: var(--blue); font-size: 22px; font-weight: 800;
}
.feature h4 { font-size: 17px; color: var(--blue-deep); margin-bottom: 4px; }
.feature p { font-size: 14px; color: var(--gray); }

/* ---------- 证书墙 ---------- */
.cert {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 20px; text-align: center; box-shadow: var(--shadow); transition: .25s;
}
.cert:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.cert .badge {
  width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--blue), var(--blue-deep));
  display: grid; place-items: center; color: var(--yellow); font-size: 30px; font-weight: 900;
}
.cert h4 { font-size: 15px; color: var(--blue-deep); }
.cert span { font-size: 12px; color: var(--gray); }

/* ---------- 新闻 ---------- */
.news-item { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.news-item .date { flex: 0 0 64px; text-align: center; }
.news-item .date b { display: block; font-size: 22px; color: var(--blue); line-height: 1; }
.news-item .date span { font-size: 12px; color: var(--gray); }
.news-item h4 { font-size: 16px; color: var(--blue-deep); margin-bottom: 4px; }
.news-item p { font-size: 14px; color: var(--gray); }

/* ---------- CTA 横幅 ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff; text-align: center; padding: 60px 20px; border-radius: var(--radius);
}
.cta-band h2 { font-size: 30px; margin-bottom: 12px; }
.cta-band p { color: #e6eef3; margin-bottom: 26px; font-size: 17px; }

/* ---------- 页脚 ---------- */
.footer { background: var(--blue-deep); color: #cfe0ea; padding: 56px 0 24px; }
.footer .grid { align-items: start; }
.footer h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer a { color: #cfe0ea; font-size: 14px; line-height: 2; }
.footer a:hover { color: var(--yellow); }
.footer .contact p { font-size: 14px; margin-bottom: 8px; }
.footer .brand .name { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.14); margin-top: 36px; padding-top: 18px;
  font-size: 13px; color: #9fc0d2; text-align: center;
}

/* ---------- 表单 ---------- */
.form-wrap { max-width: 640px; margin: 0 auto; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--blue-deep); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; font-family: inherit; transition: .2s; background: #fbfdff;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,92,122,.15);
}
.field textarea { min-height: 120px; resize: vertical; }
.form-note { font-size: 13px; color: var(--gray); margin-top: 6px; }
.form-ok { display: none; background: #e7f7ee; color: #1a7f4b; padding: 14px 16px;
  border-radius: 8px; margin-bottom: 16px; font-weight: 600; }
.form-err { display: none; background: #fdecec; color: #c0392b; padding: 14px 16px;
  border-radius: 8px; margin-bottom: 16px; font-weight: 600; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.info-card { background: var(--gray-light); border-radius: var(--radius); padding: 26px; }
.info-card .row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.info-card .row:last-child { border-bottom: none; }
.info-card .row .ic { color: var(--blue); font-size: 20px; }
.info-card .row b { display: block; font-size: 14px; color: var(--blue-deep); }
.info-card .row span { font-size: 14px; color: var(--gray); }

/* ---------- 面包屑 / 内页头 ---------- */
.page-hero { background: linear-gradient(135deg, var(--blue-deep), var(--blue)); color: #fff; padding: 56px 0; }
.page-hero h1 { font-size: 34px; margin-bottom: 8px; }
.page-hero p { color: #d6e6ee; }

/* ---------- 返回顶部 ---------- */
.totop {
  position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 22px;
  box-shadow: var(--shadow-lg); cursor: pointer; opacity: 0; pointer-events: none; transition: .3s; z-index: 90;
}
.totop.show { opacity: 1; pointer-events: auto; }

/* ---------- 产品筛选 chips ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; justify-content: center; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--gray); padding: 8px 18px; border-radius: 999px; font-size: 14px; cursor: pointer; transition: .2s; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ---------- 产品卡片图片 / meta ---------- */
.card .body img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; margin-bottom: 12px; }
.card .body .meta { font-size: 13px; color: var(--blue); margin: 4px 0 8px; font-weight: 600; }
.card .body .thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.card .body .thumbs img { width: 56px; height: 56px; aspect-ratio: auto; object-fit: cover; border-radius: 6px; margin-bottom: 0; border: 1px solid var(--line); }

/* ---------- 工厂页图片画廊（首图满宽 + 后图并排） ---------- */
.factory-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.factory-gallery img {
  width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 8px; display: block;
}
.factory-gallery img:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }

/* ---------- 证书图片 ---------- */
.cert img {
  display: block; width: auto; max-width: 170px; max-height: 118px;
  object-fit: contain; margin: 0 auto 12px;
}

/* ---------- 厂区实景轮播 ---------- */
.carousel {
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); background: var(--gray-light); aspect-ratio: 21 / 9;
}
.carousel:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.carousel .slides { position: absolute; inset: 0; }
.carousel .slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity .8s ease, visibility .8s;
}
.carousel .slide.is-active { opacity: 1; visibility: visible; }
.carousel .slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.01); }
.carousel .slide.is-active img { transform: scale(1.07); transition: transform 8s linear; }
.carousel .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 72px 96px 18px 22px;
  background: linear-gradient(to top,
    rgba(9,36,53,.93) 0%, rgba(9,36,53,.78) 34%, rgba(9,36,53,.30) 66%, rgba(9,36,53,0) 100%);
  color: #fff;
}
.carousel .cap b { display: block; font-size: 17px; font-weight: 700; letter-spacing: .02em; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.carousel .cap small { display: block; margin-top: 3px; font-size: 12.5px; color: #e0c98f; letter-spacing: .05em; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.carousel .nav-btn {
  position: absolute; top: 50%; margin-top: -19px; width: 38px; height: 38px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(255,255,255,.86); color: var(--blue-deep);
  font-size: 15px; line-height: 1; cursor: pointer; transition: .25s;
  display: flex; align-items: center; justify-content: center;
}
.carousel .nav-btn:hover { background: var(--blue); color: #fff; }
.carousel .nav-btn.prev { left: 14px; }
.carousel .nav-btn.next { right: 14px; }
.carousel .dots { position: absolute; right: 18px; bottom: 20px; display: flex; gap: 7px; }
.carousel .dot {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px;
  background: rgba(255,255,255,.5); cursor: pointer; transition: .25s;
}
.carousel .dot:hover { background: rgba(255,255,255,.85); }
.carousel .dot.is-active { width: 22px; background: var(--yellow); }
@media (hover: hover) {
  .carousel .nav-btn { opacity: 0; }
  .carousel:hover .nav-btn, .carousel:focus-within .nav-btn { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .carousel .slide { transition: none; }
  .carousel .slide img, .carousel .slide.is-active img { transform: none; transition: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .carousel { aspect-ratio: 16 / 9; }
}
@media (max-width: 940px) {
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0; background: #fff;
    flex-direction: column; align-items: stretch; padding: 10px 20px 18px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .menu-toggle { display: block; }
  .nav-right .btn-primary { display: none; }
}
@media (max-width: 720px) {
  .brand .brand-name { font-size: 15px; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 60px 0 70px; }
  .hero h1 { font-size: 28px; }
  .hero-stats { gap: 24px; }
  .section { padding: 56px 0; }
  .section-head h2 { font-size: 26px; }
  .carousel { aspect-ratio: 4 / 3; }
}
@media (max-width: 440px) {
  .brand { gap: 7px; }
  .brand-logo { height: 28px; }
  .brand .brand-name { font-size: 13px; }
  .lang-switch { font-size: 13px; }
}
@media (max-width: 360px) {
  .brand .brand-name { display: none; }
}
