/* web2 在 sea-flying 原站样式之上的少量适配（React 版交互/补缺） */

/* ---------- 公司名称文字标（来自 jz_setting，替代原站 logo 图） ---------- */
.brand-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  max-width: 320px;
}
.brand-wordmark:hover { text-decoration: none; }
.brand-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 7px;
  background: linear-gradient(135deg, #0f75bc, #00a0e3);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
}
.brand-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.15;
  color: #0f4f86;
  letter-spacing: -0.2px;
}
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-mark { box-shadow: 0 2px 8px rgba(0,0,0,.25); }
@media screen and (max-width: 575px) {
  .brand-name { font-size: 14px; }
  .brand-mark { width: 34px; height: 34px; font-size: 18px; }
}

/* ---------- 移动端汉堡按钮 + 抽屉菜单 ---------- */
#menu-toggle {
  display: none;
  width: 34px;
  height: 30px;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
}
#menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  margin: 5px 0;
  background: #0f75bc;
  border-radius: 2px;
  transition: all .25s ease;
}
#menu-toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#menu-toggle.is-open span:nth-child(2) { opacity: 0; }
#menu-toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

header .mobile-nav ul { list-style: none; margin: 12px 0 0; padding: 0; }
header .mobile-nav li {
  border-top: 1px solid #eee;
}
header .mobile-nav li a {
  display: block;
  padding: 12px 6px;
  color: #0f4f86;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
header .mobile-nav li a:hover { color: #9acb3e; }

@media screen and (max-width: 991px) {
  header .desktop-nav { display: none !important; }
  #menu-toggle { display: block; }
  /* 让 LOGO 与汉堡按钮同处一行并垂直居中（col-md-2/col-md-10 在窄屏下默认会换行堆叠） */
  header.site-header .row { align-items: center; }
  header.site-header .col-md-2 {
    flex: 0 0 auto;
    width: auto;
    max-width: 75%;
  }
  header.site-header .col-md-10 {
    flex: 1 1 0;
    width: auto;
    max-width: none;
    align-items: center !important;
  }
}

/* ---------- 首页 line card 品牌网格 ---------- */
.brand-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 26px;
}
.brand-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  height: 64px;
  padding: 0 18px;
  background: #fff;
  border: 1px solid #e4e9ee;
  border-radius: 6px;
  color: #0f4f86;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(15, 117, 188, .06);
  transition: all .2s ease;
}
.brand-item:hover {
  border-color: #9acb3e;
  color: #0f75bc;
  transform: translateY(-2px);
  text-decoration: none;
}

/* 首页热门产品 viewall 按钮兜底 */
.viewallrow { justify-content: center; margin-top: 18px; }

/* 「上传 BOM」下拉：无 Bootstrap JS/Popper 时，保证菜单定位与显隐正确 */
.banner-bom-buttons .dropdown { position: relative; }
.banner-bom-buttons .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  min-width: 100%;
  margin-top: 4px;
  background: #fff;
  z-index: 1000;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}

