:root {
  --brand: #1f7ae0;
  --text: #0f172a;
  --bg: #ffffff;
  --muted: #f8fafc;
  --line: #e2e8f0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
a { color: var(--brand); text-decoration: none; }

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

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 12px 0;
}
.nav {
  display: flex; justify-content: space-between; align-items: center;
}
.brand { font-weight: 700; font-size: 20px; }
.main-nav a { margin-left: 20px; }

/* Hero */
.hero {
  padding: 60px 0;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero-text h1 {
  font-size: 36px;
  margin-bottom: 12px;
}
.hero-text p {
  margin-bottom: 20px;
  color: #334155;
}
.btn {
  display: inline-block;
  padding: 10px 18px;
  background: var(--brand);
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
}
.btn:hover { opacity: 0.9; }

/* Section */
.section { padding: 60px 0; }
.section h2 { font-size: 28px; margin-bottom: 24px; }
.section.muted { background: var(--muted); }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: #fff;
}
.card h3 { margin: 12px 0 6px; }

/* Frame placeholder */
.frame {
  border: 2px dashed var(--line);
  border-radius: 10px;
  height: 180px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #64748b;
  font-size: 14px;
}
.frame.tall { height: 240px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  text-align: center;
  font-size: 14px;
  color: #64748b;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
}
/* Cards */
.cards {display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:24px; margin-top:20px}
.card {background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px;box-shadow:0 2px 4px rgba(0,0,0,.05)}
.card h3{margin:12px 0 6px;font-size:18px}
.card p{font-size:14px;color:#555}
.card-link{display:inline-block;margin-top:8px;color:#1f7ae0;text-decoration:underline}

/* Frame */
.frame{border:2px dashed var(--line);border-radius:10px;height:180px;display:flex;align-items:center;justify-content:center;font-size:14px;color:#64748b}
.frame.hero{height:280px}
.frame.tall{height:240px}
.frame img{max-width:100%;max-height:100%;object-fit:contain}

/* Product spec table */
.spec{width:100%;border-collapse:collapse;margin:16px 0;border:1px solid var(--line)}
.spec th,.spec td{padding:10px 14px;border-bottom:1px solid var(--line);text-align:left;font-size:14px}
.spec th{background:#f8fafc;width:220px}
.frame-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  border-radius: 6px;
}
.frame.hero {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.frame.hero img {
  max-width: 30%;
  flex: 1 1 auto;
}
.frame.hero img {
  max-width: 30%;
  height: auto;
  margin: 8px;
  border-radius: 6px;
  object-fit: contain;
}
/* --- Keep all images inside dashed frames --- */
.frame{
  position: relative;
  overflow: hidden;            /* 关键：不让图片溢出覆盖文字 */
}

/* 顶部大图区域（虚线框）限定统一高度，可按需要 280~360 调整 */
.frame.hero{
  height: 320px;               /* 统一高度，视觉稳 */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
}

/* 多图时自动排布，不超框，保持等比 */
.frame.hero img{
  max-height: 100%;
  max-width: 30%;
  height: auto;
  width: auto;
  object-fit: contain;         /* 不裁切，完整展示 */
  border-radius: 6px;
  flex: 0 0 auto;              /* 避免被拉伸 */
}

/* 卡片里的缩略图也做保护，防止撑出框 */
.card .frame img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}
/* === 产品详情页图片布局修复 === */
.frame.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: flex-start;
  margin: 20px 0;
}

.frame.hero img {
  max-width: 30%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  display: block;
  border: 1px solid #eee;
  background: #fff;
  padding: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
/* --- Brand with logo --- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand img.logo {
  height: 28px;            /* 头部导航内的 Logo 高度 */
  width: auto;
  display: block;
}

/* --- Top hero image inside dashed frame --- */
.frame.hero {              /* 你已有 .frame 的虚线边框，这里只限定高度与裁剪 */
  position: relative;
  overflow: hidden;        /* 防止图片溢出遮挡文字 */
  height: 320px;           /* 保持你当前的视觉高度 */
}
.frame.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;       /* 充满且不变形，超出部分裁剪 */
  border-radius: 6px;
}
/* ===== Home page hero image (section.hero) 专用覆盖，保证铺满框 ===== */
section.hero .frame.hero{
  position: relative;
  overflow: hidden;          /* 防止图片溢出遮挡文字 */
  height: 420px;             /* 你现在版心比例更高，给足高度；可改 360~480 之间 */
  width: 100%;
}

section.hero .frame.hero img{
  width: 100%;
  height: 100%;
  max-width: none !important;/* 彻底取消任何 max-width 限制（避免被其他规则限制到 30%）*/
  object-fit: cover;         /* 等比裁切铺满 */
  display: block;
  border-radius: 6px;
  border: 0;
  padding: 0;
  box-shadow: none;          /* 首页 hero 不要卡片阴影 */
}

/* hero 左侧文字区保持不变，确保不被图片覆盖 */
section.hero .hero-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}
/* Brand（只限制 logo 尺寸，不改原布局） */
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand__img { height: 28px; width: auto; display: block; }