/* ==========================================================================
   Manda Site — global stylesheet
   所有页面共用，改这里即可全站生效
   ========================================================================== */

:root {
  --navy: #0d4a8a;
  --navy-soft: #1b6fc0;
  --accent: #1b6fc0;
  --footer: #0d2036;
  --text: #1e232b;
  --text-mute: #5d6b7a;
  --line: #e3e8ee;
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --radius: 0px;
  --wrap: 1180px;
  --shadow: 0 6px 20px rgba(13, 74, 138, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 12px;
  line-height: 1.3;
  color: var(--navy);
  font-weight: 700;
}

h1 {
  font-size: 34px;
}
h2 {
  font-size: 26px;
}
h3 {
  font-size: 19px;
}

p {
  margin: 0 0 14px;
}

ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 52px;
  width: auto;
  display: block;
}

.logo:hover {
  text-decoration: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  text-decoration: none;
  color: var(--accent);
}

.site-nav a.active {
  color: var(--navy);
  border-bottom-color: var(--accent);
}

/* ---------- hero ---------- */

.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: #fff;
  padding: 76px 0;
}

.hero h1 {
  color: #fff;
  font-size: 40px;
  max-width: 760px;
}

.hero p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  max-width: 680px;
  margin-bottom: 28px;
}

.hero-sm {
  padding: 52px 0;
}

.hero-sm h1 {
  font-size: 32px;
  margin-bottom: 8px;
}

/* 首页横幅：照片打底 + 深色渐变保证文字可读 */
.hero-photo {
  position: relative;
  background: var(--navy);
  padding: 0;
  overflow: hidden;
}

.hero-photo .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(10, 26, 42, 0.92) 0%,
    rgba(10, 26, 42, 0.78) 42%,
    rgba(10, 26, 42, 0.42) 72%,
    rgba(10, 26, 42, 0.25) 100%
  );
}

.hero-photo .wrap {
  position: relative;
  z-index: 2;
  padding-top: 96px;
  padding-bottom: 96px;
}

.hero-photo h1 {
  color: #fff;
  font-size: 42px;
  max-width: 720px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero-photo p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
  max-width: 620px;
  margin-bottom: 28px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--navy);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ---------- sections ---------- */

.section {
  padding: 64px 0;
}

.section-soft {
  background: var(--bg-soft);
}

.section-head {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-head p {
  color: var(--text-mute);
  margin-bottom: 0;
}

.grid {
  display: grid;
  gap: 22px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(15, 42, 68, 0.12);
}

.card h3 {
  margin-bottom: 8px;
}

.card h3 a {
  color: var(--navy);
}

.card p {
  color: var(--text-mute);
  font-size: 15px;
  margin-bottom: 16px;
}

.card .more {
  margin-top: auto;
  font-size: 14px;
  font-weight: 600;
}

/* 卡片配图：统一 3:2 裁切，避免不同比例把版式撑乱 */
.card-media {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  margin-bottom: 18px;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease;
}

.card:hover .card-media img {
  transform: scale(1.04);
}

/* 产品详情页主图：contain 显示整机，不裁切 */
.product-figure {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  margin-bottom: 26px;
}

.product-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 竖构图产品图（失重秤、管链等）用更高画框 */
.product-figure.tall {
  aspect-ratio: 3 / 4;
}

/* 图文左右分栏 */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.split-reverse .split-media {
  order: 2;
}

.split-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
}

.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split-media.portrait {
  aspect-ratio: 3 / 4;
}

/* 横长图（工艺流程图等）：contain 完整显示 */
.split-media.wide {
  aspect-ratio: 2 / 1;
  background: #fff;
  border: 1px solid var(--line);
}

.split-media.wide img {
  object-fit: contain;
}

/* 工程案例 */
.case-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.case-item {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  aspect-ratio: 4 / 3;
}

.case-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.case-item:hover img {
  transform: scale(1.05);
}

/* ---------- product detail ---------- */

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.spec-table th,
.spec-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.spec-table th {
  width: 40%;
  background: var(--bg-soft);
  color: var(--navy);
  font-weight: 600;
}

.spec-table tr:last-child th,
.spec-table tr:last-child td {
  border-bottom: 0;
}

.aside-box {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 24px;
}

.aside-box h3 {
  font-size: 17px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  padding-left: 22px;
  position: relative;
  margin-bottom: 10px;
  color: var(--text);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--footer);
  color: rgba(255, 255, 255, 0.72);
  padding: 44px 0 28px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}

.site-footer h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 12px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.72);
}

.site-footer a:hover {
  color: #fff;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 8px;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 18px;
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .product-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .split {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .split-reverse .split-media {
    order: 0;
  }
  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 0;
    gap: 12px;
  }
  .site-nav ul {
    gap: 16px;
  }
  .hero {
    padding: 56px 0;
  }
  .hero h1 {
    font-size: 28px;
  }
  .hero-sm h1 {
    font-size: 24px;
  }
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 44px 0;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-photo .wrap {
    padding-top: 64px;
    padding-bottom: 64px;
  }
  .hero-photo h1 {
    font-size: 28px;
  }
  .case-grid {
    grid-template-columns: 1fr 1fr;
  }
  .product-figure {
    aspect-ratio: 3 / 2;
  }
}

/* 白底产品照：完整显示不裁切 */
.card-media.shot { background:#fff; }
.card-media.shot img { object-fit:contain; }
