/**
 * KEMAIXI · 科技感视觉增强层 v1.0.0
 * 设计语言：深海军蓝 #0B2A4A / 深 #081E36 / 电光青 #00A3E0 / 品牌蓝 #0E7BD6
 * 页面内容为内联样式构建，本层通过属性选择器精准叠加：
 *   - 壳层宽度 645px -> 1240px（修复内容被压窄）
 *   - 全宽分区统一水平安全边距（修复贴边）
 *   - 分区节奏 / 暗色纹理 / 卡片与按钮交互 / 字阶提升
 */

:root {
	--kmx-navy: #0b2a4a;
	--kmx-deep: #081e36;
	--kmx-cyan: #00a3e0;
	--kmx-blue: #0e7bd6;
	--kmx-line: #e3e7ec;
	--kmx-shell: 1240px;
	--kmx-pad: 24px;
	--kmx-gutter: max(24px, calc((100% - 1240px) / 2));
	--kmx-shadow: 0 24px 48px -24px rgba(8, 30, 54, 0.28);
	--kmx-grid-line: rgba(255, 255, 255, 0.05);
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 88px;
	-webkit-text-size-adjust: 100%;
}

body {
	/* TT5 默认 body 继承 large 流体字号（桌面端 22px），与正文内联字号（12~15.5px）比例失衡，统一收回 */
	font-size: 16.5px !important;
	font-family: Manrope, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif !important;
	font-weight: 400;
	line-height: 1.7;
}

/*
 * 文本选区不再绘制高亮色块（用户要求去掉「选中高亮」）：
 * 文字照常可选中、可复制，只是不再出现青底白字的色块。
 * 如需恢复品牌色选区：background 改回 var(--kmx-cyan)、color 改回 #fff。
 */
::selection {
	background: transparent;
	color: inherit;
}

/* ============ 1. 壳层与分区节奏 ============ */

/* 约束容器的子元素不再被 645px 压窄 */
.entry-content .is-layout-constrained > *,
footer.wp-block-template-part .is-layout-constrained > * {
	max-width: var(--kmx-shell);
	margin-left: auto;
	margin-right: auto;
}

/* 内层容器成为统一壳层 */
.entry-content .wp-block-group__inner-container.is-layout-constrained,
footer.wp-block-template-part .wp-block-group__inner-container.is-layout-constrained {
	max-width: calc(var(--kmx-shell) + 48px);
	margin-inline: auto;
}

/* 嵌套的内层容器不被上一条规则二次压窄 */
.entry-content .is-layout-constrained > .wp-block-group__inner-container,
footer.wp-block-template-part .is-layout-constrained > .wp-block-group__inner-container {
	max-width: calc(var(--kmx-shell) + 48px);
}

/* 独立正文段落限制阅读宽度（内联已设 max-width 的不受影响） */
.entry-content .is-layout-constrained > p {
	max-width: 880px;
}

/* 全宽分区统一水平安全边距（覆盖内联的 padding-left/right，纵向间距保留内联值） */
.entry-content > div {
	padding-left: var(--kmx-gutter) !important;
	padding-right: var(--kmx-gutter) !important;
}

@supports selector(:has(*)) {
	/* 含约束内层容器的分区由内层负责对齐，不叠加边距 */
	.entry-content > div:has(> .is-layout-constrained) {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
}

/* 纵向节奏：通用分区 56 -> 88~104；页首横幅 64 -> 84~116 */
.entry-content div[style*="padding:56px 0"] {
	padding-top: clamp(72px, 8.5vw, 104px) !important;
	padding-bottom: clamp(72px, 8.5vw, 104px) !important;
}

.entry-content div[style*="background-color:#0B2A4A"][style*="padding:64px 0"] {
	padding-top: clamp(80px, 9.5vw, 116px) !important;
	padding-bottom: clamp(80px, 9.5vw, 116px) !important;
}

.entry-content div[style*="background:#081E36"] {
	padding-top: 44px !important;
	padding-bottom: 44px !important;
}

/* ============ 2. 暗色分区 · 科技纹理 ============ */

.entry-content div[style*="background"][style*="#0B2A4A"],
.entry-content div[style*="background"][style*="#081E36"],
footer.wp-block-template-part div[style*="background-color:#0B2A4A"] {
	position: relative;
	z-index: 0;
	overflow: hidden;
}

/* 网格坐标 + 青色辉光，营造工程图纸质感 */
.entry-content div[style*="background"][style*="#0B2A4A"]::before,
.entry-content div[style*="background"][style*="#081E36"]::before,
footer.wp-block-template-part div[style*="background-color:#0B2A4A"]::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background-image:
		radial-gradient(720px 320px at 82% 12%, rgba(0, 163, 224, 0.16), transparent 62%),
		radial-gradient(560px 280px at 6% 108%, rgba(14, 123, 214, 0.14), transparent 60%),
		linear-gradient(var(--kmx-grid-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--kmx-grid-line) 1px, transparent 1px);
	background-size: auto, auto, 46px 46px, 46px 46px;
}

/* 顶部青色能量线 */
.entry-content div[style*="background"][style*="#0B2A4A"]::after,
footer.wp-block-template-part div[style*="background-color:#0B2A4A"]::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(90deg, transparent 4%, rgba(0, 163, 224, 0.85) 32%, rgba(14, 123, 214, 0.9) 58%, transparent 96%);
}

/* ============ 3. 首页主视觉 ============ */

.entry-content div[style*="linear-gradient(135deg,#0B2A4A"] {
	padding-top: clamp(96px, 11vw, 148px) !important;
	padding-bottom: clamp(88px, 10vw, 132px) !important;
}

.entry-content div[style*="linear-gradient(135deg,#0B2A4A"] > p[style*="letter-spacing"] {
	animation: kmx-rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) 0.05s both;
}

.entry-content h1[style*="font-size:44px"] {
	font-size: clamp(34px, 3.9vw, 52px) !important;
	line-height: 1.18 !important;
	letter-spacing: -0.015em;
	text-wrap: balance;
	animation: kmx-rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) 0.15s both;
}

.entry-content div[style*="linear-gradient(135deg,#0B2A4A"] > p:not([style*="letter-spacing"]) {
	animation: kmx-rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) 0.28s both;
}

.entry-content div[style*="linear-gradient(135deg,#0B2A4A"] > div {
	animation: kmx-rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) 0.4s both;
}

