/* =========================================================
   丹东北方机械有限公司 - 新版官网样式
   简洁现代工业风 · 深蓝主色
   ========================================================= */
:root {
  --primary: #0e4d92;
  --primary-dark: #0a3a70;
  --accent: #f39c12;
  --dark: #12283f;
  --text: #333f4e;
  --muted: #6b7a8d;
  --bg: #ffffff;
  --bg-alt: #f4f7fa;
  --border: #e3e9f0;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(18, 40, 63, .08);
  --container: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
}

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

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

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 999px;
  font-size: 15px;
  letter-spacing: .5px;
  transition: all .25s ease;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #dd8d0a; border-color: #dd8d0a; transform: translateY(-2px); }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.15); }
.btn-outline { border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.2); }

/* ---------- 顶部 ---------- */
.topbar { background: var(--dark); color: #c8d4e0; font-size: 13px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 12px; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.topbar-tel strong { color: #fff; font-weight: 600; }
.lang-switch {
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: 2px 14px;
  color: #fff;
  transition: all .2s;
}
.lang-switch:hover { background: var(--accent); border-color: var(--accent); }

.navbar {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(18,40,63,.06);
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 16px; }
.brand img { height: 52px; width: auto; object-fit: contain; }
.nav { display: flex; gap: 8px; }
.nav a {
  display: block;
  padding: 10px 22px;
  font-size: 16px;
  font-weight: 500;
  color: var(--dark);
  border-radius: 8px;
  transition: all .2s;
}
.nav a:hover { color: var(--primary); background: var(--bg-alt); }
.nav a.active { color: #fff; background: var(--primary); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block; width: 24px; height: 3px;
  background: var(--dark); margin: 5px 0; border-radius: 2px;
  transition: all .25s;
}

/* ---------- 首页轮播 ---------- */
.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: var(--dark);
}
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1s ease, transform 6s linear;
}
.hero-slide.active { opacity: 1; transform: scale(1); }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(10,32,56,.85) 0%, rgba(14,77,146,.55) 55%, rgba(10,32,56,.35) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #fff;
}
.hero-kicker {
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}
.hero-content h1 {
  font-size: 46px;
  line-height: 1.25;
  font-weight: 700;
  max-width: 760px;
  text-shadow: 0 4px 20px rgba(0,0,0,.35);
}
.hero-sub { margin: 18px 0 30px; font-size: 18px; color: rgba(255,255,255,.85); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-dots {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 10px;
  z-index: 3;
}
.hero-dots button {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.45);
  cursor: pointer;
  transition: all .25s;
}
.hero-dots button.active { background: var(--accent); width: 26px; border-radius: 999px; }

/* ---------- 通用区块 ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; margin-bottom: 48px; }
.section-kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.section-head h2 { font-size: 34px; color: var(--dark); margin-top: 6px; }
.section-line {
  display: block;
  width: 56px; height: 3px;
  background: var(--accent);
  margin: 16px auto 0;
  border-radius: 2px;
}
.section-sub { color: var(--muted); margin-top: 14px; }
.section-more { text-align: center; margin-top: 42px; }

/* ---------- 企业简介 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}
.about-title { font-size: 22px; color: var(--primary); margin-bottom: 18px; }
.about-text p { margin-bottom: 16px; text-align: justify; }
.about-quote { color: var(--primary); font-weight: 600; }
.about-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.about-pics img {
  width: 100%; height: 240px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .3s ease;
}
.about-pics img:hover { transform: translateY(-6px); }

/* ---------- 数据统计 ---------- */
.stats {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  background: linear-gradient(120deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius);
  padding: 34px 20px;
  color: #fff;
  box-shadow: var(--shadow);
}
.stat { text-align: center; }
.stat strong { display: block; font-size: 32px; font-weight: 700; line-height: 1.2; }
.stat span { font-size: 13px; color: rgba(255,255,255,.8); display: block; margin-top: 6px; }

/* ---------- 产品卡片 ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all .3s ease;
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.product-pic { aspect-ratio: 4 / 3; overflow: hidden; background: #f0f3f7; }
.product-pic img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.product-card:hover .product-pic img { transform: scale(1.06); }
.product-name {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
}
.product-name .arrow { font-style: normal; color: var(--accent); transition: transform .25s; }
.product-card:hover .arrow { transform: translateX(5px); }

.group-head { margin: 26px 0 22px; }
.group-head:first-of-type { margin-top: 0; }
.group-head h2 {
  display: inline-block;
  font-size: 24px;
  color: var(--dark);
  padding-left: 14px;
  border-left: 4px solid var(--accent);
}
.group-head .section-line { display: none; }

/* ---------- 产品详情 ---------- */
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 8px; color: #b8c2cd; }
.breadcrumb em { font-style: normal; color: var(--dark); }
.not-found { text-align: center; font-size: 18px; color: var(--muted); padding: 40px 0 30px; }