/* ---------- 内页通用容器 ---------- */
.sf-page { padding: 50px 0 70px; }
.sf-page .container { max-width: 1200px; }
.sf-section-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: #0f4f86;
  font-size: 26px;
  margin-bottom: 8px;
}
.sf-divider { width: 60px; height: 3px; background: #9acb3e; margin: 12px 0 26px; }
.sf-prose { color: #4a5560; line-height: 1.9; font-size: 15.5px; }
.sf-prose p { margin-bottom: 16px; }

/* ---------- 卡片网格（质量/服务/产品/新闻） ---------- */
.sf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.sf-card {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 8px;
  padding: 26px 24px;
  box-shadow: 0 4px 14px rgba(15, 79, 134, .05);
  transition: all .2s ease;
}
.sf-card:hover { box-shadow: 0 10px 26px rgba(15, 79, 134, .1); transform: translateY(-3px); }
.sf-card h3 { color: #0f4f86; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 18px; margin-bottom: 12px; }
.sf-card p { color: #5a6570; line-height: 1.8; font-size: 14.5px; margin: 0; }
.sf-card .num { color: #9acb3e; font-weight: 800; font-size: 30px; font-family: 'Montserrat', sans-serif; line-height: 1; margin-bottom: 12px; }

/* ---------- 产品/新闻卡片 ---------- */
.media-card { background: #fff; border: 1px solid #e8edf2; border-radius: 8px; overflow: hidden; transition: all .2s ease; }
.media-card:hover { box-shadow: 0 10px 26px rgba(15, 79, 134, .1); transform: translateY(-3px); }
.media-card .thumb { display: block; height: 200px; background: #f3f6f9; overflow: hidden; }
.media-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-card .body { padding: 18px 20px; }
.media-card .body h3 { color: #0f4f86; font-size: 17px; font-weight: 700; margin-bottom: 8px; font-family: 'Montserrat', sans-serif; }
.media-card .body .meta { color: #9aa7b2; font-size: 12.5px; margin-bottom: 8px; }
.media-card .body p { color: #5a6570; font-size: 14px; line-height: 1.7; margin: 0; }

/* ---------- 库存搜索表 ---------- */
.stock-toolbar { display: flex; gap: 10px; margin-bottom: 22px; max-width: 640px; }
.stock-toolbar input { flex: 1; height: 44px; border: 1px solid #cdd6df; border-radius: 4px 0 0 4px; padding: 0 14px; font-size: 14px; outline: none; }
.stock-toolbar button { height: 44px; padding: 0 26px; border: none; background: #9acb3e; color: #fff; font-weight: 600; border-radius: 0 4px 4px 0; cursor: pointer; }
.stock-toolbar button:hover { background: #8ab537; }
.badge-avail { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-avail.in { background: #e8f5e9; color: #2e7d32; }
.badge-avail.d7 { background: #fff3e0; color: #ef6c00; }
.badge-avail.pre { background: #eceff1; color: #607d8b; }

/* ---------- 表单 ---------- */
.sf-form { max-width: 720px; }
.sf-form .field { margin-bottom: 18px; }
.sf-form label { display: block; font-weight: 600; color: #3b4651; font-size: 14px; margin-bottom: 6px; }
.sf-form input, .sf-form textarea, .sf-form select {
  width: 100%; border: 1px solid #cdd6df; border-radius: 4px; padding: 11px 13px; font-size: 14px; outline: none; background: #fff;
}
.sf-form input:focus, .sf-form textarea:focus { border-color: #0f75bc; }
.sf-form textarea { min-height: 130px; resize: vertical; }
.sf-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sf-btn { display: inline-block; background: #0f75bc; color: #fff; border: none; border-radius: 4px; padding: 12px 34px; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; }
.sf-btn:hover { background: #0c6098; color: #fff; }
.sf-note { padding: 10px 14px; border-radius: 4px; font-size: 14px; margin-top: 14px; }
.sf-note.ok { background: #e8f5e9; color: #2e7d32; }
.sf-note.err { background: #fdecea; color: #c62828; }
/* 次要按钮：同尺寸描边款，用在主 CTA 旁边 */
.sf-btn-ghost { background: transparent; color: #0f75bc; box-shadow: inset 0 0 0 1px #0f75bc; }
.sf-btn-ghost:hover { background: #0f75bc; color: #fff; }

/* ---------- 呆滞库存招商页（/excess-stock） ---------- */
/* 四块服务固定 2×2。sf-grid 默认的 auto-fill minmax(300px,1fr) 在 1200px 容器里
   只放得下 3 列（4×300+3×24 > 1200），第 4 张会单独掉到第二行，看着像漏排。 */
.excess-grid { grid-template-columns: repeat(2, 1fr); }
@media screen and (max-width: 767px) {
  .excess-grid { grid-template-columns: 1fr; }
}
/* 每个服务卡片下挂两条要点：小标题用蓝色行首，说明另起一行，
   避免像普通项目符号那样把「要点名」和「说明」混成一行读不出层次。 */
.excess-points { list-style: none; margin: 0; padding: 0; }
.excess-points li + li { margin-top: 14px; }
.excess-points strong {
  display: block;
  color: #0f4f86;
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 3px;
}
.excess-points span { display: block; color: #5a6570; font-size: 14.5px; line-height: 1.8; }

/* 三步流程：序号是内容的一部分（先后有意义），所以用 ol 并显式显示编号 */
.excess-steps { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 18px; }
.excess-steps li { display: flex; gap: 18px; align-items: flex-start; }
.excess-steps .num {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #9acb3e; color: #fff;
  font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 17px;
}
.excess-steps h3 {
  color: #0f4f86;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 17px;
  margin: 6px 0 6px;
}
.excess-steps p { color: #5a6570; font-size: 14.5px; line-height: 1.8; margin: 0; }

.excess-cta {
  margin-top: 34px; padding-top: 26px;
  border-top: 1px solid #e6ecf2;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
}
.excess-mail { color: #0f4f86; font-weight: 600; font-size: 15px; margin-left: 4px; }
@media screen and (max-width: 575px) {
  .excess-cta .sf-btn { flex: 1 1 100%; text-align: center; }
  .excess-mail { margin-left: 0; }
}

/* ---------- 联系方式块 ---------- */
.contact-info { line-height: 2.1; color: #4a5560; font-size: 15px; }
.contact-info strong { color: #0f4f86; }
/* 按办公室分组：香港 / 英国。左侧一条细线把两个地址在视觉上分开 */
.contact-info .office-block {
  margin-top: 18px;
  padding-left: 14px;
  border-left: 3px solid #9acb3e;
}
.contact-info .office-block h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #0f4f86;
  margin: 0 0 2px;
  letter-spacing: .02em;
}
.contact-info .office-block p { margin: 0; }
/* 页脚同理：每个办公室一块，标题小一号并留出行距 */
.site-footer .contact-us li.office { margin-top: 10px; }
.site-footer .contact-us li.office strong {
  display: block;
  color: #fff;
  font-weight: 700;
  margin-bottom: 2px;
}
.site-footer .contact-us li.office span { display: block; }
.contact-info a { color: #0f75bc; }

/* ---------- 内页 banner 文本 ---------- */
.page-banner .breadcrumbz { color: #fff; font-size: 13px; opacity: .9; }
.dropdown-menu-static a { display: block; }

/* ---------- 页脚品牌标识（替换原来的文字标） ---------- */
.footer-brand { display: inline-block; margin-bottom: 14px; }
.footer-logo { width: 230px; max-width: 100%; height: auto; }
@media screen and (max-width: 575px) {
  .footer-logo { width: 190px; }
}

/* ---------- 产品分类卡片上的料号计数 ---------- */
.media-card .count {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #0f75bc;
}

/* ---------- 首页承诺条（替换原站写死英文的 tss.png） ---------- */
.promise-band {
  background:
    linear-gradient(180deg, rgba(6, 24, 43, .93), rgba(10, 42, 74, .93)),
    url("/sf/eee.jpg") center / cover no-repeat;
  padding: 46px 0 52px;
  color: #fff;
}
.promise-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 40px;
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
}
.promise-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #b9d8ef;
}
.promise-list svg { color: #00c2e0; flex: 0 0 auto; }
.promise-headline {
  margin: 0;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 3.4vw, 40px);
  line-height: 1.25;
  letter-spacing: -.01em;
}

/* ---------- 首页 banner 的一句话描述 ----------
   模板给首页描述定的是 44px（style.css 的 .page-banner.banner-home .banner-desc p），
   比 43px 的标题还大 —— 那是为「停產・斷檔・軍工級」这类短标语设计的。
   现在换成一整句业务描述，44px 会撑成四五行巨字压垮整个首屏，
   所以降到正常引言字号并限宽居中；标题「Components」才是首屏的主角。

   必须带 !important：模板在 @media(max-width:1600px/1279px/767px) 里都给
   .banner-desc p 加了 !important 的字号，普通规则压不过。这里选择器更具体，
   同为 !important 时按特异性取胜，一条就能盖住它的全部断点。 */
.page-banner.banner-home {
  /* 模板写死 583px，是给「43px 标题 + 44px 大标语」留的量。换成一行标题加一句
     描述后内容只剩 ~230px，剩下的全是空白，首屏被撑得又高又空。收到 460px。 */
  height: 460px;
}
.page-banner.banner-home .banner-title {
  font-size: 54px !important;   /* 模板 43px 是给整句话的；这里只有 Components 一个词，放大才压得住画面 */
  letter-spacing: .01em;
}
.page-banner.banner-home .banner-desc.home-lead p {
  font-size: 22px !important;
  line-height: 1.6;
  max-width: 880px;             /* 22px 下正好两行；760px 会掉到三行 */
  margin: 16px auto 0;
}

/* 搜索行跟着 1370px 的容器拉满，比 880px 的文字块宽出一大截，首屏显得散。
   收到 960px 居中，与标题/描述形成一根中轴。 */
.page-banner.banner-home .banner-search-form-wrap {
  max-width: 960px;
  margin: 0 auto;
}

@media screen and (max-width: 1279px) {
  .page-banner.banner-home { height: 420px; }
  .page-banner.banner-home .banner-title { font-size: 40px !important; }
  .page-banner.banner-home .banner-desc.home-lead p { font-size: 19px !important; max-width: 700px; }
}
@media screen and (max-width: 767px) {
  .page-banner.banner-home { height: 380px; }
  .page-banner.banner-home .banner-title { font-size: 30px !important; }
  .page-banner.banner-home .banner-desc.home-lead p {
    font-size: 16px !important;
    line-height: 1.6;
    margin-top: 12px;
  }
}

/* ---------- Line card 厂牌墙（替换原站的品牌拼图 bb.png） ----------
   用 grid 而不是 flex：厂牌 logo 宽窄差异极大（Mini-Circuits 是 7:1 的长条，
   AMD 接近方形），flex 换行会排出参差不齐的锯齿边；固定列数才能对成整齐的矩阵。
   单元格定高 + object-fit: contain，让每个 logo 在等大的格子里居中缩放。 */
.line-card {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  list-style: none;
  margin: 26px auto 0;
  padding: 0;
  max-width: 1100px;
}
.line-card li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  padding: 12px 14px;
  border: 1px solid #dbe4ec;
  border-radius: 4px;
  background: #fff;
  /* 没有 logo 的厂牌回退成文字，样式沿用原来的 */
  font-size: 13px;
  font-weight: 600;
  color: #0a2a4a;
  text-align: center;
}
.line-card li img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
@media screen and (max-width: 991px) {
  .line-card { grid-template-columns: repeat(4, 1fr); }
}
@media screen and (max-width: 767px) {
  .line-card { grid-template-columns: repeat(3, 1fr); }
  .line-card li { height: 62px; padding: 10px; }
}
@media screen and (max-width: 575px) {
  .promise-list { gap: 10px 22px; }
  .promise-list li { font-size: 11px; letter-spacing: .05em; }
  .line-card { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .line-card li { height: 56px; font-size: 12px; }
}

/* ---------- 页眉高度收紧 ----------
   原模板 padding 21px + 250px 宽的 LOGO（约 82px 高）＝ 124px，顶部太空。
   改成按高度控制 LOGO，页眉高度就固定可控：12 + 54 + 12 ≈ 78px。 */
header.site-header { padding: 12px 0; }
header.site-header .site-logo,
header.site-header .site-logo a {
  display: block;
  line-height: 0; /* 去掉 inline-block 基线留下的那几像素 */
}
header.site-header .site-logo img.logo {
  height: 54px;
  width: auto;
  max-width: 100%;
  /* 关键的一行。col-md-2 的内容区只有 170px，而 LOGO 在 54px 高时自然宽度是 178px：
     max-width 把宽度夹到 170，height 又钉死 54，默认的 object-fit:fill 就把图横向
     压扁了 4.3%（RE 和字标一起变瘦）。改成 contain 后被夹住时只是上下留白、按比例
     缩到 170×51.7，绝不变形。
     不能改用 max-width:none 放它到 178px —— 实测 992px 视口下那一列只有 165px，
     LOGO 右缘会盖到导航上。 */
  object-fit: contain;
  display: block;
}
/* LOGO 与导航垂直居中，而不是底对齐（否则 LOGO 变矮后菜单会贴底） */
header.site-header .row { align-items: center; }
header.site-header .col-md-10.align-items-end { align-items: center !important; }

@media screen and (max-width: 991px) {
  header.site-header { padding: 10px 0; }
  header.site-header .site-logo img.logo { height: 46px; }
  /* style.css 在窄屏给 .site-logo 加了 width:100% 和 margin-bottom:10px，
     会让 LOGO 独占一行并额外撑高页眉；这里改回按内容宽度、去掉下边距。 */
  header.site-header .col-md-2 .site-logo { width: auto; margin-bottom: 0; }
}
@media screen and (max-width: 575px) {
  header.site-header .site-logo img.logo { height: 40px; }
}
