/* Jiangsu Xingrong — visual language taken from the Avada palette
   (awb-color-4 #6094e1, awb-color-5 #be1e2d, custom-1 #1b2673, awb-color-2 #f5f7fe). */

:root {
  --red: #be1e2d;
  --red-dark: #9a1824;
  --blue: #6094e1;
  --navy: #1b2673;
  --ice: #f5f7fe;
  --line: #d4d8e9;
  --ink: #363636;
  --ink-2: #282828;
  --ink-3: #141414;
  --muted: #5c6370;
  --white: #ffffff;
  --max: 1140px;
  --header-h: 86px;
  --topbar-h: 38px;
  --radius: 2px;
  --shadow: 0 10px 24px rgba(27, 38, 115, 0.08);
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--red); }
.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

/* Top utility bar */
.topbar {
  background: var(--navy);
  color: #e8ecf8;
  font-size: 13px;
  min-height: var(--topbar-h);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--topbar-h);
  flex-wrap: wrap;
  padding: 6px 0;
}
.topbar a { color: #e8ecf8; }
.topbar a:hover { color: #fff; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topbar .sep { opacity: 0.45; }
.lang-switch { display: inline-flex; border: 1px solid rgba(255,255,255,0.35); border-radius: 2px; overflow: hidden; }
.lang-switch button {
  background: transparent;
  color: #e8ecf8;
  border: 0;
  padding: 2px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.lang-switch button[aria-pressed="true"] { background: var(--red); color: #fff; }

/* Header / Avada-like nav */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 900;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-3);
  flex-shrink: 0;
}
.brand:hover { color: var(--ink-3); }
.brand img { width: 54px; height: 54px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text .cn { font-size: 15px; font-weight: 700; color: var(--ink-3); }
.brand-text .en { font-size: 11px; color: var(--muted); letter-spacing: 0.02em; max-width: 280px; }

.nav-toggle {
  display: none;
  background: #fff;
  border: 1px solid var(--line);
  width: 44px;
  height: 40px;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink-3); margin: 6px 8px; }

.main-nav { display: flex; align-items: center; gap: 0; }
.main-nav > ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a,
.main-nav > ul > li > button.nav-parent {
  display: block;
  padding: 10px 13px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li:hover > a,
.main-nav > ul > li:hover > button.nav-parent,
.main-nav > ul > li.active > a,
.main-nav > ul > li.active > button.nav-parent {
  color: var(--red);
  border-bottom-color: var(--red);
}
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 8px 0;
  z-index: 20;
}
.main-nav li:hover > .dropdown,
.main-nav li:focus-within > .dropdown { display: block; }
.dropdown a {
  display: block;
  padding: 9px 16px;
  color: var(--ink);
  font-size: 14px;
}
.dropdown a:hover, .dropdown a.active { background: var(--ice); color: var(--red); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--red);
  color: #fff !important;
  border: 2px solid var(--red);
  padding: 11px 22px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.03em;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff !important; }
.btn-ghost {
  background: transparent;
  color: #fff !important;
  border-color: #fff;
}
.btn-ghost:hover { background: #fff; color: var(--navy) !important; border-color: #fff; }
.btn-navy { background: var(--navy); border-color: var(--navy); }
.btn-navy:hover { background: #151c57; border-color: #151c57; }
.header-cta { margin-left: 12px; padding: 9px 16px; }

/* Hero carousel */
.hero {
  position: relative;
  background: var(--ink-3);
  color: #fff;
  overflow: hidden;
  min-height: 520px;
  height: 62vh;
  max-height: 680px;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  background: #1a1a1a center / cover no-repeat;
}
.hero-slide.is-on { opacity: 1; z-index: 1; }
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20,20,20,0.72) 0%, rgba(20,20,20,0.42) 48%, rgba(20,20,20,0.28) 100%);
}
.hero-copy {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0;
  max-width: 720px;
}
.hero-kicker {
  color: #f0c9cd;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 12px;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.2;
  margin: 0 0 16px;
  font-weight: 700;
  color: #fff;
}
.hero p { margin: 0 0 28px; font-size: 17px; color: #e8e8e8; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-nav {
  position: absolute;
  z-index: 3;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.hero-nav button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.hero-nav button.is-on { background: var(--red); border-color: var(--red); }
.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}
.hero-arrow.prev { left: 12px; }
.hero-arrow.next { right: 12px; }
.hero-arrow:hover { background: var(--red); }