.product-detail {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: start;
}
.detail-pic {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f0f3f7;
}
.detail-pic img { width: 100%; object-fit: contain; }
.detail-info .chip {
  display: inline-block;
  background: rgba(14,77,146,.08);
  color: var(--primary);
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.detail-info h1 { font-size: 30px; color: var(--dark); line-height: 1.35; }
.detail-summary { margin: 18px 0 26px; color: var(--muted); }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.detail-hotline {
  margin-top: 34px;
  padding: 18px 22px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
}
.detail-hotline span { display: block; font-size: 13px; color: var(--muted); }
.detail-hotline strong { font-size: 24px; color: var(--primary); }

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(115deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 60px 0;
}
.cta-inner { text-align: center; }
.cta h3 { font-size: 28px; margin-bottom: 10px; }
.cta p { color: rgba(255,255,255,.82); margin-bottom: 26px; }

/* ---------- 价值观卡片 ---------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.value-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 24px;
  text-align: center;
  transition: all .3s ease;
}
.value-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.value-icon {
  width: 58px; height: 58px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(14,77,146,.08);
  color: var(--primary);
  font-size: 24px;
  display: flex; align-items: center; justify-content: center;
}
.value-card h3 { font-size: 18px; color: var(--dark); margin-bottom: 10px; }
.value-card p { font-size: 14px; color: var(--muted); }

/* ---------- 内页 Banner ---------- */
.page-banner {
  background: linear-gradient(115deg, var(--primary-dark) 0%, var(--primary) 70%, #1a65b8 100%);
  color: #fff;
  padding: 56px 0;
}
.page-banner h1 { font-size: 32px; }
.page-banner p { color: rgba(255,255,255,.78); margin-top: 6px; }

/* ---------- 联系我们 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 48px;
  align-items: start;
}
.contact-list {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.contact-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.contact-row:last-child { border-bottom: 0; }
.contact-row:nth-child(odd) { background: var(--bg-alt); }
.contact-label { color: var(--primary); font-weight: 600; white-space: nowrap; }
.contact-value { word-break: break-all; }
.contact-qr {
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
}
.contact-qr img {
  width: 200px; height: 200px;
  object-fit: contain;
  margin: 0 auto 18px;
}
.contact-qr h3 { color: var(--dark); font-size: 18px; }
.contact-qr p { color: var(--muted); font-size: 14px; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--dark); color: #aebac7; margin-top: 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr .6fr;
  gap: 44px;
  padding: 56px 20px 40px;
}
.footer-col h4 { color: #fff; font-size: 17px; margin-bottom: 18px; }
.footer-about p { font-size: 14px; line-height: 1.9; }
.footer-slogan { color: var(--accent); margin-top: 12px; font-weight: 600; }
.footer-contact li { font-size: 14px; margin-bottom: 10px; line-height: 1.7; }
.footer-qr { text-align: center; }
.footer-qr img { width: 130px; height: 130px; object-fit: contain; margin: 0 auto 10px; background: #fff; padding: 6px; border-radius: 8px; }
.footer-qr p { font-size: 13px; }
.copyright {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 18px 0;
  font-size: 13px;
  text-align: center;
  color: #7f8ea0;
}

/* ---------- 图片加载占位 ---------- */
@keyframes imgShimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -80% 0; }
}

/* 加载中：<img> 底层微光动画（图片未绘制前背景可见） */
img.img-loading {
  background: linear-gradient(100deg, #e9edf2 40%, #f6f8fb 50%, #e9edf2 60%) no-repeat;
  background-size: 220% 100%;
  animation: imgShimmer 1.2s linear infinite;
  min-height: 40px;
  border-radius: 8px;
}

/* 内容大图的加载占位高度，避免加载完成时页面跳动 */
.detail-pic img.img-loading,
.detail-pic img.img-error { min-height: 320px; }

/* 加载失败：灰色占位块 */
img.img-error {
  background: #eef1f5 no-repeat center / 48px auto
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b8c2cd' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E");
  min-height: 40px;
  border-radius: 8px;
}

/* 首页轮播：背景图预加载期间的微光占位（div 可用伪元素） */
.hero-slide.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(255,255,255,.05) 40%, rgba(255,255,255,.14) 50%, rgba(255,255,255,.05) 60%) no-repeat;
  background-size: 220% 100%;
  animation: imgShimmer 1.2s linear infinite;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 26px 10px; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .hero { height: 460px; }
  .hero-content h1 { font-size: 32px; }
  .about-grid, .product-detail, .contact-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  .topbar-welcome { display: none; }
  .topbar-inner { justify-content: flex-end; }

  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    padding: 8px 16px 16px;
    box-shadow: 0 12px 20px rgba(18,40,63,.1);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 16px; }
  .navbar { position: sticky; }
  .navbar-inner { position: relative; min-height: 64px; }
  .brand img { height: 42px; }
}
@media (max-width: 560px) {
  .section { padding: 56px 0; }
  .product-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero-content h1 { font-size: 26px; }
  .contact-row { grid-template-columns: 110px 1fr; }
}