@keyframes kmx-rise {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* 页眉式小标（KEMAIXI · … / PRODUCTS …）：等宽字体强化工程感 */
.entry-content p[style*="letter-spacing:.18em"],
.entry-content p[style*="letter-spacing:.24em"] {
	font-family: Consolas, "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
	font-weight: 600;
}

.entry-content p[style*="letter-spacing:.18em"]::before,
.entry-content p[style*="letter-spacing:.24em"]::before {
	content: "";
	display: inline-block;
	width: 22px;
	height: 1px;
	margin-right: 10px;
	vertical-align: middle;
	background: linear-gradient(90deg, transparent, currentColor);
}

/* 页面横幅标题（内页 H1 34px） */
.entry-content h1[style*="font-size:34px"] {
	font-size: clamp(28px, 3.1vw, 42px) !important;
	letter-spacing: -0.01em;
	animation: kmx-rise 0.65s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

/* 分区标题 26 -> 30，前置品牌竖条 */
.entry-content h2[style*="font-size:26px"] {
	font-size: clamp(23px, 2.2vw, 30px) !important;
	letter-spacing: -0.01em;
	line-height: 1.3;
}

.entry-content h2[style*="font-size:26px"]::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 0.92em;
	border-radius: 3px;
	margin-right: 14px;
	vertical-align: -0.08em;
	background: linear-gradient(180deg, var(--kmx-blue), var(--kmx-cyan));
	box-shadow: 0 0 12px rgba(0, 163, 224, 0.45);
}

/* ============ 4. 数据带 ============ */

.entry-content p[style*="font-size:38px"] {
	font-size: clamp(38px, 3.6vw, 48px) !important;
	font-variant-numeric: tabular-nums;
	background: linear-gradient(180deg, #8fd8ff 0%, var(--kmx-cyan) 78%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	filter: drop-shadow(0 0 18px rgba(0, 163, 224, 0.35));
}

/* ============ 5. 卡片 ============ */

/* 产品/能力卡（border-top 3px 强调线） */
.entry-content div[style*="border-top:3px solid"] {
	border-radius: 12px !important;
	border-color: var(--kmx-line);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.entry-content div[style*="border-top:3px solid"]:hover {
	transform: translateY(-6px);
	border-color: #bcd6ea;
	box-shadow: var(--kmx-shadow);
}

/* 卡片图标芯片（三类轮换：CPU / 网络拓扑 / 模块 IO） */
.entry-content div[style*="border-top:3px solid"]::before {
	content: "";
	display: block;
	width: 46px;
	height: 46px;
	margin-bottom: 16px;
	border-radius: 12px;
	background-color: var(--kmx-blue);
	background-image: var(--kmx-icon, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.7' stroke-linecap='round'%3E%3Crect x='6' y='6' width='12' height='12' rx='2'/%3E%3Crect x='10' y='10' width='4' height='4'/%3E%3Cpath d='M9 3v3M15 3v3M9 18v3M15 18v3M3 9h3M3 15h3M18 9h3M18 15h3'/%3E%3C/svg%3E")),
		linear-gradient(135deg, #0e7bd6, #00a3e0);
	background-repeat: no-repeat, no-repeat;
	background-position: center, center;
	background-size: 26px 26px, auto;
	box-shadow: 0 10px 22px -10px rgba(0, 163, 224, 0.65), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.entry-content div[style*="border-top:3px solid"]:nth-child(3n + 2)::before {
	--kmx-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='5' cy='6' r='2.2'/%3E%3Ccircle cx='19' cy='6' r='2.2'/%3E%3Ccircle cx='12' cy='18' r='2.2'/%3E%3Cpath d='M6.6 7.6L10.8 16M17.4 7.6L13.2 16M7.2 6h9.6'/%3E%3C/svg%3E");
}

.entry-content div[style*="border-top:3px solid"]:nth-child(3n + 3)::before {
	--kmx-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='7' height='8' rx='1.5'/%3E%3Crect x='14' y='8' width='7' height='8' rx='1.5'/%3E%3Cpath d='M10 12h4M12 4v2M12 18v2'/%3E%3C/svg%3E");
}

/* 应用领域小卡 */
.entry-content div[style*="padding:22px 20px"] {
	border-radius: 12px !important;
	transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.entry-content div[style*="padding:22px 20px"]:hover {
	transform: translateY(-4px);
	border-color: rgba(0, 163, 224, 0.55);
	box-shadow: 0 18px 34px -20px rgba(11, 42, 74, 0.35);
}

.entry-content div[style*="width:34px;height:3px"] {
	transition: width 0.25s ease, background 0.25s ease;
}

.entry-content div[style*="padding:22px 20px"]:hover div[style*="width:34px;height:3px"],
.entry-content div[style*="width:34px;height:3px"]:hover {
	width: 52px !important;
	background: linear-gradient(90deg, var(--kmx-blue), var(--kmx-cyan)) !important;
}

/* ============ 6. 按钮与链接 ============ */

.entry-content a[style*="background:#0E7BD6"] {
	background: linear-gradient(135deg, var(--kmx-blue) 0%, var(--kmx-cyan) 100%) !important;
	box-shadow: 0 12px 26px -12px rgba(14, 123, 214, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.entry-content a[style*="background:#0E7BD6"]:hover {
	transform: translateY(-2px);
	filter: brightness(1.08);
	box-shadow: 0 16px 32px -12px rgba(0, 163, 224, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.entry-content a[style*="border:1px solid rgba(255,255,255,.4)"] {
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.entry-content a[style*="border:1px solid rgba(255,255,255,.4)"]:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.75) !important;
	transform: translateY(-2px);
}

/* 文字链接「了解详情 →」 */
.entry-content a[style*="color:#0E7BD6"] {
	transition: color 0.2s ease;
	text-underline-offset: 5px;
}

.entry-content a[style*="color:#0E7BD6"]:hover {
	color: var(--kmx-cyan);
	text-decoration: underline;
}

/* ============ 7. 页头 / 页脚 ============ */

header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 99;
}

/* 去掉页头与内容之间的 19.2px blockGap 白缝（TT5 给 main 加的 margin-top）：
   全站各页首块均自带深色底与留白，顶到页头下沿视觉更整体 */
.wp-site-blocks > main.wp-block-group {
	margin-top: 0 !important;
}

/* 页头壳层居中 + 安全边距（修复站点名/切换器贴边裁切） */
header.wp-block-template-part > .wp-block-group > .wp-block-group {
	max-width: 1388px;
	margin-inline: auto;
	padding-left: var(--kmx-pad);
	padding-right: var(--kmx-pad);
}

/* 语言切换器：一体化分段控件（容器承载外观，当前语言段内部高亮，中英文页通用） */
header .wp-block-polylang-language-switcher {
	display: flex;
	flex-wrap: nowrap;
	gap: 4px;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 3px;
	background: #F2F6FA;
	border: 1px solid var(--kmx-line);
	border-radius: 999px;
}

header .wp-block-polylang-language-switcher .lang-item {
	list-style: none;
	margin: 0;
}

header .wp-block-polylang-language-switcher .lang-item a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 15px;
	border-radius: 999px;
	font-size: var(--kmx-fs-lang);
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.02em;
	color: var(--kmx-navy);
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease,
		transform 0.12s ease;
}

/* EN 为全大写拉丁字母：字距略收，与中文段视觉宽度平衡 */
header .wp-block-polylang-language-switcher .lang-item a[lang="en-US"] {
	letter-spacing: 0.05em;
}

/* 当前语言段：常驻高亮（悬停不再变化） */
header .wp-block-polylang-language-switcher .lang-item.current-lang a {
	background: linear-gradient(135deg, var(--kmx-blue), var(--kmx-cyan));
	color: #fff;
	box-shadow: 0 4px 12px -6px rgba(0, 163, 224, 0.55);
}

/* 语言切换：按下仅 1px 按压手感；当前语言段加内描边 */
header .wp-block-polylang-language-switcher .lang-item a:active {
	transform: translateY(1px) scale(0.985);
}

header .wp-block-polylang-language-switcher .lang-item.current-lang a {
	box-shadow: 0 4px 12px -6px rgba(0, 163, 224, 0.55),
		inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

header.wp-block-template-part > .wp-block-group {
	background: rgba(255, 255, 255, 0.88) !important;
	-webkit-backdrop-filter: blur(12px) saturate(1.5);
	backdrop-filter: blur(12px) saturate(1.5);
	box-shadow: 0 1px 0 rgba(11, 42, 74, 0.06), 0 10px 30px -22px rgba(11, 42, 74, 0.35);
}

header .wp-block-site-title a {
	background: linear-gradient(100deg, var(--kmx-navy) 30%, var(--kmx-blue) 75%, var(--kmx-cyan));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	transition: filter 0.2s ease;
}

header .wp-block-site-title a:hover {
	filter: brightness(1.15);
}

/*
 * 页头导航标签：常驻标记只有两档——「当前页」与「当前栏目」。
 * 鼠标悬停与按下不再产生任何高亮（用户要求去掉悬停高亮）：
 * 不变色、不展开指示条、不加底色；只保留 1px 下沉的点击手感。
 * 底边渐变指示条（::after，不占位、不改变页头高度）仅服务于常驻标记。
 */
header .wp-block-navigation-item__content {
	position: relative;
	transition: color 0.2s ease, transform 0.12s ease;
}

/* 指示条：默认收起；只有当前页 / 当前栏目（见下方规则）常驻显示 */
header .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -2px;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--kmx-blue), var(--kmx-cyan));
	opacity: 0;
	transform: scaleX(0.2);
	transform-origin: 50% 50%;
	transition: transform 0.24s cubic-bezier(0.2, 0.7, 0.3, 1), opacity 0.18s ease;
	pointer-events: none;
}

/* 按下：仅 1px 下沉，不带任何颜色 / 指示条变化 */
header .wp-block-navigation-item__content:active {
	transform: translateY(1px);
}

/* 当前页（Core 依 path 完全匹配输出 current-menu-item）：常驻指示条 + 加粗 */
header .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
	color: var(--kmx-blue);
	font-weight: 700;
}

header .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content::after {
	opacity: 1;
	transform: scaleX(1);
}

/* 当前所在栏目（父级；由 inc/tech-ui.php 按 URL 前缀加 kmx-current-section）：弱高亮 */
header .wp-block-navigation-item.kmx-current-section > .wp-block-navigation-item__content {
	color: var(--kmx-blue);
}

header .wp-block-navigation-item.kmx-current-section > .wp-block-navigation-item__content::after {
	opacity: 0.42;
	transform: scaleX(1);
}

/*
 * 鼠标交互（悬停 / 按下 / 点击后）不出下划线、不画描边框：
 * - 下划线来自 TT5 theme.json 生成的
 *   `:root :where(.wp-block-navigation a:where(:not(.wp-element-button)):hover){text-decoration:underline}`，
 *   悬停提示已由品牌色 + 指示条承担，这里压回 none（!important 保证压过生成规则的并列特异性）；
 * - 方框来自 TT5 style.css 的 `:where(.wp-site-blocks *:focus){outline-width:2px;outline-style:solid}`，
 *   鼠标点击后 :focus 照样触发、颜色取 currentColor（近黑 #111），非常突兀——
 *   用 :focus:not(:focus-visible) 只关鼠标路径，键盘 Tab 的焦点环不受影响。
 */
header .wp-block-navigation-item__content,
header .wp-block-navigation-item__content.wp-block-navigation-item__content:hover,
header .wp-block-navigation-item__content.wp-block-navigation-item__content:focus,
header .wp-block-navigation-item__content.wp-block-navigation-item__content:active,
header .wp-block-polylang-language-switcher .lang-item a,
header .wp-block-polylang-language-switcher .lang-item a:hover,
header .wp-block-polylang-language-switcher .lang-item a:focus,
header .wp-block-polylang-language-switcher .lang-item a:active {
	text-decoration: none !important;
}

/* 鼠标点击后的方角描边框：页头所有链接统一关闭（键盘 Tab 仍走 :focus-visible） */
header a:focus:not(:focus-visible) {
	outline: none;
}

/* 菜单/切换器文字不可拖选（双击不再出现选区色块），触屏点按高亮一并去掉 */
header .wp-block-navigation,
header .wp-block-polylang-language-switcher {
	-webkit-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

/* 键盘可达：统一焦点环（圆角 + 品牌色；双类写法压过 TT5 的 outline-offset:4px） */
header .wp-block-navigation-item__content.wp-block-navigation-item__content:focus-visible,
header .wp-block-polylang-language-switcher .lang-item a:focus-visible {
	outline: 2px solid var(--kmx-blue);
	outline-offset: 3px;
	border-radius: 4px;
}

/* 下拉子菜单：横条在竖排菜单里会错位，常驻标记改用整行浅底 + 左侧竖条 */
header .wp-block-navigation__submenu-container .wp-block-navigation-item__content::after {
	display: none;
}

header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

/* 子菜单内只有「当前页」保留常驻高亮；鼠标悬停不再高亮 */
header .wp-block-navigation__submenu-container .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
	background: rgba(0, 163, 224, 0.1);
	box-shadow: inset 3px 0 0 0 var(--kmx-blue);
	color: var(--kmx-blue);
}

/* 移动端全屏菜单：不用横条（悬停不再高亮） */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content::after {
	display: none;
}

/* 尊重减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
	header .wp-block-navigation-item__content,
	header .wp-block-navigation-item__content::after,
	header .wp-block-polylang-language-switcher .lang-item a {
		transition: none;
	}
}

footer.wp-block-template-part {
	margin-top: 0;
}

footer.wp-block-template-part p a {
	transition: color 0.2s ease;
	text-underline-offset: 4px;
}

footer.wp-block-template-part p a:hover {
	color: var(--kmx-cyan) !important;
}

/* 页脚快捷导航 / 联系清单（wp:html 结构）同样获得品牌色悬停反馈 */
footer.wp-block-template-part a {
	transition: color 0.2s ease;
}

footer.wp-block-template-part div a:hover {
	color: var(--kmx-cyan) !important;
}

/* ============ 8. 统一字阶 ============ */

/*
 * 页面正文由内联样式构建，字号原先在 12~15.5px 间零散分布（全站 20 种），
 * 而主题 body 继承 TT5 的 large 流体字号（桌面端 22px），两者比例约 1.8，
 * 观感上「外围字过大、正文过小」。这里收敛为一条 7 级字阶：
 *   12.5 标签（眉标/计数/日期） · 13.5 注释 · 15 次级正文与链接
 *   15.5 正文 · 16.5 卡片标题 · 20 小标题 · 30 分区标题 · 42/52 主标题
 * 行内样式不带 !important，作者样式的 !important 可直接覆盖，无需改动页面内容。
 */

:root {
	--kmx-fs-label: 12.5px;
	--kmx-fs-caption: 13.5px;
	--kmx-fs-sub: 15px;
	--kmx-fs-body: 15.5px;
	--kmx-fs-lead: 16px;
	--kmx-fs-card: 16.5px;
	--kmx-fs-h3: 20px;

	/* 页头字阶：站名/导航整体放大 20%，语言切换器应用户要求调小（15 → 13px） */
	--kmx-fs-brand: 23.5px;
	--kmx-fs-nav: 18.5px;
	--kmx-fs-lang: 13px;
	/* 导航项间距：应用户要求放宽（23 → 30px），窄档同步收窄保单行 */
	--kmx-nav-gap: 30px;
	/* 页头 logo 宽度：v1.0.17 起改为变量，供整站等比缩放脚本按「等效排版宽」覆写
	   （媒体查询看的是视口宽，缩放后与实际排版宽不一致，必须由脚本统一给值） */
	--kmx-logo-w: 171px;
}

/* 窄屏档位：视口收窄时按 +10% 取档，避免 7 项一级导航提前折行（原折行点在 858px） */
@media (max-width: 1000px) {
	:root {
		--kmx-fs-brand: 21.5px;
		--kmx-fs-nav: 17px;
		--kmx-fs-lang: 12px;
		--kmx-nav-gap: 20px;
	}

	/* 分段控件窄档：收内边距防断行 */
	header .wp-block-polylang-language-switcher .lang-item a {
		padding: 3px 10px;
	}
}

/* 站名与导航与正文字阶对齐 */
header .wp-block-site-title a {
	font-size: var(--kmx-fs-brand) !important;
	letter-spacing: -0.01em;
	white-space: nowrap;
}

.wp-block-site-title a {
	font-size: 19.5px !important;
	letter-spacing: -0.01em;
}

/* 站点 logo：老站同步字标（透明底 PNG 285×100，页头内 171×60 显示 = 原 114×40 放大 50%） */
header .wp-block-site-logo {
	display: flex;
	align-items: center;
	margin: 0;
}

header .wp-block-site-logo a {
	display: block;
	line-height: 0;
	text-decoration: none;
}

header .wp-block-site-logo img {
	display: block;
	width: var(--kmx-logo-w, 171px);
	height: auto;
}

/*
 * 以下窄屏档仅在「缩放未生效」时起作用（移动端 ≤640px 与 ?kmxz=0 逃生口）。
 * 缩放生效时，等效排版宽 = 视口宽 / zoom，与视口宽并不相等，媒体查询会误判，
 * 因此这些值由 inc/tech-ui.php 的缩放脚本按等效排版宽直接写到 <html> 上覆盖。
 */
@media (max-width: 1080px) {
	:root {
		--kmx-logo-w: 130px;
		--kmx-nav-gap: 22px;
	}
}

@media (max-width: 1000px) {
	:root {
		--kmx-logo-w: 104px;
		--kmx-fs-nav: 16px;
		--kmx-nav-gap: 14px;
	}
}

@media (max-width: 900px) {
	:root {
		--kmx-logo-w: 92px;
		--kmx-fs-nav: 14.5px;
		--kmx-nav-gap: 9px;
	}
}

@media (max-width: 768px) {
	:root {
		--kmx-logo-w: 84px;
		--kmx-fs-nav: 13.5px;
		--kmx-nav-gap: 7px;
	}
}

header .wp-block-navigation-item__content,
header .wp-block-navigation-item__label {
	font-size: var(--kmx-fs-nav) !important;
}

/* 一级导航项间距（子菜单为绝对定位，不受影响） */
header .wp-block-navigation__container {
	column-gap: var(--kmx-nav-gap) !important;
}

/* 页脚由模板内联字号控制，一并对齐字阶（页脚品牌名保持 19.5px，仅页头放大 20%） */
footer.wp-block-template-part .wp-block-paragraph {
	font-size: 14.5px !important;
}

footer.wp-block-template-part .wp-block-paragraph[style*="font-weight:600"] {
	font-size: var(--kmx-fs-sub) !important;
}

footer.wp-block-template-part .wp-block-site-title,
footer.wp-block-template-part .wp-block-site-title a {
	font-size: 19.5px !important;
}

/* 眉标 / 计数类小字 */
.entry-content [style*="font-size:12px"] {
	font-size: var(--kmx-fs-label) !important;
}

/* 卡片注释、日期、型号副标题 */
.entry-content [style*="font-size:12.5px"] {
	font-size: var(--kmx-fs-caption) !important;
}

/* 卡片注释、次要标注 */
.entry-content [style*="font-size:13px"] {
	font-size: var(--kmx-fs-caption) !important;
}

.entry-content [style*="font-size:13.5px"] {
	font-size: 14px !important;
}

/* 次级正文 / 链接 / 分区说明 */
.entry-content [style*="font-size:14px"] {
	font-size: var(--kmx-fs-sub) !important;
}

/* 正文段落 / 列表项 / 型号卡标题 */
.entry-content [style*="font-size:14.5px"] {
	font-size: var(--kmx-fs-body) !important;
}

/* 横幅副标题 */
.entry-content [style*="font-size:15px"] {
	font-size: var(--kmx-fs-lead) !important;
}

/* 卡片标题 */
.entry-content [style*="font-size:15.5px"] {
	font-size: var(--kmx-fs-card) !important;
}

.entry-content [style*="font-size:16px"],
.entry-content [style*="font-size:16.5px"] {
	font-size: 17px !important;
}

.entry-content [style*="font-size:17px"] {
	font-size: 18px !important;
}

.entry-content [style*="font-size:19px"] {
	font-size: var(--kmx-fs-h3) !important;
}

.entry-content [style*="font-size:22px"] {
	font-size: 24px !important;
}

.entry-content [style*="font-size:24px"] {
	font-size: 26px !important;
}

.entry-content [style*="font-size:27px"] {
	font-size: 30px !important;
}

/* 行高随之收敛，避免字号上调后显得松散 */
.entry-content [style*="line-height:1.9"] {
	line-height: 1.8 !important;
}

.entry-content [style*="line-height:2"] {
	line-height: 1.9 !important;
}

/* 筛选 chips 与类别卡提示同步字阶 */
.kmx-chip {
	font-size: var(--kmx-fs-caption) !important;
}

.kmx-cat-view {
	font-size: var(--kmx-fs-caption) !important;
}

/* ============ 9. 响应式 ============ */

/* 模板双语片段：按 <html lang> 显隐 */
html[lang^="en"] .kmx-lang-zh {
	display: none;
}

html:not([lang^="en"]) .kmx-lang-en {
	display: none;
}

/* 新闻归档(home 模板):横幅全宽 + 列表壳层 */
main.wp-block-group.is-layout-constrained > .wp-block-query {
	max-width: calc(var(--kmx-shell) + 48px);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--kmx-pad);
	padding-right: var(--kmx-pad);
	box-sizing: border-box;
}

/* 博客/归档页留白 */
body.blog main,
body.archive main {
	padding-top: 72px;
	padding-bottom: 104px;
}

/* ============ 产品型号类别筛选 ============ */

.kmx-chip {
	appearance: none;
	border: 1px solid #C9D4DE;
	background: #fff;
	color: #0B2A4A;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1;
	padding: 8px 16px;
	border-radius: 999px;
	cursor: pointer;
	transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
}

.kmx-chip:hover {
	border-color: #0E7BD6;
	color: #0E7BD6;
}

.kmx-chip.on {
	background: linear-gradient(135deg, #0E7BD6, #00A3E0);
	border-color: transparent;
	color: #fff;
	box-shadow: 0 4px 12px rgba(14, 123, 214, .28);
}

.kmx-cat-clickable {
	cursor: pointer;
	transition: border-color .2s, box-shadow .2s, transform .2s;
}

.kmx-cat-clickable:hover {
	border-color: #0E7BD6 !important;
	box-shadow: 0 8px 22px rgba(14, 123, 214, .14);
	transform: translateY(-2px);
}

.kmx-cat-clickable h3 {
	transition: color .18s;
}

.kmx-cat-clickable:hover h3 {
	color: #0E7BD6 !important;
}

.kmx-cat-view {
	display: block;
	margin-top: 10px;
	font-size: 13px;
	font-weight: 600;
	color: #00A3E0;
	user-select: none;
}

.kmx-cat-view:hover {
	text-decoration: underline;
}

/* ---- 类别页型号区：右侧「按系列筛选」竖栏（3c 注入） ---- */

.kmx-models-row {
	display: flex;
	align-items: flex-start;
	gap: 24px;
}

.kmx-models-row > div[style*="display:grid"] {
	flex: 1 1 auto;
	min-width: 0;
}

.kmx-serail {
	flex: 0 0 216px;
	position: sticky;
	top: 96px;
	background: #fff;
	border: 1px solid #E3E7EC;
	border-radius: 12px;
	padding: 16px 12px;
	box-sizing: border-box;
	box-shadow: 0 4px 18px rgba(11, 42, 74, .05);
}

.kmx-serail__grp + .kmx-serail__grp {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid #EEF1F4;
}

.kmx-serail__sub {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	color: #818A94;
	margin: 0 0 8px;
	padding-left: 8px;
}

/* 短值维度（屏幕尺寸、芯片组…）改成两列小按钮，避免竖栏被拉得过长。
   JS 对 grid:true 的维度自动加 .is-grid，新增维度无需再改这里。 */
.kmx-serail__grp.is-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
}

.kmx-serail__grp.is-grid .kmx-serail__sub {
	grid-column: 1 / -1;
}

.kmx-serail__grp.is-grid .kmx-serail__btn {
	justify-content: center;
	padding: 8px 6px;
	font-size: 13px;
}

.kmx-serail__reset {
	appearance: none;
	display: block;
	width: 100%;
	margin-top: 14px;
	padding: 9px 10px;
	border: 1px dashed #C9D4DE;
	border-radius: 8px;
	background: transparent;
	color: #818A94;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
	transition: color .16s, border-color .16s;
}

.kmx-serail__reset:hover {
	color: #0E7BD6;
	border-color: #0E7BD6;
}

/* 已选条件摘要条：无筛选时整条隐藏 */
.kmx-serail__active {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 12px;
	padding: 0 0 12px;
	border-bottom: 1px solid #EEF1F4;
}

.kmx-serail__chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	max-width: 100%;
	padding: 4px 5px 4px 9px;
	border: 1px solid #B5D4F4;
	border-radius: 999px;
	background: #E6F1FB;
	color: #0C447C;
	font-size: 12px;
	line-height: 1.5;
}

.kmx-serail__chip b {
	font-weight: 500;
	opacity: .62;
}

.kmx-serail__chipx {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(12, 68, 124, .12);
	color: #0C447C;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
	transition: background .16s, color .16s;
}

.kmx-serail__chipx:hover {
	background: #0C447C;
	color: #fff;
}

.kmx-serail__btn {
	appearance: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 7px;
	width: 100%;
	text-align: left;
	border: 0;
	background: transparent;
	color: #0B2A4A;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	padding: 7px 9px;
	margin: 0 0 1px;
	border-radius: 7px;
	cursor: pointer;
	transition: background .16s, color .16s;
}

.kmx-serail__btn:hover {
	background: #EEF4FA;
	color: #0E7BD6;
}

.kmx-serail__btn.on {
	background: #0E7BD6;
	color: #fff;
}

.kmx-serail__txt {
	flex: 1 1 auto;
	min-width: 0;
}

/* 计数改小徽标，比裸数字更紧凑 */
.kmx-serail__n {
	flex: 0 0 auto;
	min-width: 20px;
	padding: 1px 6px;
	border-radius: 999px;
	background: #EEF1F4;
	color: #6B7280;
	font-size: 11px;
	font-weight: 500;
	text-align: center;
	font-variant-numeric: tabular-nums;
	transition: background .16s, color .16s;
}

.kmx-serail__btn.on .kmx-serail__n {
	background: rgba(255, 255, 255, .24);
	color: #fff;
}

@media (max-width: 640px) {
	/* 小屏下统计带与应用小卡改为两列，避免 minmax 下限撑破视口 */
	.entry-content div[style*="minmax(180px"],
	.entry-content div[style*="minmax(190px"] {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	/* 联系页「公司信息」表：内联 flex:0 0 190px 标签列在 390 视口撑出 45px 横向溢出，
	   改为标签在上、内容在下的纵向堆叠（列向 flex 子项默认交叉轴拉伸，宽度自动对齐） */
	.entry-content div[style*="display:flex"]:has(> div[style*="flex:0 0 190px"]) {
		flex-direction: column !important;
	}

	.entry-content div[style*="flex:0 0 190px"] {
		flex: 0 0 auto !important;
		width: auto !important;
		box-sizing: border-box !important;
	}
}

@media (max-width: 900px) {
	.entry-content div[style*="padding:56px 0"] {
		padding-top: 60px !important;
		padding-bottom: 60px !important;
	}

	.entry-content h1[style*="font-size:44px"] {
		font-size: clamp(30px, 7.4vw, 38px) !important;
	}

	.entry-content div[style*="display:grid"] {
		gap: 16px !important;
	}

	header .wp-block-navigation {
		font-size: var(--kmx-fs-nav);
	}

	body {
		font-size: 16px !important;
	}

	footer.wp-block-template-part .wp-block-paragraph {
		font-size: 14px !important;
	}

	/* 右侧系列竖栏在窄屏改为顶部横排 chips，避免挤压型号网格 */
	.kmx-models-row {
		flex-direction: column;
	}

	.kmx-serail__active {
		flex: 1 1 100%;
		margin: 0;
		padding: 0 0 10px;
	}

	.kmx-serail {
		flex: 0 0 auto;
		width: 100%;
		position: static;
		order: -1;
		margin-bottom: 20px;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 8px;
		padding: 14px;
	}

	.kmx-serail__grp {
		display: flex !important;
		flex-wrap: wrap;
		align-items: center;
		gap: 8px;
		margin: 0 !important;
		padding: 0 !important;
		border-top: 0 !important;
	}

	.kmx-serail__sub {
		width: auto;
		margin: 0 2px 0 0 !important;
		padding: 0 !important;
	}

	.kmx-serail__btn {
		width: auto;
		margin: 0;
		border: 1px solid #DCE3EA;
	}

	.kmx-serail__grp.is-grid .kmx-serail__btn {
		justify-content: flex-start;
		padding: 9px 10px;
	}

	.kmx-serail__reset {
		width: auto;
		margin-top: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.entry-content div[style*="linear-gradient(135deg,#0B2A4A"] > *,
	.entry-content h1[style*="font-size:34px"] {
		animation: none;
	}

	.entry-content div[style*="border-top:3px solid"],
	.entry-content div[style*="padding:22px 20px"],
	.entry-content a[style*="background:#0E7BD6"] {
		transition: none;
	}
}

/* ============ 9. 首页 hero 轮播（左右翻页 + 定时翻页） ============ */
/* 结构（页面 DB 内容）：.kmx-hero > .kmx-hero-track > .kmx-hero-slide ×N
   每帧内层仍保持原 hero 的 gradient div 内联结构，纹理/入场动画等钩子不受影响。
   控件（箭头/圆点）由 inc/tech-ui.php 注入；无 JS 时静默显示第一帧。 */

.entry-content > div.kmx-hero {
	/* 轮播必须通栏：抵消 .entry-content > div 的 gutter 内边距（通栏后由帧内层负责） */
	padding-left: 0 !important;
	padding-right: 0 !important;
	position: relative;
	overflow: hidden;
}

.kmx-hero-track {
	display: flex;
	align-items: stretch;
	margin: 0;
	transform: translateX(0);
	transition: transform 0.6s cubic-bezier(0.33, 0.75, 0.25, 1);
	will-change: transform;
}

.kmx-hero-slide {
	flex: 0 0 100%;
	min-width: 100%;
	display: flex;
	flex-direction: column;
	margin: 0;
}

/* 帧内层通栏 + 水平安全边距（替代原 .entry-content > div 的 gutter 职责） */
.kmx-hero-slide > div {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-left: var(--kmx-gutter) !important;
	padding-right: var(--kmx-gutter) !important;
}

/* 左右箭头 */
.kmx-hero-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 6;
	width: 46px;
	height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.32);
	border-radius: 50%;
	background: rgba(6, 20, 38, 0.38);
	color: #fff;
	cursor: pointer;
	padding: 0;
	-webkit-backdrop-filter: blur(5px);
	backdrop-filter: blur(5px);
	transition: background-color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.kmx-hero-arrow:hover,
.kmx-hero-arrow:focus-visible {
	background: rgba(14, 123, 214, 0.62);
	border-color: rgba(0, 163, 224, 0.85);
}

.kmx-hero-arrow:active {
	transform: translateY(-50%) scale(0.94);
}

.kmx-hero-arrow--prev { left: 22px; }
.kmx-hero-arrow--next { right: 22px; }

/* 圆点指示器 */
.kmx-hero-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 24px;
	z-index: 6;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
}

.kmx-hero-dot {
	width: 26px;
	height: 4px;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.28);
	cursor: pointer;
	transition: width 0.25s ease, background-color 0.25s ease;
}

.kmx-hero-dot:hover,
.kmx-hero-dot:focus-visible {
	background: rgba(255, 255, 255, 0.55);
}

.kmx-hero-dot.is-active {
	width: 40px;
	background: linear-gradient(90deg, var(--kmx-blue), var(--kmx-cyan));
}

@media (max-width: 640px) {
	.kmx-hero-arrow {
		width: 38px;
		height: 38px;
	}

	.kmx-hero-arrow--prev { left: 10px; }
	.kmx-hero-arrow--next { right: 10px; }

	.kmx-hero-dots { bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.kmx-hero-track {
		transition: none;
	}
}


/*
 * 11. 产品资料下载区（v1.0.18）
 * 由 inc/product-brochure.php 在产品型号页 / 产品种类页正文末尾追加。
 * 注意：主题内容块没有全局 border-box，这里一律显式声明，避免 padding 外撑。
 */
.kmx-dl {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 28px;
	width: 100%;
	max-width: 100%;
	margin: 44px 0 0;
	padding: 38px 40px;
	background: linear-gradient(135deg, #F7FAFC 0%, #EDF3F8 100%);
	border: 1px solid #DDE4EA;
	border-left: 5px solid #00A3E0;
	border-radius: 16px;
	box-shadow: 0 6px 20px rgba(11, 42, 74, 0.06);
}

/* 内容区对子元素的宽度约束会压窄卡片，这里显式放开 */
.entry-content > .kmx-dl,
.wp-block-group__inner-container > .kmx-dl {
	max-width: 100%;
}

.kmx-dl__icon {
	box-sizing: border-box;
	flex: 0 0 72px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 16px;
	background: #fff;
	border: 1px solid #E3E7EC;
	color: #0B2A4A;
}

.kmx-dl__icon svg {
	width: 34px;
	height: 34px;
}

.kmx-dl__meta {
	box-sizing: border-box;
	flex: 1 1 auto;
	min-width: 0; /* 允许长文件名省略，防止撑破 flex 容器 */
}

.kmx-dl__kicker {
	margin: 0 0 6px;
	font-size: 12px;
	letter-spacing: 0.18em;
	color: #00A3E0;
	text-transform: uppercase;
}

.kmx-dl__title {
	margin: 0 0 7px;
	font-size: 24px;
	line-height: 1.3;
	color: #0B2A4A;
	font-weight: 700;
}

.kmx-dl__desc {
	margin: 0 0 10px;
	font-size: 15px;
	line-height: 1.7;
	color: #6B737C;
}

.kmx-dl__file {
	margin: 0;
	font-size: 13.5px;
	color: #818A94;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.kmx-dl__btn {
	box-sizing: border-box;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 17px 36px;
	border-radius: 10px;
	background: linear-gradient(135deg, #0E7BD6, #00A3E0);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 4px 14px rgba(14, 123, 214, 0.25);
	transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.kmx-dl__btn:hover,
.kmx-dl__btn:focus-visible {
	background: linear-gradient(135deg, #0B2A4A, #0E7BD6);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(14, 123, 214, 0.32);
}

/* 后台编辑页 metabox 内的简单排版 */
.kmx-br-box .kmx-br-file {
	margin: 4px 0 10px;
	padding: 10px 12px;
	background: #F4F6F8;
	border-radius: 6px;
	font-size: 12.5px;
	line-height: 1.5;
	color: #1A1D21;
}

.kmx-br-box .kmx-br-file.is-empty {
	color: #818A94;
	background: transparent;
	border: 1px dashed #D5DAE0;
}

.kmx-br-box .kmx-br-file__size {
	display: block;
	color: #818A94;
}

.kmx-br-box .kmx-br-preview {
	margin: 0 0 10px;
	font-size: 12px;
}

@media (max-width: 640px) {
	.kmx-dl {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		padding: 22px 20px;
	}

	.kmx-dl__icon {
		flex: none;
	}

	.kmx-dl__btn {
		justify-content: center;
		padding: 14px 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kmx-dl__btn {
		transition: none;
	}

	.kmx-dl__btn:hover,
	.kmx-dl__btn:focus-visible {
		transform: none;
	}
}

/* ==========================================================================
 * 12. 面包屑与型号标题区（v1.0.23）
 * 型号详情页顶部：可点击回退的目录路径 + 型号名大标题。
 * ========================================================================== */
.kmx-crumbs {
	box-sizing: border-box;
	margin: 0 0 20px;
	font-size: 13px;
	line-height: 1.6;
	color: #8A929A;
}

.kmx-crumbs a {
	color: #8A929A;
	text-decoration: none;
	transition: color .18s ease;
}

.kmx-crumbs a:hover,
.kmx-crumbs a:focus-visible {
	color: #00A3E0;
}

.kmx-crumbs__sep {
	margin: 0 8px;
	color: #C4CBD2;
}

.kmx-crumbs__cur {
	color: #0B2A4A;
	font-weight: 600;
}

.kmx-modelhead {
	box-sizing: border-box;
	margin: 0 0 28px;
	padding: 0 0 22px;
	border-bottom: 1px solid #E3E7EC;
}

.kmx-modelhead__kicker {
	margin: 0 0 8px;
	font-size: 12px;
	letter-spacing: .18em;
	color: #00A3E0;
	text-transform: uppercase;
}

.kmx-modelhead__title {
	margin: 0;
	font-size: 32px;
	line-height: 1.25;
	color: #0B2A4A;
	font-weight: 700;
}

.kmx-modelhead__sub {
	margin: 12px 0 0;
	font-size: 15px;
	line-height: 1.8;
	color: #4A5158;
	max-width: 760px;
}

@media (max-width: 640px) {
	.kmx-modelhead__title { font-size: 26px; }
	.kmx-crumbs { font-size: 12px; }
}

/* =====================================================
   13. 产品型号卡缩略图（类别页，对标诺达佳产品列表）
   ===================================================== */
.kmx-cardimg {
	box-sizing: border-box;
	margin: 0 0 12px;
	height: 150px;
	background: #fff;
	border: 1px solid #EDF1F6;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.kmx-cardimg img {
	max-width: 86%;
	max-height: 86%;
	object-fit: contain;
	transition: transform .25s ease;
}
a:hover .kmx-cardimg img { transform: scale(1.06); }
@media (max-width: 640px) {
	.kmx-cardimg { height: 120px; }
}
/* 二级页型号卡：4:3 图片区（替换原渐变占位块） */
.kmx-cardimg--43 {
	box-sizing: border-box;
	height: auto;
	aspect-ratio: 4 / 3;
	margin: 0;
	border: 0;
	border-radius: 0;
	border-bottom: 1px solid #E3E7EC;
	background: #FAFCFE;
}
.kmx-cardimg--43 img { max-width: 88%; max-height: 88%; }
/* 「查看该类型号 →」改为真实链接：去默认下划线 */
a.kmx-cat-view { text-decoration: none; cursor: pointer; }
a.kmx-cat-view:hover { text-decoration: underline; }

/* =====================================================
   14. 三级类别页 · 简洁标题区（v1.0.33）
   替代原先的深蓝 hero 大区：原来深蓝底配深蓝标题，文字不可读，
   且占屏过大（上下 padding 约 116px）。现与型号页 .kmx-modelhead 同套版式。
   ===================================================== */
.kmx-cathead {
	box-sizing: border-box;
	margin: 0 0 4px;
	padding: 0 0 22px;
	border-bottom: 1px solid #E3E7EC;
}

.kmx-cathead__kicker {
	margin: 0 0 8px;
	font-size: 12px;
	letter-spacing: .18em;
	color: #00A3E0;
	text-transform: uppercase;
}

.kmx-cathead__title {
	margin: 0;
	font-size: 30px;
	line-height: 1.25;
	color: #0B2A4A;
	font-weight: 700;
}

.kmx-cathead__sub {
	margin: 12px 0 0;
	font-size: 15px;
	line-height: 1.8;
	color: #4A5158;
	max-width: 760px;
}

@media (max-width: 640px) {
	.kmx-cathead__title { font-size: 24px; }
	.kmx-cathead__sub   { font-size: 14px; }
}

/* =====================================================
   15. 型号页规格书截图宽度（v1.0.34）
   截图是整页 PDF 转图，原本撑满内容区（内联 max-width:100%;width:100%），
   阅读压迫感强。这里收到 82% 居中，并描边统一成「文档页」观感。
   限定范围靠 inc/product-page.php 输出的 body.kmx-model-page ——
   不能只写 img[style*="width:100%"]，那样会误伤「合作客户」等同写法的页面。
   调整宽度只需改这一处数值。

   ⚠️ v1.0.35 起已被第 16 节取代：inc/spec-gallery.php 会在输出时把截图
   的内联 style 整个摘掉并改挂 .kmx-specdoc__img，因此下面这几条**不再命中**
   型号页的规格书截图。保留仅作兜底（若该模块被停用则重新生效）。
   ===================================================== */
body.kmx-model-page .entry-content img[style*="width:100%"] {
	width: 82% !important;
	margin: 0 auto 20px !important;
	border: 1px solid #E3E7EC;
	border-radius: 6px;
	background: #fff;
}

@media (max-width: 1024px) {
	body.kmx-model-page .entry-content img[style*="width:100%"] {
		width: 90% !important;
	}
}

@media (max-width: 782px) {
	body.kmx-model-page .entry-content img[style*="width:100%"] {
		width: 100% !important;
		border-radius: 0;
	}
}

/* ==========================================================================
   16. 型号页规格书：文档阅读式展示（v1.0.35）

   第 15 节那套「卡片 + 缩到 82% + 再描边」的做法有两个毛病：
   ① 外层白卡已经有边框，里面截图又描一次 → 双重边框「框中框」；
   ② 内联 style 里用裸 '%'，某些服务器环境会把它改写成占位符，样式直接失效。

   现在改由 inc/spec-gallery.php 在**输出层**把每页卡片换成
   <figure class="kmx-specdoc__page">，这里把连续页面拼成一整张文档卡：
   页与页之间只留一条细分隔线，视觉上就是一份连续 PDF。
   ⚠️ 前提：.kmx-specdoc__page 必须是**同级相邻**元素（由该模块保证）。
   ========================================================================== */

.kmx-specdoc {
	margin: 0 0 34px;
}

/* 每一页：左右下三边描边，上边去掉 —— 相邻页之间只出现一条线 */
.kmx-specdoc__page {
	margin: 0;
	padding: 18px 0;
	background: #fff;
	border: 1px solid #E3E7EC;
	border-top: 0;
	line-height: 0; /* 消掉行内图片遗留的基线空隙 */
}

.kmx-specdoc__page:first-child {
	border-top: 1px solid #E3E7EC;
	border-radius: 12px 12px 0 0;
	padding-top: 22px;
}

.kmx-specdoc__page:last-child {
	border-radius: 0 0 12px 12px;
	padding-bottom: 22px;
}

/* 只有一页时首尾是同一元素，四角都要圆 */
.kmx-specdoc__page:first-child:last-child {
	border-radius: 12px;
	padding: 22px 0;
}

.kmx-specdoc__img {
	display: block;
	width: 96%;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	background: #fff;
	cursor: zoom-in; /* 可点击放大，见 assets/spec-lightbox.js */
	transition: opacity 0.2s ease;
}

.kmx-specdoc__img:hover {
	opacity: 0.9;
}

/* ---------- 点击放大的全屏遮罩 ----------
   注意：该遮罩由 assets/spec-lightbox.js 挂到 <html> 上，
   以避开主题「整站等比缩放」在 body 上的 zoom（否则放大后尺寸和页面里一样）。 */

.kmx-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: block;
	padding: 26px 16px 20px;
	background: rgba(8, 24, 40, 0.93);
	overflow: auto;
	text-align: center;
	cursor: zoom-out;
	-webkit-overflow-scrolling: touch;
}

/*
 * 原图 1:1 显示（截图宽 1787px），比页面里的 ~96% 明显更大，
 * 超出视口可滚动查看。max-width 不能设 100%：那样会被压回页面同等大小。
 */
.kmx-lightbox__img {
	display: block;
	width: auto;
	max-width: none;
	height: auto;
	margin: 0 auto;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
	cursor: default;
}

.kmx-lightbox__close {
	position: fixed;
	top: 14px;
	right: 16px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	font-size: 26px;
	line-height: 1;
	color: #fff;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.18s ease;
}

.kmx-lightbox__close:hover {
	background: rgba(255, 255, 255, 0.28);
}

.kmx-lightbox__tip {
	margin: 16px 0 4px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.6);
	cursor: default;
}

/* ---------- 移动端：进一步收窄留白 ---------- */

@media (max-width: 782px) {
	.kmx-specdoc__page {
		padding: 12px 0;
	}

	.kmx-specdoc__page:first-child {
		padding-top: 14px;
	}

	.kmx-specdoc__page:last-child {
		padding-bottom: 14px;
	}

	.kmx-specdoc__page:first-child:last-child {
		padding: 14px 0;
	}

	.kmx-specdoc__img {
		width: 97%;
	}

	/* 手机屏窄，1:1 会横向溢出太多，改为适应宽度（仍可双指放大） */
	.kmx-lightbox {
		padding: 58px 0 14px;
	}

	.kmx-lightbox__img {
		max-width: 100%;
		border-radius: 0;
	}
}

