:root {
  --primary: #0056b3;
  --primary-dark: #003d80;
  --accent: #f2a900;
  --dark: #0e2237;
  --text: #263445;
  --muted: #5f6f80;
  --bg: #f5f7fa;
  --line: #e2e8f0;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 8px 24px rgba(14, 34, 55, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
img { max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(14, 34, 55, 0.05);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}
.logo { display: flex; flex-direction: column; line-height: 1.15; }
.logo img { display: block; }
.logo-tag { font-size: 11px; color: var(--muted); margin-top: 2px; }
.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  font-size: 14px;
}
.main-nav a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text);
  font-weight: 500;
}
.main-nav a:hover { background: #eef4fb; text-decoration: none; color: var(--primary); }
.main-nav a.active { background: var(--primary); color: #fff; }
.dropdown { position: relative; }
.dropbtn {
  background: none;
  border: 0;
  font: inherit;
  color: var(--text);
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.dropbtn:hover, .dropbtn.active { background: var(--primary); color: #fff; }
.caret { font-size: 11px; }
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 420px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(14, 34, 55, 0.16);
  padding: 10px;
  grid-template-columns: 1fr 1fr;
  gap: 2px 14px;
  z-index: 80;
}
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content { display: grid; }
.dropdown-content a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.dropdown-content a:hover { background: #eef4fb; color: var(--primary); text-decoration: none; }
.dropdown-content a.active { background: var(--primary); color: #fff; }
.lang-switch { display: flex; gap: 4px; }
.lang-switch a {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.lang-switch a.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(135deg, #0e2237 0%, #0056b3 70%, #0b6fd4 100%);
  color: #fff;
  border-radius: 16px;
  padding: 54px 40px;
  margin: 28px 0 36px;
  position: relative;
  overflow: hidden;
  min-height: 340px;
}
.hero-slider { position: absolute; inset: 0; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(14,34,55,0.82) 0%, rgba(14,34,55,0.45) 55%, rgba(14,34,55,0.05) 100%);
  z-index: 1;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.hero-slide.active { opacity: 1; }
.hero-box { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(26px, 4vw, 40px); margin: 0 0 12px; line-height: 1.2; }
.hero-lead { font-size: 17px; max-width: 760px; opacity: 0.92; }
.hero-cta { margin-top: 22px; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #20242a;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  font-size: 15px;
}
.btn:hover { background: #ffbe2e; text-decoration: none; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ---------- cards ---------- */
.cat-grid-home, .cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.cat-card, .product-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: block;
  color: var(--text);
}
.cat-card:hover, .product-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(14, 34, 55, 0.14); text-decoration: none; }
.cat-card img, .card-media img { width: 100%; height: 190px; object-fit: cover; display: block; }
.cat-card h3 { margin: 14px 16px 6px; font-size: 16px; color: var(--dark); }
.cat-card p { margin: 0 16px 16px; font-size: 13px; color: var(--muted); }
.cat-desc { font-size: 13px; color: var(--muted); margin: 4px 16px 14px; line-height: 1.5; }
.card-body { padding: 14px 16px 16px; }
.card-body h3 { margin: 0 0 6px; font-size: 15px; line-height: 1.35; }
.card-body p { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.card-body { display: flex; flex-direction: column; }
.card-body .btn { margin-top: auto; align-self: flex-start; }

section h2 {
  color: var(--dark);
  font-size: 24px;
  margin: 42px 0 18px;
}
.home-cats h2, .home-featured h2 { margin-top: 30px; }

/* ---------- breadcrumb ---------- */
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 4px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb span { color: var(--text); }

.pagination { text-align: center; margin: 24px 0; }
.pagination a, .pagination span {
  display: inline-block;
  min-width: 34px;
  padding: 7px 10px;
  margin: 0 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--primary);
  font-size: 13px;
}
.pagination span { background: var(--primary); color: #fff; border-color: var(--primary); }

.left-cp .box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 18px;
}
.left-cp .box h3 { margin: 0 0 10px; font-size: 16px; color: var(--dark); }
.side-link { display: block; padding: 7px 10px; border-radius: 6px; font-size: 14px; color: var(--text); }
.side-link:hover { background: #eef4fb; text-decoration: none; color: var(--primary); }
.side-link.active { background: var(--primary); color: #fff; }
.contact-line { margin-top: 18px; font-weight: 600; color: var(--primary); }

/* 联系页二维码 */
.qr-row { display: flex; flex-wrap: wrap; gap: 24px; margin: 12px 0; }
.qr-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}
.qr-item img { display: block; margin: 0 auto 8px; border-radius: 6px; }
.qr-item p { margin: 0; font-size: 13px; color: var(--text); font-weight: 600; }

/* 右侧浮动客服 */
.sideBar { --ztcolor: #0056b3; }
.sideBar .icon { fill: #ffffff; }
.sideBar .side i { background: #0056b3; }
.sideBar .side span { background: #0e2237; }
.sideBar .side1 { background: #0e2237; }
.sideBar .side1:hover { background: #0056b3; }
.side i { line-height: 50px; }
.side i svg { vertical-align: middle; }

/* ---------- category page ---------- */
.cat-hero {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 30px;
  margin: 14px 0 30px;
  box-shadow: var(--shadow);
}
.cat-hero h1 { margin: 0 0 8px; color: var(--dark); font-size: 28px; }
.cat-tag { font-size: 15px; color: var(--primary); font-weight: 600; margin: 0 0 14px; }
.cat-hero p { margin: 8px 0; }

/* ---------- product page ---------- */
.product-page { padding-bottom: 30px; }
.product-top {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 1.2fr;
  gap: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-top: 10px;
}
.product-info h1 { font-size: 25px; margin: 4px 0 10px; color: var(--dark); line-height: 1.25; }
.product-cat a { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.product-tag { font-size: 15px; color: var(--muted); }
.rating-line { display: flex; gap: 10px; align-items: center; margin: 10px 0 14px; font-size: 14px; }
.stars { color: var(--accent); font-size: 17px; letter-spacing: 2px; }
.product-features { margin: 0 0 18px; padding-left: 20px; }
.product-features li { margin-bottom: 6px; font-size: 14px; }
.gallery-main { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.gallery-main img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; display: block; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumbs img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border: 2px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}
.gallery-thumbs img:hover { border-color: var(--primary); }

.product-description, .specs, .videos, .faq, .comments {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 28px;
  box-shadow: var(--shadow);
  margin-top: 24px;
}
.product-description h2, .specs h2, .videos h2, .faq h2, .comments h2 { margin-top: 0; }
.product-description p { font-size: 15px; }

.table-wrap { overflow-x: auto; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table th, .spec-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.spec-table th { background: #eef4fb; color: var(--dark); width: 34%; font-weight: 600; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.video-item iframe { border: 1px solid var(--line); border-radius: 10px; }

.faq-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 10px;
  background: #fbfcfe;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 16px;
  color: var(--dark);
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:before { content: "▸ "; color: var(--primary); }
.faq-item[open] summary:before { content: "▾ "; }
.faq-item p { margin: 0; padding: 0 16px 14px; font-size: 14px; color: var(--muted); }

/* ---------- comments ---------- */
.comments-sub { color: var(--muted); font-size: 14px; }
.comments-list { margin: 16px 0; }
.comment-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #fbfcfe;
}
.comment-item .comment-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.comment-item .comment-author { font-weight: 700; color: var(--dark); }
.comment-item .comment-date { color: var(--muted); }
.comment-item .comment-stars { color: var(--accent); }
.comment-item p { margin: 6px 0 0; font-size: 14px; }
.comments-empty { color: var(--muted); font-style: italic; }
.comment-form { background: #f3f7fb; border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.comment-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.comment-form input, .comment-form select, .comment-form textarea {
  width: 100%;
  margin-top: 5px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  background: #fff;
}
.form-note { font-weight: 600; color: #1d7a3a; }
.comments-demo { font-size: 12px; color: var(--muted); margin-top: 14px; font-style: italic; }

/* ---------- static ---------- */
.static-page {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px;
  box-shadow: var(--shadow);
  margin-top: 12px;
}
.static-page h1 { color: var(--dark); margin-top: 0; }
.static-page p { font-size: 15px; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--dark);
  color: #c9d5e2;
  margin-top: 50px;
  padding: 40px 0 18px;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.site-footer h3 { color: #fff; font-size: 16px; margin: 0 0 12px; }
.site-footer p { font-size: 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { color: #c9d5e2; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 30px; padding-top: 16px; }
.footer-bottom p { font-size: 13px; margin: 0; color: #8fa3b8; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .product-top { grid-template-columns: 1fr; }
  .header-inner { justify-content: center; }
  .main-nav { justify-content: center; }
  .dropdown-content {
    position: static;
    min-width: 0;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    box-shadow: none;
    border: 1px solid var(--line);
  }
}
@media (max-width: 640px) {
  .hero { padding: 34px 22px; }
  .cat-grid-home, .cat-grid { grid-template-columns: 1fr 1fr; }
  .product-description, .specs, .videos, .faq, .comments { padding: 20px 18px; }
}
@media (max-width: 460px) {
  .cat-grid-home, .cat-grid { grid-template-columns: 1fr; }
}
