/* concept-rf.com 官网样式 —— 与成本系统/物流页视觉统一 */
:root {
  --accent: #007F78;
  --accent-dark: #006460;
  --dark-bar: #252D31;
  --bg: #F7F9FA;
  --card-bg: #FFFFFF;
  --card-border: #DDE3E6;
  --text: #2B3236;
  --text-light: #66757C;
  --radius: 10px;
}

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

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

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

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

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

.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ===== 顶部导航 ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--card-border);
  color: var(--text);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 56px;
  flex-wrap: wrap;
  max-width: none;      /* 顶栏通栏，不限制 1080 居中 */
  padding-left: clamp(16px, 6vw, 110px);   /* LOGO 贴近屏幕左缘（与轮播文字对齐） */
  padding-right: clamp(16px, 6vw, 110px);
}
/* 左侧：logo + 导航排在一起 */
.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}
/* 右侧搜索框 */
.site-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg);
  flex-shrink: 0;
  transition: border-color .15s;
}
.site-search:focus-within { border-color: var(--accent); }
.site-search input {
  border: none;
  outline: none;
  background: transparent;
  padding: 8px 4px 8px 16px;
  width: 170px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
}
.site-search button {
  border: none;
  background: none;
  cursor: pointer;
  padding: 6px 12px 6px 6px;
  font-size: 15px;
}
@media (max-width: 720px) {
  .site-search { order: 3; width: 100%; }
  .site-search input { width: 100%; flex: 1; }
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand img.logo { height: 30px; width: auto; }
@media (max-width: 720px) { .brand img.logo { height: 24px; } }
.brand .brand-en { font-weight: normal; font-size: 13px; color: #9FB0B8; }

.nav-links { display: flex; gap: 4px; }
.nav-links a {
  color: var(--text-light);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 15px;
  text-decoration: none;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); background: rgba(0,127,120,.08); }

/* 导航下拉分类菜单（产品中心 ▾）*/
.nav-item { position: relative; }
.nav-item > a { display: inline-flex; align-items: center; }
.nav-item .caret { font-size: 11px; margin-left: 2px; transition: transform .2s; line-height: 1; }
.nav-item:hover .caret, .nav-item.open .caret { transform: rotate(180deg); }
.nav-drop {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 176px;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(37,45,49,.14);
  padding: 6px;
  margin-top: 6px;            /* 视觉上留缝 */
  z-index: 120;
}
/* 透明桥：盖住 margin 缝隙，鼠标路过不丢失 hover */
.nav-drop::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 6px;
}
.nav-item:hover .nav-drop, .nav-item.open .nav-drop { display: flex; }
.nav-drop {
  display: none;
  gap: 0;
}
.drop-cats { padding: 6px; min-width: 220px; }
.drop-cats a {
  display: flex;
  align-items: center;
  color: var(--text) !important;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
}
/* 分类名固定宽度，尖括号整列对齐并推向右侧分割线 */
.drop-cats a .dp-name { display: inline-block; width: 8em; flex: 1; }
.drop-cats a .dp-arrow {
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  transition: transform .18s ease, color .18s;
}
.drop-cats a:hover { color: var(--accent) !important; background: rgba(0,127,120,.06); }
.drop-cats a:hover .dp-arrow { transform: translateX(5px); color: var(--accent); }

/* 右侧产品预览面板 */
.drop-preview {
  min-width: 360px;
  border-left: 1px solid var(--card-border);
  background: #FBFDFD;
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
}
.dp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px !important;
  border-radius: 6px;
  color: var(--text) !important;
  font-size: 14px;
}
.dp-item .dp-name { flex: 1; }
.dp-item .dp-arrow {
  color: var(--text-light);
  font-size: 16px;
  transition: transform .18s ease, color .18s;
}
.dp-item:hover { background: rgba(0,127,120,.06); color: var(--accent) !important; text-decoration: none !important; }
.dp-item:hover .dp-arrow { transform: translateX(5px); color: var(--accent); }
.dp-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  border: 1px solid var(--card-border);
  flex-shrink: 0;
}
.dp-noimg {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: #EEF2F4;
  border: 1px solid var(--card-border);
  flex-shrink: 0;
}
.dp-empty { color: var(--text-light); font-size: 13px; padding: 8px 6px; }

/* 移动端导航：汉堡 */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
}
@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 8px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  /* 手机端下拉菜单变为内嵌列表，点"产品中心"展开 */
  .nav-item .caret { float: right; }
  .nav-drop {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--accent);
    border-radius: 0;
    margin: 0 14px 6px;
    padding: 0 0 0 6px;
    min-width: 0;
  }
  .nav-item.open .nav-drop { display: block; }
  /* 手机端隐藏右侧预览面板，只保留分类列表 */
  .drop-preview { display: none; }
}

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 22px;
  border-radius: 6px;
  border: none;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline:hover { background: rgba(0,127,120,.08); color: var(--accent-dark); }

/* ===== 首页 Hero 轮播（参考 Keysight 风格）===== */
.hero {
  position: relative;
  background: var(--dark-bar);
  color: #fff;
  overflow: hidden;
}
.carousel-track { display: flex; transition: transform .5s ease; }

.hero-slide {
  min-width: 100%;
  position: relative;
  /* 固定高度：对齐 Keysight 首页轮播高度 */
  height: 520px;
  display: flex;
  align-items: center;
}
/* 通栏背景大图（Keysight 风格）：默认顶部对齐，单图可用 slidePos 调整截取位置 */
.hero-slide .bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: top;
}
/* 背景为空时的兜底底色 */
.hero-slide .bg.empty { background: linear-gradient(120deg, #37454C 0%, #2A383F 100%); }
/* 文字底部压深色渐变，保证可读 */
.hero-slide .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(21,27,30,.78) 0%, rgba(21,27,30,.45) 45%, rgba(21,27,30,.15) 100%);
}
/* 轮播文字贴近屏幕左侧（与页面内容栅格无关），整体更靠左 */
.hero-slide .container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 72px;
  padding-bottom: 88px;
  padding-left: clamp(16px, 6vw, 110px);
  padding-right: 16px;
}
@media (max-width: 760px) {
  .hero-slide { height: 440px; }
  .hero-slide .overlay { background: rgba(21,27,30,.55); }
  .hero-slide .container { padding-top: 44px; padding-bottom: 88px; }
}