/* Page hero (inner pages) */
.page-hero {
  background: var(--navy) url("../img/heroes/hero-factory.jpg") center / cover no-repeat;
  color: #fff;
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: center;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(27, 38, 115, 0.78);
}
.page-hero .wrap { position: relative; z-index: 1; padding: 48px 0; }
.page-hero h1 { margin: 0 0 8px; font-size: clamp(26px, 3.2vw, 36px); color: #fff; }
.page-hero p { margin: 0; color: #dce1f5; max-width: 680px; }
.crumbs { font-size: 13px; color: #c9d0ef; margin-bottom: 10px; }
.crumbs a { color: #fff; }
.crumbs span { opacity: 0.7; }

/* Sections */
section { padding: 72px 0; }
.section-ice { background: var(--ice); }
.section-navy { background: var(--navy); color: #fff; }
.section-navy h2, .section-navy p { color: #fff; }
.eyebrow {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  margin: 0 0 12px;
  color: var(--ink-3);
  line-height: 1.3;
}
h2 + .lead, .lead { color: var(--muted); margin: 0 0 32px; max-width: 720px; }
.underline { width: 56px; height: 3px; background: var(--red); margin: 0 0 28px; }

/* Product cards — Avada image-hover feel */
.card-grid, .case-grid, .cert-grid, .gallery-grid {
  display: grid;
  gap: 22px;
}
.card-grid { grid-template-columns: repeat(3, 1fr); }
.case-grid { grid-template-columns: repeat(4, 1fr); }
.cert-grid { grid-template-columns: repeat(4, 1fr); }
.gallery-grid { grid-template-columns: repeat(4, 1fr); }

.prod-card, .case-card, .cert-card, .gal-item {
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.prod-card:hover, .case-card:hover, .cert-card:hover, .gal-item:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eceff7;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.prod-card:hover .thumb img, .gal-item:hover .thumb img, .case-card:hover .thumb img, .cert-card:hover .thumb img {
  transform: scale(1.06);
}
.thumb .zoom {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(27, 38, 115, 0.0);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease;
  cursor: zoom-in;
}
.prod-card:hover .thumb .zoom, .gal-item:hover .thumb .zoom,
.case-card:hover .thumb .zoom, .cert-card:hover .thumb .zoom {
  opacity: 1;
  background: rgba(27, 38, 115, 0.38);
}
.prod-card .body, .cert-card .body { padding: 16px 18px 20px; }
.prod-card h3 { margin: 0 0 8px; font-size: 18px; color: var(--ink-3); }
.prod-card p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.more { color: var(--red); font-weight: 700; font-size: 13px; letter-spacing: 0.04em; }
.case-card .cap, .cert-card .cap, .gal-item .cap {
  padding: 10px 12px 12px;
  font-size: 13px;
  color: var(--ink-2);
}
.names-list { columns: 2; gap: 32px; margin: 0; padding-left: 18px; color: var(--ink); }
.names-list li { margin: 0 0 8px; break-inside: avoid; }

/* About split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split .text p { margin: 0 0 14px; }
.fact-list { list-style: none; padding: 0; margin: 18px 0 0; }
.fact-list li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.fact-list strong { color: var(--navy); min-width: 140px; flex-shrink: 0; }

/* Tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); background: #fff; }
table.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 920px;
}
table.spec th, table.spec td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: right;
  white-space: nowrap;
}
table.spec th:first-child, table.spec td:first-child { text-align: left; position: sticky; left: 0; background: #fff; font-weight: 600; }
table.spec thead th { background: var(--navy); color: #fff; font-weight: 600; }
table.spec thead th:first-child { background: var(--navy); color: #fff; }
table.spec tbody tr:nth-child(even) td { background: var(--ice); }
table.spec tbody tr:nth-child(even) td:first-child { background: var(--ice); }
table.spec .row-group td { background: #e9edf8 !important; color: var(--navy); font-weight: 700; text-align: left; }
.notes { font-size: 13px; color: var(--muted); max-width: 900px; }
.notes ol { padding-left: 18px; }
.dim-table { min-width: 420px !important; }

/* Inquiry / contact */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; }
.contact-card { background: #fff; border: 1px solid var(--line); padding: 24px; }
.contact-card h3 { margin: 0 0 12px; }
.contact-card p, .contact-card li { margin: 0 0 8px; }
.form {
  background: #fff;
  border: 1px solid var(--line);
  padding: 24px;
}
.form label { display: block; font-weight: 600; font-size: 14px; margin: 0 0 6px; }
.form .field { margin: 0 0 16px; }
.form input, .form select, .form textarea {
  width: 100%;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border-radius: var(--radius);
}
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 2px solid rgba(96, 148, 225, 0.45);
  border-color: var(--blue);
}
.form-note {
  background: #fff6e8;
  border: 1px solid #e7c98a;
  color: #6a4b12;
  padding: 10px 12px;
  font-size: 13px;
  margin: 0 0 16px;
}
.antispam {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--ice);
  border: 1px solid var(--line);
  padding: 12px;
  font-size: 14px;
}
.antispam input { width: auto; margin-top: 4px; }
.math-row { display: flex; align-items: center; gap: 10px; }
.math-row input { max-width: 100px; }
.form-ok {
  display: none;
  background: #e8f6ec;
  border: 1px solid #9dcea8;
  color: #1c5a2c;
  padding: 12px;
  margin-top: 12px;
}
.form-ok.show { display: block; }
.form-err {
  display: none;
  background: #fdecee;
  border: 1px solid #e7a3ab;
  color: #8a1c28;
  padding: 12px;
  margin-top: 12px;
}
.form-err.show { display: block; }

/* CTA band */
.cta-band { text-align: left; }
.cta-band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 8px; }
.cta-band p { margin: 0; color: #dce1f5; }

/* Footer */
.site-footer { background: var(--ink-3); color: #c8c8c8; padding: 48px 0 0; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 36px; }
.site-footer h3 { color: #fff; font-size: 15px; margin: 0 0 12px; }
.site-footer a { color: #d4d8e9; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 8px; }
.legal {
  border-top: 1px solid #2a2a2a;
  padding: 14px 0 20px;
  font-size: 12px;
  color: #8a8a8a;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,16,0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1200px, 96vw); max-height: 88vh; object-fit: contain; box-shadow: 0 8px 40px #000; cursor: default; }
.lightbox .lb-cap {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  text-align: center;
  max-width: 90vw;
}
.lightbox .lb-close, .lightbox .lb-prev, .lightbox .lb-next {
  position: absolute;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 28px;
  width: 44px;
  height: 44px;
}
.lightbox .lb-close { top: 16px; right: 16px; font-size: 32px; }
.lightbox .lb-prev { left: 12px; top: 50%; }
.lightbox .lb-next { right: 12px; top: 50%; }
.lightbox button:hover { background: var(--red); }

/* Type chips */
.type-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.type-list li {
  background: var(--ice);
  border: 1px solid var(--line);
  padding: 6px 10px;
  font-size: 13px;
  color: var(--ink-2);
}

.blank-note {
  background: #f4f6fb;
  border-left: 3px solid var(--blue);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 24px;
}

/* Responsive */
@media (max-width: 1020px) {
  .card-grid, .gallery-grid, .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .names-list { columns: 1; }
  .header-cta { display: none; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 8px 16px 16px;
  }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; align-items: stretch; }
  .main-nav > ul > li > a, .main-nav > ul > li > button.nav-parent { border-bottom: 0; width: 100%; text-align: left; }
  .dropdown { position: static; display: none; box-shadow: none; border: 0; padding-left: 8px; }
  .main-nav li.open > .dropdown, .main-nav li:focus-within > .dropdown { display: block; }
  .hero { height: 70vh; min-height: 440px; }
  .brand-text .en { display: none; }
}
@media (max-width: 640px) {
  .card-grid, .gallery-grid, .cert-grid, .case-grid { grid-template-columns: 1fr; }
  .topbar-left { display: none; }
  section { padding: 48px 0; }
}

/* Go-live additions */
.sub-block { margin-top: 40px; }
.section-h { margin-top: 8px; }
img[width][height] { height: auto; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }



/* Floating contact icons */
.contact-dock {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 850;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dock-btn {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  color: #fff;
  border: 0;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}
.dock-btn svg { width: 26px; height: 26px; display: block; }
.dock-btn:hover { color: #fff; filter: brightness(1.08); }
.dock-wa { background: #25d366; }
.dock-wx { background: #07c160; }
.dock-mail { background: var(--navy); }
.dock-tip {
  position: absolute;
  right: calc(100% + 10px);
  background: var(--ink-3);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  padding: 7px 9px;
  border-radius: 3px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(6px);
  transition: opacity .15s ease, transform .15s ease;
}
.dock-btn:hover .dock-tip,
.dock-btn:focus-visible .dock-tip { opacity: 1; transform: none; }

.contact-icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 18px;
}
.contact-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 24px;
  padding: 8px 14px 8px 10px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.contact-icon-btn svg { width: 20px; height: 20px; }
.contact-icon-btn:hover { color: #fff; filter: brightness(1.08); }
.wechat-qr-open {
  display: block;
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px;
  cursor: pointer;
  max-width: 280px;
}
.wechat-qr-open img { width: 100%; height: auto; display: block; }

.wechat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 18, 32, 0.62);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.wechat-overlay[hidden] { display: none; }
.wechat-panel {
  position: relative;
  background: #fff;
  color: var(--ink);
  width: min(420px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 28px 24px 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,.25);
  text-align: center;
}
.wechat-panel h3 { margin: 0 0 8px; font-size: 20px; color: var(--navy); }
.wechat-panel p { margin: 0 0 14px; }
.wechat-panel .wechat-qr { width: min(320px, 100%); height: auto; margin: 0 auto 12px; display: block; }
.wechat-id { font-size: 16px; }
.wechat-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}
@media (max-width: 640px) {
  .contact-dock { right: 12px; bottom: 16px; }
  .dock-btn { width: 48px; height: 48px; }
  .dock-tip { display: none; }
}
