/* ==========================================================================
   2nd Electronics — McMaster-style skeuomorphic catalog skin
   作用域：body.nde-mcm（mu-plugin zz-skin-mcmaster.php 注入；删掉该类即回滚）
   语言：Arial 12.5px / #333、1px 细线、condensed 粗体标题、密集表格、
        浅灰渐变+内高光的拟物按钮与输入框、无大圆角无重投影
   ========================================================================== */

body.nde-mcm {
  --ink: #333;
  --ink-strong: #1b1b1b;
  --muted: #6a6a6a;
  --rule: #c9c9c9;
  --rule-lt: #e3e3e3;
  --panel: #ffffff;
  --panel-bg: #fbfbfb;
  --hd-a: #f8f8f8;
  --hd-b: #e9e9e9;
  --accent: #0f2c52;         /* 品牌深蓝 */
  --accent-soft: #eef2f8;
  --gold: #c9a227;           /* McMaster 那条黄线 */
  --link: #14418a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
}

body.nde-mcm .ast-container,
body.nde-mcm .site-content .ast-container { max-width: 1240px; }


/* ---------- 0b. 基础盒模型修正（Astra 默认 content-box 会让卡片溢出栅格） ---------- */
body.nde-mcm *, body.nde-mcm *::before, body.nde-mcm *::after { box-sizing: border-box; }

/* 顶部到正文的间距收紧（McMaster 是密集版式） */
body.nde-mcm .site-content { padding-top: 12px !important; }
body.nde-mcm .entry-header { margin-bottom: 6px !important; }
body.nde-mcm .entry-content > *:first-child { margin-top: 0 !important; }