.hero-slide .text h1 { font-size: 32px; line-height: 1.3; margin-bottom: 14px; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.hero-slide .text .sub { color: #E3EAED; font-size: 16px; margin-bottom: 26px; max-width: 560px; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.hero-slide .text .actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .hero-slide .text h1 { font-size: 24px; } }

/* 轮播左右箭头 */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: background .15s;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-btn:hover { background: rgba(255,255,255,.28); }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

/* 轮播圆点 */
.carousel-dots {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.carousel-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.35);
  cursor: pointer;
  padding: 0;
  transition: background .15s;
}
.carousel-dots button.active { background: #fff; }

/* ===== 卡片 / 区块 ===== */
.section { padding: 44px 0; }
.section-title {
  font-size: 22px;
  margin-bottom: 22px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px;
}

/* 网格 */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* 所有产品页：分类分组（可折叠）+ 紧凑卡片 */
.prod-group { margin-bottom: 24px; }
.prod-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 4px 0;
  font-size: 17px;
  font-family: inherit;
  font-weight: bold;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 14px;
}
.prod-group-title:hover { color: var(--accent); }
.prod-group-title .tg-arrow {
  font-size: 17px;
  color: var(--text);
  transition: transform .2s;
}
.prod-group.collapsed .tg-arrow { transform: rotate(-90deg); }
.prod-group-body { transition: opacity .2s; }
.prod-group.collapsed .prod-group-body { display: none; }

/* 分组里的紧凑产品卡片：4 列小卡 */
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .grid-4 { grid-template-columns: 1fr; } }
.prod-group .product-card .thumb { aspect-ratio: 1/1; }
.prod-group .product-card .body { padding: 10px 12px 12px; }
.prod-group .product-card h3 { font-size: 14px; }
.prod-group .product-card .desc { font-size: 12px; -webkit-line-clamp: 2; }
.prod-group .product-card .more { font-size: 12px; margin-top: 8px; }

/* ===== 产品卡片 ===== */
.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  transition: box-shadow .15s, transform .15s;
}
.product-card:hover {
  box-shadow: 0 4px 16px rgba(37,45,49,.10);
  transform: translateY(-2px);
}
.product-card .thumb {
  background: #fff;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-card .thumb .no-img { color: #A9B8BF; font-size: 14px; }
.product-card .body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.product-card h3 { font-size: 17px; margin-bottom: 4px; }
.product-card .code { color: var(--text-light); font-size: 13px; margin-bottom: 10px; }
.product-card .desc {
  color: var(--text-light);
  font-size: 14px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .more { margin-top: 12px; font-size: 14px; }

/* ===== 详情页 ===== */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 760px) { .detail-layout { grid-template-columns: 1fr; } }
.detail-img {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.detail-img img { width: 100%; height: 100%; object-fit: contain; }
.detail-info h1 { font-size: 24px; margin-bottom: 4px; }
.detail-info .code { color: var(--text-light); margin-bottom: 16px; }
.detail-info .desc { margin-bottom: 20px; }

/* 下载列表 */
.download-list { list-style: none; }
.download-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--card-border);
}
.download-list li > div { min-width: 0; }          /* 长文件名换行而不是挤压按钮 */
.download-list .file-meta { word-break: break-all; }
.download-list .btn { flex-shrink: 0; white-space: nowrap; }
/* 下载按钮：无底色，仅下箭头 + 底部横线 */
.download-list .btn.dl-icon {
  background: none;
  color: #9AA7AD;
  padding: 5px 12px;
  display: inline-flex;
  align-items: center;
}
.download-list .btn.dl-icon:hover { background: none; color: var(--accent); }
.download-list .btn.dl-icon svg { display: block; }
.download-list li:last-child { border-bottom: none; }
.file-name { font-size: 15px; word-break: break-all; }
.file-meta { color: var(--text-light); font-size: 12px; }

/* ===== 物流入口横幅 ===== */
.logistics-banner {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--dark-bar);
  color: #9FB0B8;
  padding: 28px 0;
  font-size: 13px;
  margin-top: 44px;
}
.site-footer a { color: #C9D3D8; }

/* 面包屑 */
.breadcrumb { font-size: 13px; color: var(--text-light); margin-bottom: 18px; }

.empty-tip { color: var(--text-light); text-align: center; padding: 40px 0; }

/* 详情页：老版本分割线 */
.legacy-divider { display: flex; align-items: center; gap: 14px; margin: 26px 0 16px; }
.legacy-divider::before, .legacy-divider::after { content: ""; flex: 1; height: 1px; background: #C9D4D9; }
.legacy-divider span { color: var(--text-light); font-size: 14px; letter-spacing: 2px; }
.legacy-card { opacity: .82; }
.legacy-card .desc { font-size: 14px; }

/* 菜单栏下拉：老版本分割线 */
.dp-legacy-line { display: flex; align-items: center; gap: 10px; margin: 8px 0 6px; }
.dp-legacy-line::before, .dp-legacy-line::after { content: ""; flex: 1; height: 1px; background: #C9D4D9; }
.dp-legacy-line span { color: var(--text-light); font-size: 12px; letter-spacing: 2px; white-space: nowrap; }
