:root {
  --primary: #0d3b75;
  --primary-dark: #092a54;
  --primary-light: #e8f0fb;
  --accent: #f26a21;
  --accent-dark: #d95814;
  --text: #2b3440;
  --text-muted: #6b7685;
  --bg: #f6f8fb;
  --white: #ffffff;
  --border: #e3e9f1;
  --shadow-sm: 0 2px 8px rgba(13, 59, 117, 0.08);
  --shadow-md: 0 8px 24px rgba(13, 59, 117, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4, h5 { margin: 0 0 0.5em; line-height: 1.25; }
p { margin: 0 0 1em; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--primary-dark);
  color: #cdd9ea;
  font-size: 13px;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
}
.topbar a { color: #cdd9ea; }
.topbar a:hover { color: #fff; }
.topbar-phone { display: inline-flex; align-items: center; gap: 6px; }
.lang-switch { display: flex; gap: 4px; align-items: center; }
.lang-switch button {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 14px;
  padding: 2px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.lang-switch button.active { background: var(--accent); border-color: var(--accent); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  box-shadow: 0 1px 0 var(--border), 0 4px 16px rgba(13,59,117,0.06);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 46px; width: auto; }
.logo-text { font-size: 18px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.logo-text small { display: block; font-size: 11px; font-weight: 400; color: var(--text-muted); }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a {
  display: block;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text);
}
.main-nav a:hover, .main-nav a.active { color: var(--accent); background: #fff3ec; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 18px;
  cursor: pointer;
  color: var(--primary);
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: #0a2447; }
.hero-slide { position: relative; display: none; }
.hero-slide.active { display: block; }
.hero-slide img { width: 100%; height: 460px; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(6,20,44,0.75) 0%, rgba(6,20,44,0.25) 60%, transparent 100%);
  display: flex; align-items: center;
}
.hero-overlay .container { width: 100%; }
.hero-title { color: #fff; font-size: 40px; max-width: 620px; margin-bottom: 12px; }
.hero-sub { color: #dbe6f5; font-size: 17px; max-width: 520px; margin-bottom: 24px; }
.hero-cta { display: inline-block; background: var(--accent); color: #fff; padding: 12px 28px; border-radius: 999px; font-weight: 600; }
.hero-cta:hover { background: var(--accent-dark); color: #fff; }
.hero-dots { position: absolute; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: none; background: rgba(255,255,255,0.5); cursor: pointer; }
.hero-dots button.active { background: var(--accent); width: 26px; border-radius: 6px; }

/* ---------- Section ---------- */
.section { padding: 64px 0; }
.section.bg { background: var(--bg); }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: 30px; color: var(--primary); }
.section-head span {
  display: inline-block; width: 56px; height: 4px; border-radius: 4px;
  background: var(--accent); margin: 10px auto 12px;
}
.section-head p { color: var(--text-muted); margin: 0; }

/* ---------- Product cards ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.product-card .thumb { display: block; position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #f1f4f8; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.4s ease; }
.product-card:hover .thumb img { transform: scale(1.06); }
.product-card .body { padding: 14px 16px 16px; }
.product-card h3 { font-size: 15px; margin: 0 0 8px; }
.product-card h3 a { color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.product-card h3 a:hover { color: var(--accent); }
.product-card .cat-tag { font-size: 12px; color: var(--text-muted); }
.product-card .price { color: var(--accent); font-weight: 700; font-size: 15px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 10px 22px; border-radius: 999px;
  font-weight: 600; font-size: 14px; border: none; cursor: pointer;
  font-family: inherit; transition: all 0.2s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.6); }
.btn-ghost:hover { background: #fff; color: var(--primary); }

/* ---------- Catalogue cards ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cat-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); background: var(--white); border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.cat-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; padding: 28px 32px; box-sizing: border-box; }
.cat-card .cat-name {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(6,20,44,0.85));
  color: #fff; padding: 28px 16px 12px; font-weight: 700; font-size: 15px;
}

/* ---------- About band ---------- */
.about-band {
  background: linear-gradient(120deg, #092a54 0%, #0d3b75 55%, #14508f 100%);
  color: #e6eef9; padding: 70px 0;
}
.about-band .container { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.about-band h2 { color: #fff; font-size: 28px; }
.about-band p { color: #cdd9ea; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); border-radius: var(--radius); padding: 18px; text-align: center; }
.stat b { display: block; font-size: 28px; color: #ffb27a; }
.stat span { font-size: 13px; color: #cdd9ea; }

/* ---------- News ---------- */
.news-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.news-item {
  display: flex; gap: 16px; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm); transition: box-shadow 0.25s ease;
}
.news-item:hover { box-shadow: var(--shadow-md); }
.news-date {
  flex: 0 0 auto; text-align: center; background: var(--primary-light);
  border-radius: var(--radius-sm); padding: 8px 14px; color: var(--primary);
  min-width: 64px;
}
.news-date b { display: block; font-size: 22px; line-height: 1.1; }
.news-date span { font-size: 12px; }
.news-item h3 { font-size: 15px; margin: 0 0 6px; }
.news-item p { font-size: 13px; color: var(--text-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Page banner ---------- */
.page-banner {
  background: linear-gradient(120deg, #092a54, #14508f);
  color: #fff; padding: 54px 0; text-align: center;
}
.page-banner h1 { font-size: 32px; margin: 0 0 6px; }
.page-banner p { color: #cdd9ea; margin: 0; }
.breadcrumb { font-size: 13px; color: #9fb3cc; margin-bottom: 6px; }
.breadcrumb a { color: #9fb3cc; }
.breadcrumb a:hover { color: #fff; }

/* ---------- Layout ---------- */
.page-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 32px; padding: 40px 0 64px; align-items: start; }
.sidebar { position: sticky; top: 96px; }
.card-box { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.card-box h3 { font-size: 15px; color: var(--primary); padding-bottom: 10px; border-bottom: 2px solid var(--primary-light); }
.cat-tree ul { list-style: none; margin: 0; padding: 0; }
.cat-tree li { margin: 2px 0; }
.cat-tree a { display: block; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text); font-size: 14px; }
.cat-tree a:hover { background: var(--primary-light); color: var(--primary); }
.cat-tree a.active { background: var(--primary); color: #fff; }
.cat-tree .sub { padding-left: 16px; }
.cat-tree .sub a { padding: 6px 10px; font-size: 13px; color: var(--text-muted); }
.cat-tree .sub a.active { background: #e9f1fd; color: var(--primary); }

.search-box { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--white); }
.search-box input { flex: 1; border: none; outline: none; padding: 10px 16px; font-family: inherit; font-size: 14px; }
.search-box button { border: none; background: var(--primary); color: #fff; padding: 0 18px; cursor: pointer; font-size: 15px; }

.contact-mini p { margin: 6px 0; font-size: 13px; }
.contact-mini b { color: var(--primary); }

/* ---------- Products toolbar ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.toolbar .result { color: var(--text-muted); font-size: 14px; }
.sort-select { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; background: var(--white); }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 36px; flex-wrap: wrap; }
.pagination button {
  min-width: 38px; height: 38px; border: 1px solid var(--border); background: var(--white);
  border-radius: var(--radius-sm); cursor: pointer; font-family: inherit; color: var(--text);
}
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }
.empty-tip { text-align: center; color: var(--text-muted); padding: 60px 0; }

/* ---------- Product detail ---------- */
.detail-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 40px 0 20px; align-items: start; }
.gallery-main {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 1 / 1; background: #f1f4f8; display: flex; align-items: center; justify-content: center;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumbs img {
  width: 76px; height: 76px; object-fit: cover; border-radius: var(--radius-sm);
  border: 2px solid var(--border); cursor: pointer; opacity: 0.75;
}
.gallery-thumbs img.active { border-color: var(--accent); opacity: 1; }
.detail-info h1 { font-size: 26px; margin-bottom: 14px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.chip { background: var(--primary-light); color: var(--primary); border-radius: 999px; padding: 4px 12px; font-size: 12px; }
.spec-table { width: 100%; border-collapse: collapse; margin: 16px 0 22px; }
.spec-table td { border: 1px solid var(--border); padding: 10px 14px; font-size: 14px; }
.spec-table td:first-child { background: var(--bg); color: var(--text-muted); width: 38%; font-weight: 600; }
.desc-box { margin: 30px 0 50px; }
.desc-box h2 { font-size: 20px; color: var(--primary); padding-bottom: 10px; border-bottom: 2px solid var(--primary-light); margin-bottom: 18px; }
.desc-text { white-space: pre-wrap; color: var(--text); font-size: 15px; }
.related-title { font-size: 20px; color: var(--primary); margin: 40px 0 18px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px; outline: none; background: var(--white);
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,59,117,0.08); }
.contact-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.contact-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.contact-card .icon { font-size: 26px; }
.contact-card b { display: block; margin: 8px 0 4px; color: var(--primary); }
.contact-card span { font-size: 13px; color: var(--text-muted); word-break: break-all; }

/* ---------- Footer ---------- */
.site-footer { background: #0a1f3c; color: #9fb3cc; padding: 56px 0 0; }
.site-footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 40px; padding-bottom: 40px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer a { color: #9fb3cc; display: block; margin-bottom: 8px; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.site-footer p { font-size: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 0; text-align: center; font-size: 13px; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .about-band .container { grid-template-columns: 1fr; }
  .detail-wrap { grid-template-columns: 1fr; }
  .page-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .contact-cards { grid-template-columns: repeat(2, 1fr); }
  .site-footer .container { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .news-list { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero-slide img { height: 320px; }
  .hero-title { font-size: 26px; }
  .main-nav {
    position: absolute; top: 76px; left: 0; right: 0; background: var(--white);
    border-bottom: 1px solid var(--border); display: none; box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 12px; }
  .nav-toggle { display: block; }
  .topbar-name { display: none; }
}

/* ???????PHP ??? <a>? */
.lang-switch a {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 14px;
  padding: 2px 12px;
  font-size: 12px;
  text-decoration: none;
  margin-left: 4px;
}
.lang-switch a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