/* 首页四条线卡：等分且不溢出（页面内联样式优先级更高，这里必须 !important） */
body.nde-mcm .nde-hero-cats {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
}
body.nde-mcm .nde-hero-cats > * {
  min-width: 0 !important;
  width: auto !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
body.nde-mcm .nde-hero-cats .card,
body.nde-mcm .nde-hero-cats a,
body.nde-mcm .nde-hero-cats .nde-cat-card {
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: linear-gradient(180deg, #ffffff, #f4f4f4);
  padding: 8px 10px;
  font-size: 12px;
  overflow: hidden;
}
@media (max-width: 1024px) { body.nde-mcm .nde-hero-cats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 560px)  { body.nde-mcm .nde-hero-cats { grid-template-columns: minmax(0, 1fr) !important; } }

/* 导航：取消逐项描边，改成整条底线 + 悬停浅底 */
body.nde-mcm .main-header-menu > .menu-item > .menu-link,
body.nde-mcm .main-header-menu > .page_item > a,
body.nde-mcm .main-header-menu > li:first-child > a { border-left: 0; border-right: 0; }
body.nde-mcm .main-header-menu > li { border: 0 !important; }
body.nde-mcm .main-header-menu > .menu-item > .menu-link { border: 0 !important; }
/* 当前项只给下划粗线，不做整块底色（McMaster 导航无框无底色） */
body.nde-mcm .main-header-menu > .current-menu-item > .menu-link,
body.nde-mcm .main-header-menu > .current_page_item > a,
body.nde-mcm .main-header-menu > .current-menu-ancestor > .menu-link,
body.nde-mcm .main-header-menu > .current_page_parent > a {
  background: transparent !important;
  color: var(--accent) !important;
  box-shadow: inset 0 -2px 0 var(--accent);
}
body.nde-mcm .main-header-menu > .menu-item > .menu-link:hover,
body.nde-mcm .main-header-menu > .page_item > a:hover {
  background: #f4f6f9 !important;
  text-decoration: none !important;
}
body.nde-mcm .main-header-menu > .menu-item > .menu-link { padding: 6px 11px !important; }

/* 信件预览卡下移，避免压住首页线卡 */
body.nde-mcm .nde-lw-prev { top: 38% !important; }

/* ---------- 1. 排版 ---------- */
body.nde-mcm h1,
body.nde-mcm h2,
body.nde-mcm h3,
body.nde-mcm h4,
body.nde-mcm .entry-title,
body.nde-mcm .nde-tax-head h1,
body.nde-mcm .nde-sec-h2 {
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .1px;
  line-height: 1.25;
}
body.nde-mcm h1, body.nde-mcm .entry-title { font-size: 21px; margin: 0 0 6px; }
body.nde-mcm h2 { font-size: 16px; margin: 18px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--rule-lt); }
body.nde-mcm h3 { font-size: 13.5px; margin: 14px 0 6px; }
body.nde-mcm p, body.nde-mcm li { font-size: 12.5px; color: var(--ink); }
body.nde-mcm a { color: var(--link); text-decoration: none; }
body.nde-mcm a:hover { text-decoration: underline; }
body.nde-mcm strong, body.nde-mcm b { color: var(--ink-strong); }

/* ---------- 2. 顶栏 / 导航 ---------- */
body.nde-mcm .site-header,
body.nde-mcm .main-header-bar-wrap,
body.nde-mcm .ast-primary-header-bar,
body.nde-mcm .main-header-bar {
  background: #fff !important;
  border-bottom: 1px solid var(--rule) !important;
  box-shadow: none !important;
}
body.nde-mcm .site-header::after {
  content: ""; display: block; height: 2px;
  background: linear-gradient(90deg, var(--gold), #e6cf7a 45%, var(--gold));
}
body.nde-mcm .main-header-bar { padding: 2px 0 !important; }
body.nde-mcm .ast-primary-header-bar { min-height: 0 !important; }
body.nde-mcm .site-header .custom-logo,
body.nde-mcm .site-header .custom-logo-link img { max-height: 44px !important; width: auto !important; }
body.nde-mcm .site-branding { padding: 4px 0 !important; }
body.nde-mcm .ast-site-identity { padding: 4px 0 !important; }
body.nde-mcm .site-title a,
body.nde-mcm .site-title { font-family: "Arial Narrow", Arial, sans-serif !important; font-weight: 700; letter-spacing: .3px; }
body.nde-mcm .main-header-menu > .menu-item > .menu-link,
body.nde-mcm .main-header-menu > .page_item > a {
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--accent);
  padding: 8px 12px;
  border-right: 1px solid var(--rule-lt);
}
body.nde-mcm .main-header-menu > li:first-child > a { border-left: 1px solid var(--rule-lt); }
body.nde-mcm .main-header-menu > .menu-item:hover > .menu-link,
body.nde-mcm .main-header-menu > .current-menu-item > .menu-link,
body.nde-mcm .main-header-menu > .current_page_item > a {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}
body.nde-mcm .ast-header-break-point .main-header-menu { border-top: 1px solid var(--rule); }

/* 面包屑 */
body.nde-mcm .hermes-breadcrumbs-wrap {
  background: #f7f7f7;
  border-bottom: 1px solid var(--rule-lt);
  padding: 6px 0;
  font-size: 11.5px;
  color: var(--muted);
}
body.nde-mcm .hermes-breadcrumbs-wrap a { color: var(--link); }

/* ---------- 3. 按钮 / 输入框（拟物：渐变 + 内高光 + 1px 描边） ---------- */
body.nde-mcm button,
body.nde-mcm input[type="submit"],
body.nde-mcm input[type="button"],
body.nde-mcm .ast-button,
body.nde-mcm .button,
body.nde-mcm .wp-block-button__link,
body.nde-mcm .ff-btn-submit,
body.nde-mcm .nde-pl-btn {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-strong);
  background: linear-gradient(180deg, #ffffff 0%, #f2f2f2 52%, #e6e6e6 100%);
  border: 1px solid #9a9a9a;
  border-radius: 2px;
  padding: 6px 12px;
  box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0, 0, 0, .04);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
  cursor: pointer;
  transition: background .12s ease, box-shadow .12s ease;
}
body.nde-mcm button:hover,
body.nde-mcm input[type="submit"]:hover,
body.nde-mcm .button:hover,
body.nde-mcm .ff-btn-submit:hover,
body.nde-mcm .nde-pl-btn:hover { background: linear-gradient(180deg, #fdfdfd 0%, #ececec 55%, #dcdcdc 100%); }
body.nde-mcm button:active,
body.nde-mcm input[type="submit"]:active,
body.nde-mcm .button:active,
body.nde-mcm .ff-btn-submit:active,
body.nde-mcm .nde-pl-btn:active {
  background: linear-gradient(180deg, #e2e2e2 0%, #ededed 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .16);
}
/* 主按钮 */
body.nde-mcm .nde-pl-btn.primary,
body.nde-mcm .wp-block-button__link,
body.nde-mcm .ff-btn-submit,
body.nde-mcm button[type="submit"] {
  color: #fff;
  background: linear-gradient(180deg, #21456f 0%, #16375c 52%, #0f2c52 100%);
  border-color: #0b2340;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 1px 0 rgba(0, 0, 0, .08);
}
body.nde-mcm .nde-pl-btn.primary:hover,
body.nde-mcm .wp-block-button__link:hover,
body.nde-mcm .ff-btn-submit:hover,
body.nde-mcm button[type="submit"]:hover { background: linear-gradient(180deg, #2a5484 0%, #1b4270 55%, #122f56 100%); }

body.nde-mcm input[type="text"],
body.nde-mcm input[type="search"],
body.nde-mcm input[type="email"],
body.nde-mcm input[type="tel"],
body.nde-mcm input[type="number"],
body.nde-mcm input[type="url"],
body.nde-mcm textarea,
body.nde-mcm select,
body.nde-mcm .ff-el-form-control,
body.nde-mcm .nde-search input {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12.5px;
  color: var(--ink-strong);
  background: #fff;
  border: 1px solid #9a9a9a;
  border-radius: 2px;
  padding: 6px 8px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12);
}
body.nde-mcm input:focus, body.nde-mcm textarea:focus, body.nde-mcm select:focus,
body.nde-mcm .ff-el-form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12), 0 0 0 2px rgba(15, 44, 82, .12);
}
body.nde-mcm label { font-size: 12px; color: var(--ink-strong); font-weight: 700; }

/* ---------- 4. 通用面板 / 卡片 ---------- */
body.nde-mcm .card,
body.nde-mcm .nde-main .card,
body.nde-mcm .products-grid li,
body.nde-mcm .nde-grid > li,
body.nde-mcm .nde-lw-card,
body.nde-mcm .nde-pl-panel,
body.nde-mcm .nde-ck-card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
}
body.nde-mcm .site-content .entry-content { color: var(--ink); }

/* ---------- 5. 首页 hero 搜索 ---------- */
body.nde-mcm .nde-hero {
  background: linear-gradient(180deg, #f7f9fc 0%, #eef2f7 100%);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 18px 16px;
  box-shadow: inset 0 1px 0 #fff;
}
body.nde-mcm .nde-hero h2, body.nde-mcm .nde-hero h3 { color: var(--accent); }
body.nde-mcm .nde-hero-search input,
body.nde-mcm .nde-hero-search input[type="search"] {
  height: 36px;
  font-size: 13px;
  width: 100%;
}
body.nde-mcm .nde-hero-dd {
  background: #fff;
  border: 1px solid var(--rule);
  border-top: 0;
  border-radius: 0 0 2px 2px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .12);
}
body.nde-mcm .nde-hero-dd a, body.nde-mcm .nde-hero-dd div { font-size: 12.5px; }
body.nde-mcm .nde-hero-cats a,
body.nde-mcm .nde-hero-hot a {
  display: inline-block;
  font-size: 12px;
  padding: 2px 0;
}
body.nde-mcm .nde-hero-hot { border-top: 1px solid var(--rule-lt); margin-top: 10px; padding-top: 8px; }

/* 首页四条线卡（Query Loop 卡片） */
body.nde-mcm .products-grid .wp-block-post-template { gap: 14px; }
body.nde-mcm .products-grid li {
  padding: 0;
  overflow: hidden;
  background: #fff;
}
body.nde-mcm .products-grid li:hover { border-color: var(--accent); }
body.nde-mcm .products-grid li .wp-block-post-featured-image {
  background: linear-gradient(180deg, #fafafa, #f0f0f0);
  border-bottom: 1px solid var(--rule-lt);
  padding: 14px;
  margin: 0;
}
body.nde-mcm .products-grid li .wp-block-post-title,
body.nde-mcm .products-grid li .wp-block-post-excerpt { padding: 0 12px; }
body.nde-mcm .products-grid li .wp-block-post-title { font-size: 13.5px; margin: 10px 0 4px; }
body.nde-mcm .products-grid li .wp-block-post-excerpt__excerpt { font-size: 12px; color: var(--muted); }

/* ---------- 6. 产品详情页 ---------- */
body.nde-mcm.single-product .entry-header { border-bottom: 1px solid var(--rule-lt); margin-bottom: 12px; padding-bottom: 6px; }
body.nde-mcm .nde-prod-img {
  border: 1px solid var(--rule);
  border-radius: 2px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f4f5f7 100%),
    repeating-linear-gradient(0deg, rgba(0,0,0,.02) 0 1px, transparent 1px 24px);
  padding: 10px;
  box-shadow: inset 0 1px 0 #fff;
}
body.nde-mcm .nde-prod-img img { border-radius: 0; }

/* 规格表：密集、细线、斑马纹、表头渐变 */
body.nde-mcm .entry-content table:not(.nde-cmp-table) {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--rule);
  margin: 10px 0 16px;
  font-size: 12px;
  background: #fff;
}
body.nde-mcm .entry-content table:not(.nde-cmp-table) thead th,
body.nde-mcm .entry-content table:not(.nde-cmp-table) tr:first-child th {
  background: linear-gradient(180deg, var(--hd-a), var(--hd-b));
  color: var(--ink-strong);
  font-weight: 700;
  text-align: left;
  border: 1px solid var(--rule);
  padding: 6px 9px;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: .2px;
}
body.nde-mcm .entry-content table:not(.nde-cmp-table) td,
body.nde-mcm .entry-content table:not(.nde-cmp-table) tbody th {
  border: 1px solid var(--rule-lt);
  padding: 5px 9px;
  vertical-align: top;
  font-size: 12px;
}
body.nde-mcm .entry-content table:not(.nde-cmp-table) tbody th {
  background: #f7f7f7;
  font-weight: 700;
  color: var(--ink-strong);
  white-space: nowrap;
}
body.nde-mcm .entry-content table:not(.nde-cmp-table) tr:nth-child(even) td { background: #fcfcfc; }

/* 同系列对比表 */
body.nde-mcm .nde-cmp-wrap { border: 1px solid var(--rule); border-radius: 2px; overflow: auto; background: #fff; }
body.nde-mcm .nde-cmp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
body.nde-mcm .nde-cmp-table th { background: linear-gradient(180deg, var(--hd-a), var(--hd-b)); border: 1px solid var(--rule); padding: 6px 8px; text-align: left; }
body.nde-mcm .nde-cmp-table td { border: 1px solid var(--rule-lt); padding: 5px 8px; }
body.nde-mcm .nde-cmp-table tr:nth-child(even) td { background: #fcfcfc; }

/* 等效件说明条 */
body.nde-mcm .poc-equiv {
  border: 1px solid #dcd2b0;
  border-left: 3px solid var(--gold);
  background: #fdfaf0;
  border-radius: 2px;
  padding: 8px 11px;
  font-size: 12px;
  color: #4a4a4a;
}

/* 询盘面板 */
body.nde-mcm .nde-inquiry,
body.nde-mcm .ff-el-group { border-radius: 2px; }
body.nde-mcm .nde-inquiry {
  border: 1px solid var(--rule);
  background: linear-gradient(180deg, #fbfbfb, #f3f3f3);
  padding: 14px;
}
body.nde-mcm .nde-inquiry h2, body.nde-mcm .nde-inquiry h3 { border: 0; margin-top: 0; }


/* ---------- 6b. 正文里那些"内联样式做的按钮"（CTA 链接）也要拟物化 ---------- */
body.nde-mcm .entry-content a[style*="background"],
body.nde-mcm .entry-content a[style*="#046bd2"],
body.nde-mcm .entry-content a.wp-block-button__link {
  background: linear-gradient(180deg, #21456f 0%, #16375c 52%, #0f2c52 100%) !important;
  background-color: #0f2c52 !important;
  border: 1px solid #0b2340 !important;
  border-radius: 2px !important;
  color: #fff !important;
  padding: 7px 15px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 1px 0 rgba(0, 0, 0, .08);
  display: inline-block;
}
body.nde-mcm .entry-content a[style*="background"]:hover { background: linear-gradient(180deg, #2a5484, #12304f) !important; }

/* 面包屑到标题之间的空白收紧 */
body.nde-mcm .site-content { padding-top: 8px !important; }
body.nde-mcm .single-product .entry-header,
body.nde-mcm .page .entry-header,
body.nde-mcm .single-post .entry-header { margin-top: 0 !important; padding-top: 0 !important; }
body.nde-mcm .entry-header + .entry-content { margin-top: 0 !important; }
body.nde-mcm .site-main > .post-inner,
body.nde-mcm .ast-separate-container .ast-article-post { margin-top: 0 !important; }


/* 隐形间隔器：Astra 的 #primary margin-top:50px + .ast-article-single 上下 31px */
body.nde-mcm #primary { margin-top: 10px !important; }
body.nde-mcm .ast-article-single { padding-top: 10px !important; padding-bottom: 14px !important; }
body.nde-mcm .ast-separate-container .ast-article-single { padding-left: 0 !important; padding-right: 0 !important; }

/* ---------- 7. /products/ 目录页（左栏 facet + 三列密集卡片） ---------- */
/* 页面自身是 flex：.nde-cat > .nde-side(250px) + .nde-main；不要改成 grid */
body.nde-mcm .nde-cat { display: flex !important; gap: 20px; align-items: flex-start; }
body.nde-mcm .nde-main-grid { display: block !important; width: 100% !important; }
body.nde-mcm .nde-main { flex: 1 1 auto !important; min-width: 0 !important; }

body.nde-mcm .nde-side {
  flex: 0 0 236px !important;
  width: 236px !important;
  border-right: 1px solid var(--rule-lt);
  border-bottom: 0;
  padding: 0 14px 10px 0 !important;
  font-size: 12px;
}
body.nde-mcm .nde-side h3,
body.nde-mcm .nde-side .nde-sec-h2,
body.nde-mcm .nde-side h4 {
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ink-strong);
  background: linear-gradient(180deg, var(--hd-a), var(--hd-b));
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 5px 8px;
  margin: 10px 0 0;
}
body.nde-mcm .nde-side button,
body.nde-mcm .nde-side .nde-cat-btn,
body.nde-mcm .nde-side a[data-cat] {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-strong);
  background: linear-gradient(180deg, #fff, #f3f3f3);
  border: 1px solid var(--rule);
  border-top: 0;
  border-radius: 0;
  box-shadow: inset 0 1px 0 #fff;
  padding: 6px 9px;
  margin: 0;
  text-transform: none;
  text-shadow: none;
}
body.nde-mcm .nde-side button:hover,
body.nde-mcm .nde-side a[data-cat]:hover { background: linear-gradient(180deg, #f7f9fc, #e9eef5); }
body.nde-mcm .nde-side button.is-active,
body.nde-mcm .nde-side a[data-cat].is-active {
  background: linear-gradient(180deg, #21456f, #0f2c52);
  color: #fff;
  border-color: #0b2340;
  font-weight: 700;
}
body.nde-mcm .nde-search { max-width: 100%; }
body.nde-mcm .nde-search input { height: 34px; font-size: 12.5px; }
body.nde-mcm .count-note { font-size: 12px; color: var(--muted); margin: 8px 0 10px; }

/* 结果卡片：三列密集网格 + 细线框（覆盖页面原来的圆角悬浮卡） */
/* 目录密度：宽屏一行 12 个（McMaster 式小图墙），逐级降到手机 3 个 */
body.nde-mcm .prod-grid .wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
}
@media (max-width: 1199px) { body.nde-mcm .prod-grid .wp-block-post-template { grid-template-columns: repeat(10, minmax(0, 1fr)) !important; } }
@media (max-width: 1023px) { body.nde-mcm .prod-grid .wp-block-post-template { grid-template-columns: repeat(8, minmax(0, 1fr)) !important; } }
@media (max-width: 819px)  { body.nde-mcm .prod-grid .wp-block-post-template { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; } }
@media (max-width: 619px)  { body.nde-mcm .prod-grid .wp-block-post-template { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
@media (max-width: 479px)  { body.nde-mcm .prod-grid .wp-block-post-template { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 5px !important; } }
body.nde-mcm .prod-grid .wp-block-post-template li {
  list-style: none !important;
  border: 1px solid var(--rule) !important;
  border-radius: 2px !important;
  background: #fff !important;
  box-shadow: none !important;
  transform: none !important;
  overflow: hidden;
  transition: border-color .12s ease;
}
body.nde-mcm .prod-grid .wp-block-post-template li:hover {
  border-color: var(--accent) !important;
  box-shadow: none !important;
  transform: none !important;
}
body.nde-mcm .prod-grid li .wp-block-post-featured-image {
  margin: 0 !important;
  padding: 4px !important;
  background: linear-gradient(180deg, #fafafa, #f0f0f0) !important;
  border-bottom: 1px solid var(--rule-lt);
  text-align: center;
}
body.nde-mcm .prod-grid li .wp-block-post-featured-image img { aspect-ratio: 3/2; object-fit: contain; }
body.nde-mcm .prod-grid li .wp-block-post-title {
  margin: 0 !important;
  padding: 4px 4px 5px !important;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 10px !important;
  line-height: 1.25;
  text-align: center;
}
/* 高密度下只留型号（规格行太窄放不下） */
@media (min-width: 1200px) { body.nde-mcm .prod-grid li .nde-kv { display: none !important; } }
body.nde-mcm .prod-grid li .wp-block-post-title a {
  white-space: normal !important;
  overflow: visible !important;
  word-break: break-all;      /* 62px 宽也要看全型号：允许折行，不截断 */
  font-size: 9.5px;
  letter-spacing: -.1px;
}
@media (max-width: 1199px) {
  body.nde-mcm .prod-grid li .wp-block-post-title a { font-size: 11px; letter-spacing: 0; }
}
body.nde-mcm .prod-grid li .wp-block-post-title a { font-weight: 700 !important; color: var(--accent) !important; text-decoration: none; }
body.nde-mcm .prod-grid li .wp-block-post-title a:hover { text-decoration: underline; }
body.nde-mcm .prod-grid li .nde-kv { padding: 3px 9px 9px !important; font-size: 11.5px !important; color: var(--muted) !important; }

@media (max-width: 1024px) {
  body.nde-mcm .nde-cat { flex-direction: column; }
  body.nde-mcm .nde-side { flex: 1 1 auto !important; width: 100% !important; border-right: 0; border-bottom: 1px solid var(--rule-lt); padding: 0 0 10px !important; }
  /* 列数由上面的密度阶梯统一控制，这里不再覆盖，避免旧规则把手机端压成 2 列 */
}

/* ---------- 8. 页脚 / 内链条 ---------- */
body.nde-mcm .site-footer,
body.nde-mcm .ast-small-footer { background: #fff; border-top: 1px solid var(--rule); }
body.nde-mcm .ast-small-footer, body.nde-mcm .ast-small-footer a { font-size: 11.5px; color: var(--muted); }
body.nde-mcm .poc-footer-links { border-top: 1px solid var(--rule-lt); padding-top: 12px; font-size: 12px; }
body.nde-mcm .poc-footer-links a { color: var(--link); }

/* ---------- 9. 自建挂件跟进皮肤 ---------- */
body.nde-mcm .nde-pl-fab {
  background: linear-gradient(180deg, #21456f 0%, #16375c 55%, #0f2c52 100%);
  border: 1px solid #0b2340;
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 2px 6px rgba(0, 0, 0, .18);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 13px;
  /* 深底必须白字：否则被 §3 通用 button 规则的 --ink-strong(#1b1b1b) 吃掉，字与底分不清 */
  color: #fff !important;
  letter-spacing: .2px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .35) !important;
}
body.nde-mcm .nde-pl-fab:hover,
body.nde-mcm .nde-pl-fab:focus-visible {
  background: linear-gradient(180deg, #2a5484 0%, #1b4270 55%, #122f56 100%) !important;
  color: #fff !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .35) !important;
}
body.nde-mcm .nde-pl-fab:active {
  background: linear-gradient(180deg, #0b1f3c 0%, #0d2444 100%) !important;
  color: #fff !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .35) !important;
}
body.nde-mcm .nde-pl-fab .nde-pl-count { border-radius: 2px; background: #fff; color: var(--accent) !important; font-weight: 700; text-shadow: none !important; }
body.nde-mcm .nde-pl-add {
  border-radius: 2px;
  border: 1px solid #9a9a9a;
  background: linear-gradient(180deg, #fff, #ececec);
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 #fff;
}
body.nde-mcm .nde-pl-add.is-added { background: linear-gradient(180deg, #f2f8f2, #e3efe3); border-color: #86a986; color: #255c2b; }
body.nde-mcm .nde-pl-panel { border-radius: 2px; }
body.nde-mcm .nde-pl-head {
  background: linear-gradient(180deg, var(--hd-a), var(--hd-b));
  border-bottom: 1px solid var(--rule);
  font-family: "Arial Narrow", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: .4px;
  font-size: 12px;
  color: var(--ink-strong);
}
body.nde-mcm .nde-pl-item { border-bottom: 1px solid var(--rule-lt); }
body.nde-mcm .nde-pl-foot { background: linear-gradient(180deg, #fafafa, #f1f1f1); border-top: 1px solid var(--rule); }
body.nde-mcm .nde-pl-rm { border: 1px solid #9a9a9a; background: linear-gradient(180deg, #fff, #eaeaea); border-radius: 2px; color: #555; }
body.nde-mcm .nde-lw-card { border-radius: 2px; }
body.nde-mcm .nde-lw-prev {
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: linear-gradient(180deg, #fffdf7, #fbf7ec);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
body.nde-mcm .nde-ck-card { border-radius: 2px; box-shadow: 0 3px 10px rgba(0, 0, 0, .14); }
body.nde-mcm .nde-ck-yes, body.nde-mcm .nde-ck-no { border-radius: 2px; }

/* ---------- 10. 响应式 ---------- */
@media (max-width: 1024px) {
  body.nde-mcm .nde-main-grid { grid-template-columns: 1fr; gap: 12px; }
  body.nde-mcm .nde-side { border-right: 0; border-bottom: 1px solid var(--rule-lt); padding: 0 0 10px; }
}
@media (max-width: 620px) {
  body.nde-mcm { font-size: 13px; }
  body.nde-mcm h1, body.nde-mcm .entry-title { font-size: 18px; }
  body.nde-mcm h2 { font-size: 15px; }
  body.nde-mcm .nde-grid li, body.nde-mcm .nde-main .card { grid-template-columns: 74px minmax(0, 1fr); gap: 10px; }
  body.nde-mcm .entry-content table:not(.nde-cmp-table) td,
  body.nde-mcm .entry-content table:not(.nde-cmp-table) th { padding: 5px 6px; font-size: 11.5px; }
}

/* ---------- 11. 页面标题去重 + 面包屑左对齐（根域名=目录后 "Home" 已无意义） ---------- */
body.nde-mcm.page .entry-header,
body.nde-mcm.page .entry-title { display: none !important; }
body.nde-mcm .hermes-breadcrumbs-wrap {
  display: block !important;
  width: 100% !important;
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding: 6px 20px !important;
  text-align: left !important;
  box-sizing: border-box !important;
}
/* 产品页不显示作者/日期（McMaster 零件页没有这些） */
body.nde-mcm.single-product .entry-meta,
body.nde-mcm.single-product .posted-by,
body.nde-mcm.single-product .ast-post-format- .entry-meta,
body.nde-mcm.single-product .post-meta { display: none !important; }
body.nde-mcm .hermes-breadcrumbs-wrap > * { text-align: left !important; }
body.nde-mcm .hermes-breadcrumbs-wrap nav { margin: 0 !important; }

/* ---------- 12. 产品详情页主图：图框跟随照片自身比例（不再强制正方形） ----------
   历史：曾把主图定死 180×180 方框 + contain，结果 1200×800 这类官方图被塞进方框里
   上下各空一条、产品显得又扁又小，看起来就像被“拉伸/压扁”。改成：图框由图片撑开，
   img 只给最大宽高上限、比例完全交给图片自己 → 不可能变形。 */
body.nde-mcm.single-product .nde-prod-img {
  float: left;
  width: auto !important;
  max-width: 252px !important;
  min-width: 0 !important;
  margin: 0 18px 12px 0 !important;
  padding: 6px !important;
  box-sizing: border-box !important;
  line-height: 0;
}
body.nde-mcm.single-product .nde-prod-img img {
  width: auto !important;
  height: auto !important;
  max-width: 240px !important;
  max-height: 240px !important;
  object-fit: contain !important;
  display: block;
  margin: 0 auto;
}
/* 详情页后续块回到整宽（规格表、对比表、询盘等） */
body.nde-mcm.single-product .entry-content > h2,
body.nde-mcm.single-product .entry-content > h3,
body.nde-mcm.single-product .entry-content > table,
body.nde-mcm.single-product .entry-content > .nde-cmp-wrap,
body.nde-mcm.single-product .entry-content > .nde-inquiry,
body.nde-mcm.single-product .entry-content > figure:not(.nde-prod-img),
body.nde-mcm.single-product .entry-content > div:not(.poc-equiv) { clear: both; }
@media (max-width: 620px) {
  body.nde-mcm.single-product .nde-prod-img { float: none; max-width: 100% !important; margin: 0 0 12px !important; }
  body.nde-mcm.single-product .nde-prod-img img { max-width: 100% !important; max-height: 300px !important; }
}

/* 无特色图的 55 个产品：给个占位格，避免图墙出现空白洞 */
body.nde-mcm .prod-grid li .wp-block-post-featured-image:empty,
body.nde-mcm .prod-grid li .wp-block-post-featured-image:not(:has(img)) {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.nde-mcm .prod-grid li .wp-block-post-featured-image:empty::after,
body.nde-mcm .prod-grid li .wp-block-post-featured-image:not(:has(img))::after {
  content: "No photo";
  font-size: 7.5px;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: #b0b0b0;
}

/* ---------- 13. 图墙缩略图：方框铺满，别在图片周围留大片空白 ---------- */
/* 行不再被最高的卡拉伸 */
body.nde-mcm .prod-grid .wp-block-post-template { align-items: start !important; }
/* 产品图 96% 是 1:1（650/676），图框必须也是正方形，否则方图左右各空一条 */
body.nde-mcm .prod-grid li .wp-block-post-featured-image {
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  display: block !important;
  height: auto !important;
  background: #fff;
}
body.nde-mcm .prod-grid li .wp-block-post-featured-image a {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  line-height: 0 !important;
}
/* contain 而非 cover：方框配方图本身就能铺满，不放大、不裁切、不越界 */
body.nde-mcm .prod-grid li .wp-block-post-featured-image img {
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  aspect-ratio: auto !important;
  display: block !important;
  transform: none !important;
}

/* ---------- 14. 右下角避让：固定元素改「竖向三层」堆叠 ----------
   历史：回到顶部原本 right:30 bottom:30，与料号按钮(right:18 bottom:18)完全重叠。
   中途试过放到按钮左侧(固定 right:128px)，但料号按钮加了计数徽章后会变宽(95→126px)，
   又把回到顶部压住。固定横向偏移永远不可靠 —— 改成同一条右边缘竖向堆叠：
     料号按钮  bottom 18（高约 34–39）
     加单药丸  bottom 68（高 28）
     回到顶部  bottom 108（34×34）
   非产品页没有料号挂件，回到顶部回到常规的 bottom 18。 */
body.nde-mcm #ast-scroll-top {
  right: 18px !important;
  bottom: 108px !important;
  width: 34px !important;
  height: 34px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 2px !important;
  background: linear-gradient(180deg, #fff 0%, #f2f2f2 52%, #e6e6e6 100%) !important;
  border: 1px solid #9a9a9a !important;
  box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0, 0, 0, .05) !important;
  color: #0f2c52 !important;
  z-index: 99989 !important;
}
/* 页面没有料号挂件（首页/新闻/关于）→ 回到常规底部位置 */
body.nde-mcm:not(:has(.nde-pl-fab)) #ast-scroll-top {
  bottom: 18px !important;
}
/* 料号清单面板展开时（body.nde-pl-open）：面板会盖住回到顶部，直接隐掉别露半截 */
body.nde-mcm #ast-scroll-top { transition: opacity .16s ease, transform .16s ease; }
body.nde-mcm.nde-pl-open #ast-scroll-top {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(8px) !important;
}
body.nde-mcm #ast-scroll-top:hover {
  background: linear-gradient(180deg, #f7f9fc, #e9eef5) !important;
  border-color: #0f2c52 !important;
}
body.nde-mcm #ast-scroll-top .ast-icon,
body.nde-mcm #ast-scroll-top svg { color: #0f2c52 !important; fill: #0f2c52 !important; }
body.nde-mcm #ast-scroll-top svg { width: 18px; height: auto; }
@media (max-width: 620px) {
  body.nde-mcm #ast-scroll-top { right: 14px !important; bottom: 104px !important; width: 30px !important; height: 30px !important; }
  body.nde-mcm:not(:has(.nde-pl-fab)) #ast-scroll-top { bottom: 14px !important; }
  body.nde-mcm #ast-scroll-top svg { width: 15px; }
}

/* ---------- 15. 手机端规格表瘦身：Unit / Test 两列不再白占宽度 ----------
   手机竖屏下 4 列表格里 Parameter + Value 被挤成窄条，而 Unit / Test/Load Condition
   两列里往往全是「—」。做法：spec-table-mobile.js 给“整列都是—的列”打上 .nde-hide-cN，
   手机端整列隐藏；有真实内容的列则压窄 + 缩小字号。 */
@media (max-width: 640px) {
  body.nde-mcm .entry-content table:not(.nde-cmp-table) {
    table-layout: fixed;
    width: 100% !important;
    font-size: 11.5px;
  }
  body.nde-mcm .entry-content table:not(.nde-cmp-table) th,
  body.nde-mcm .entry-content table:not(.nde-cmp-table) td {
    padding: 5px 4px !important;
    word-break: break-word;
    line-height: 1.35;
  }
  /* 第 1 列 Parameter 固定占比，第 2 列 Value 吃掉剩余 */
  body.nde-mcm .entry-content table:not(.nde-cmp-table) tr > *:nth-child(1) { width: 30% !important; }
  /* 有真实内容时才出现的窄列 */
  body.nde-mcm .entry-content table:not(.nde-cmp-table) tr > *:nth-child(3) {
    width: 34px !important; text-align: center; font-size: 10.5px;
  }
  body.nde-mcm .entry-content table:not(.nde-cmp-table) tr > *:nth-child(4) {
    width: 74px !important; font-size: 10.5px;
  }
  /* 整列都是「—」→ 整列不占位 */
  body.nde-mcm .entry-content table.nde-hide-c3 tr > *:nth-child(3),
  body.nde-mcm .entry-content table.nde-hide-c4 tr > *:nth-child(4),
  body.nde-mcm .entry-content table.nde-hide-c5 tr > *:nth-child(5),
  body.nde-mcm .entry-content table.nde-hide-c6 tr > *:nth-child(6) { display: none !important; }
}
