/*
Theme Name: 科时智能 · The9 Store 子主题
Theme URI: https://www.example.com/
Description: 基于 The9 Store 的东莞科时智能科技有限公司官网子主题。包含中文字体排版、商品行业字段（型号/成色/速度）、元/月价格、立即咨询按钮、右侧固定悬浮咨询条、主导航吸顶、首页图片轮播、客户案例、询价表单、深色页脚等功能。
Author: 科时智能
Template: the9-store
Version: 1.2.0
License: GPLv3 or later
Text Domain: keshi-the9-child
*/

/* -------------------------------------------------------------------------
 * 载入父主题样式
 *
 * 为什么必须写这一行：父主题用的是 get_stylesheet_uri() 加载样式，
 * 在启用子主题后该函数会指向"子主题"的 style.css，
 * 结果就是父主题自己的样式不会加载、整站会变成没有样式的白页。
 * 这一行把父主题样式引进来了（父主题文件夹必须叫 the9-store，改名了这里要同步改）。
 * ---------------------------------------------------------------------- */
@import url("../the9-store/style.css");

/* =========================================================================
 * 0. 全站配色变量
 *
 * 想换主色，改下面的 --secondary-color；
 * 也可以在后台「外观 → 自定义 → Theme Options → Styling Options」里改，
 * 后台改的值会覆盖这里的默认值。
 * ========================================================================= */
:root {
	--body-font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC",
		"Noto Sans CJK SC", "WenQuanYi Micro Hei", system-ui, -apple-system, "Segoe UI", sans-serif;
	--heading-font: var(--body-font);
	--nav-font: var(--body-font);

	--ks-dark: #14304A;      /* 深海军蓝：导航、页脚背景 */
	--ks-dark-2: #0E2439;    /* 更深的蓝：顶部工具条 */
	--ks-gray: #F4F6F9;      /* 浅灰分区底色 */
	--ks-line: #E6EBF2;      /* 分隔线 */
	--ks-text: #333333;
	--ks-muted: #6B7684;
}

/* =========================================================================
 * 1. 中文字体与排版
 * ========================================================================= */
body {
	font-family: var(--body-font);
	font-size: 16px;
	line-height: 1.75;
	color: var(--ks-text);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--heading-font);
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0;
	color: #1B2733;
}

.site-header-text-wrap h1 {
	font-size: 2.5rem;
	line-height: 1.3;
}

#content p {
	line-height: 1.9;
}

/* =========================================================================
 * 2. 顶部工具条 + 头部
 * ========================================================================= */
.top-bar-wrap {
	background: var(--ks-dark-2);
	color: rgba(255, 255, 255, .78);
	font-size: 13px;
}

.top-bar-wrap a,
.top-bar-wrap .right-menu li ul a {
	color: rgba(255, 255, 255, .78);
}

.top-bar-wrap a:hover,
.top-bar-wrap a:focus {
	color: #fff;
	text-decoration: none;
}

/* 头部紧凑一些（父主题默认上下各 50px 内边距） */
#masthead {
	padding: 20px 0;
	border-bottom: 1px solid var(--ks-line);
}

/* 不做商城：隐藏右上角"登录 / 我的账户"图标 */
#masthead .header-icon {
	display: none !important;
}

.ks-head-tools {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-left: auto;
	align-self: center;
}

.ks-head-search {
	display: flex;
	align-items: stretch;
	height: 42px;
	flex: 0 0 auto;
	border: 1px solid #E3E8EF;
	border-radius: 6px;
	overflow: hidden;
	background: #F4F6F9;
	transition: border-color .25s ease, background .25s ease;
}

.ks-head-search:focus-within {
	border-color: var(--secondary-color, #4E53C8);
	background: #fff;
}

.ks-head-search input[type="search"] {
	/* 宽度按 placeholder「搜索服务、方案与知识文章」实际所需来定：
	   13px 字号下这段文字约 156px，加左右各 14px 内边距 = 184px。
	   原来写 190px 只剩 6px 余量，用户浏览器字体稍有不同就会被截断；
	   992~1199px 断点更是只有 140px，直接缺 44px。 */
	width: 280px;
	height: 100% !important;
	min-height: 0;
	margin: 0;
	padding: 0 14px;
	border: 0;
	border-radius: 0;
	background: transparent;
	font-size: 13px;
	line-height: normal;
	color: var(--ks-text);
	outline: none;
	box-shadow: none;
}

.ks-head-search button {
	height: 100%;
	margin: 0;
	padding: 0 18px;
	border: 0;
	border-radius: 0;
	background: var(--secondary-color, #4E53C8);
	color: #fff;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
	transition: background .25s ease;
}

.ks-head-search button:hover {
	background: var(--ks-dark);
}

.ks-head-tel {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
	white-space: nowrap;
	border-left: 1px solid var(--ks-line);
	padding-left: 20px;
}

.ks-head-tel span {
	font-size: 12px;
	color: #8A94A0;
}

.ks-head-tel strong {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: .5px;
	color: var(--secondary-color, #4E53C8);
}

@media (max-width: 1199px) {
	.ks-head-search input[type="search"] {
		/* 这个断点头部整行只有 720px，实测剩 321px 余量，
		   所以从 140px 提到 230px（placeholder 需要 184px，留 46px 余量） */
		width: 230px;
	}
}

@media (max-width: 991px) {
	.ks-head-tools {
		display: none;
	}
}

/* 主导航：换成和页脚一致的深海军蓝 */
#navbar {
	background: var(--ks-dark);
}

/* =========================================================================
 * 3. 商品卡片：型号 / 成色 / 打印速度、元/月
 * ========================================================================= */
.woocommerce ul.products li.product .ks-specs {
	list-style: none;
	margin: 6px 0 8px;
	padding: 0;
	font-size: 13px;
	color: #666;
	line-height: 1.7;
}

.woocommerce ul.products li.product .ks-specs li {
	display: flex;
	gap: 6px;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

.woocommerce ul.products li.product .ks-specs .ks-spec-label {
	color: #999;
	flex: 0 0 auto;
}

.ks-price-unit {
	font-size: 13px;
	color: #888;
	margin-left: 2px;
}

/* =========================================================================
 * 4. "立即咨询 / 免费试用"按钮
 * ========================================================================= */
.ks-consult-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	background: var(--secondary-color, #4E53C8);
	color: #fff !important;
	border-radius: 4px;
	padding: 8px 16px;
	font-size: 14px;
	line-height: 1.4;
	text-decoration: none !important;
	transition: all .25s ease;
}

.ks-consult-btn:hover,
.ks-consult-btn:focus {
	background: var(--ks-dark);
	color: #fff !important;
}

.ks-consult-li {
	flex: 1 1 100%;
	margin-top: 6px;
}

.ks-consult-li .ks-consult-btn {
	width: 100%;
}

.ks-single-consult {
	margin: 18px 0 10px;
}

.ks-consult-btn--single {
	padding: 13px 30px;
	font-size: 16px;
}

.ks-consult-tip {
	margin: 8px 0 0;
	font-size: 13px;
	color: #888;
}

/* =========================================================================
 * 5. 主导航吸顶
 *
 * 父主题的 #page 有 overflow-x:hidden，会让 position:sticky 失效，
 * 所以这里用 fixed 定位，并由脚本插入一个等高占位块防止页面跳动。
 * ========================================================================= */
.ks-sticky {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 9990;
	margin: 0 !important;
	box-shadow: 0 4px 18px rgba(20, 48, 74, .18);
}

.admin-bar .ks-sticky {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .ks-sticky {
		top: 46px;
	}
}

/* =========================================================================
 * 6. 右侧固定悬浮咨询条
 * ========================================================================= */
.ks-rail {
	position: fixed;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 9999;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ks-rail-item {
	position: relative;
	width: 66px;
	height: 66px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	background: #fff;
	border: 1px solid var(--ks-line);
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(20, 48, 74, .07);
	color: var(--ks-text);
	font-size: 12px;
	text-decoration: none !important;
	transition: all .25s ease;
}

.ks-rail-item i {
	font-size: 21px;
	color: var(--secondary-color, #4E53C8);
	line-height: 1;
}

.ks-rail-item:hover,
.ks-rail-item:focus {
	background: var(--secondary-color, #4E53C8);
	color: #fff;
}

.ks-rail-item:hover i,
.ks-rail-item:focus i {
	color: #fff;
}

.ks-rail-panel {
	position: absolute;
	right: 76px;
	top: 0;
	width: 186px;
	padding: 10px;
	background: #fff;
	border: 1px solid var(--ks-line);
	border-radius: 8px;
	box-shadow: 0 8px 26px rgba(20, 48, 74, .16);
	text-align: center;
	display: none;
}

.ks-rail-panel.on {
	display: block;
}

.ks-rail-panel img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
}

.ks-rail-panel p {
	margin: 6px 0 0;
	font-size: 12px;
	line-height: 1.6;
	color: #666;
}

.ks-rail-empty {
	color: #B3261E !important;
}

#ks-panel-work {
	top: 72px;
}

.ks-rail-label-mobile { display: none; }
.ks-rail-item:focus-visible { outline: 3px solid #17558c; outline-offset: -3px; }

@media (max-width: 768px) {
	.ks-rail-item.ks-rail-mobile-hidden { display: none; }
	.ks-rail-label-mobile { display: inline; }
	.ks-rail-label-desktop { display: none; }
	.ks-rail {
		left: 0;
		right: 0;
		bottom: 0;
		top: auto;
		transform: none;
		flex-direction: row;
		gap: 0;
		background: #fff;
		border-top: 1px solid #eee;
		box-shadow: 0 -2px 10px rgba(20, 48, 74, .08);
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}

	.ks-rail-item {
		flex: 1 1 0;
		order: var(--ks-rail-mobile-order, 50);
		min-width: 0;
		width: auto;
		height: 56px;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		font-size: 11px;
	}

	.ks-rail-item i {
		font-size: 19px;
	}

	.ks-rail-panel,
	#ks-panel-work {
		top: auto;
		right: auto;
		left: 50%;
		bottom: calc(62px + env(safe-area-inset-bottom, 0px));
		transform: translateX(-50%);
	}

	body {
		padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
	}
}

/* 主题自带的"返回顶部"按钮隐藏掉——悬浮条里已经有"顶部"了 */
#backToTop {
	display: none !important;
}

/* =========================================================================
 * 7. 首页轮播（图片模式：图片本身已带文案，这里不再叠加文字）
 *
 *   · 宽度：和正文同一个 .container（≤1140px），与下方区块严格左右对齐
 *   · 比例：2.5:1（你的图是 1983×793 = 2.5:1，正好不裁切）
 *   · 结构：ks-slider > ks-track > ks-slide > a > img
 *   · 没有 JS 时只显示第一张，不会出现"多张图竖着堆"
 * ========================================================================= */
.ks-hero-wrap {
	padding: 22px 0 0;
}

.ks-slider {
	position: relative;
	overflow: hidden;
	border-radius: 10px;
	background: var(--ks-dark);
	box-shadow: 0 12px 32px rgba(20, 48, 74, .12);
}

.ks-track {
	display: flex;
	transition: transform .6s cubic-bezier(.4, 0, .2, 1);
	will-change: transform;
}

.ks-slide {
	position: relative;
	flex: 0 0 100%;
	max-width: 100%;
	aspect-ratio: 2.5 / 1;
	overflow: hidden;
}

.ks-slide a {
	display: block;
	height: 100%;
}

.ks-slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}

/* 左右箭头 */
.ks-slider-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(10, 24, 40, .3);
	color: #fff;
	font-size: 26px;
	line-height: 42px;
	text-align: center;
	cursor: pointer;
	z-index: 3;
	opacity: 0;
	transition: all .25s ease;
}

.ks-slider:hover .ks-slider-nav,
.ks-slider-nav:focus {
	opacity: 1;
}

.ks-slider-nav:hover {
	background: var(--secondary-color, #4E53C8);
}

.ks-prev {
	left: 18px;
}

.ks-next {
	right: 18px;
}

/* 底部圆点 */
.ks-slider-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 16px;
	text-align: center;
	z-index: 3;
}

.ks-dot {
	display: inline-block;
	width: 26px;
	height: 4px;
	margin: 0 4px;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background: rgba(255, 255, 255, .5);
	cursor: pointer;
	transition: background .25s ease;
}

.ks-dot.is-active {
	background: #fff;
}

@media (max-width: 767px) {
	.ks-hero-wrap {
		padding-top: 14px;
	}

	.ks-slider {
		border-radius: 8px;
	}

	.ks-slider-nav {
		display: none;
	}

	.ks-dot {
		width: 18px;
		height: 3px;
	}
}

/* =========================================================================
 * 8. 首页分区：交替底色 + 卡片
 * ========================================================================= */
.home #content {
	padding-top: 0;
	padding-bottom: 0;
}

/* WordPress 会给区块容器加 10px 内边距，归零后与轮播左右对齐 */
.home #content .is-layout-constrained {
	padding-left: 0;
	padding-right: 0;
}

.home #content .ks-sec {
	position: relative;
	padding: 58px 0;
	margin: 0;
}

/* 用整屏宽的伪元素做通栏底色，但内容仍然对齐 1140px 容器 */
.home #content .ks-sec--alt::before,
.home #content .ks-sec--brand::before,
.home #content .ks-sec--form::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 100vw;
	margin-left: -50vw;
	z-index: -1;
}

.home #content .ks-sec--alt::before {
	background: var(--ks-gray);
}

.home #content .ks-sec--brand::before {
	background: linear-gradient(180deg, #F2F7FC 0%, #E8F0F9 100%);
}

.home #content .ks-sec--form::before {
	background: linear-gradient(135deg, #14304A 0%, #1B4570 100%);
}

/* 表单区在深色底上，文字要反白 */
.home #content .ks-sec--form,
.home #content .ks-sec--form .wp-block-heading,
.home #content .ks-sec--form p {
	color: #fff;
}

.home #content .ks-sec--form .wp-block-heading::after {
	background: rgba(255, 255, 255, .8);
}

/* 卡片：工程服务 / 服务保障 */
.home #content .ks-card {
	background: #fff;
	border: 1px solid var(--ks-line);
	border-radius: 10px;
	padding: 24px 22px;
	margin: 0;
	transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}

.home #content .ks-card:hover {
	border-color: #D3E0EE;
	box-shadow: 0 14px 30px rgba(20, 48, 74, .09);
	transform: translateY(-3px);
}

.home #content .ks-card .wp-block-heading {
	font-size: 17px;
	padding-bottom: 0;
	margin: 0 0 8px;
}

.home #content .ks-card .wp-block-heading::after {
	display: none;
}

.home #content .ks-card p {
	margin: 0;
	font-size: 14px;
	line-height: 1.8;
	color: var(--ks-muted);
}

.home #content .ks-cards {
	gap: 20px;
	margin-bottom: 20px;
}

.home #content .ks-cards:last-child {
	margin-bottom: 0;
}

/* 图标 */
.ks-ico {
	margin: 0 0 14px;
}

.ks-ico i {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	font-size: 23px;
	color: var(--secondary-color, #4E53C8);
	background: rgba(61, 130, 191, .1);
	border-radius: 12px;
}

/* 业务流程的序号圆点 */
.home #content .ks-step {
	text-align: center;
}

.home #content .ks-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin: 0 0 14px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--secondary-color, #4E53C8);
	color: var(--secondary-color, #4E53C8);
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
}

.home #content .ks-step .wp-block-heading {
	font-size: 16px;
	padding-bottom: 0;
	margin: 0 0 8px;
}

.home #content .ks-step .wp-block-heading::after {
	display: none;
}

.home #content .ks-step p:not(.ks-step-num) {
	margin: 0;
	font-size: 13px;
	line-height: 1.75;
	color: var(--ks-muted);
}

/* 设备租赁区的左侧分类面板 */
.home #content .ks-cat-panel {
	background: #fff;
	border: 1px solid var(--ks-line);
	border-radius: 10px;
	padding: 18px 16px;
}

.home #content .ks-cat-panel .wp-block-heading {
	font-size: 16px;
	padding-bottom: 0;
	margin: 0 0 8px;
}

.home #content .ks-cat-panel .wp-block-heading::after {
	display: none;
}

.home #content .ks-cat-panel ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.home #content .ks-cat-panel li {
	border-bottom: 1px dashed var(--ks-line);
	font-size: 14px;
}

.home #content .ks-cat-panel li:last-child {
	border-bottom: 0;
}

.home #content .ks-cat-panel li a {
	display: block;
	padding: 9px 2px;
	color: var(--ks-text);
	text-decoration: none;
}

.home #content .ks-cat-panel li a:hover {
	color: var(--secondary-color, #4E53C8);
	padding-left: 4px;
}

/* =========================================================================
 * 9. 首页区间标题统一风格
 * ========================================================================= */
#content .wp-block-heading {
	position: relative;
	padding-bottom: 12px;
	margin-bottom: 18px;
}

#content .wp-block-heading::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 46px;
	height: 3px;
	background: var(--secondary-color, #4E53C8);
	border-radius: 2px;
}

/* 居中标题的样式（用于分隔明显的区块） */
#content .ks-title-center {
	text-align: center;
}

#content .ks-title-center::after {
	left: 50%;
	margin-left: -23px;
}

/* =========================================================================
 * 10. 客户案例卡片（由 [keshi_cases] 短代码输出）
 * ========================================================================= */
.ks-cases {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 22px;
}

.ks-case {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--ks-line);
	border-radius: 10px;
	overflow: hidden;
	transition: all .25s ease;
}

.ks-case:hover {
	box-shadow: 0 14px 30px rgba(20, 48, 74, .1);
	transform: translateY(-3px);
}

.ks-case-thumb {
	display: block;
	background: #EDF1F6;
}

.ks-case-thumb img {
	display: block;
	width: 100%;
	height: 190px;
	object-fit: cover;
}

.ks-case-body {
	padding: 18px 20px 22px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.ks-case-title {
	margin: 0 0 8px;
	font-size: 17px;
	line-height: 1.5;
}

.ks-case-title a {
	color: #1B2733;
	text-decoration: none;
}

.ks-case-title a:hover {
	color: var(--secondary-color, #4E53C8);
}

.ks-case-meta {
	margin: 0 0 10px;
	font-size: 13px;
	color: var(--secondary-color, #4E53C8);
}

.ks-case-ex {
	margin: 0 0 14px;
	font-size: 14px;
	line-height: 1.8;
	color: var(--ks-muted);
	flex: 1;
}

.ks-case-more {
	font-size: 14px;
	color: var(--secondary-color, #4E53C8) !important;
	text-decoration: none !important;
}

.ks-empty {
	padding: 18px;
	background: #fff;
	border-left: 3px solid var(--secondary-color, #4E53C8);
	border-radius: 4px;
	font-size: 14px;
}

/* =========================================================================
 * 11. 客户 Logo 墙 + 询价表单
 * ========================================================================= */
.ks-logo-wall {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 14px;
}

.ks-logo-slot {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 78px;
	background: #fff;
	border: 1px dashed #CFD9E4;
	border-radius: 8px;
	font-size: 12px;
	color: #98A2B0;
}

.ks-form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 18px 22px;
	background: #fff;
	border-radius: 10px;
	padding: 26px;
	box-shadow: 0 14px 34px rgba(10, 25, 42, .18);
}

.ks-form-grid p {
	margin: 0;
}

.ks-form-grid label {
	font-size: 14px;
	font-weight: 500;
	color: var(--ks-text);
}

.ks-form-grid label span {
	color: #D93025;
}

.ks-form-grid .wpcf7-form-control-wrap {
	display: block;
}

.ks-form-grid input[type="text"],
.ks-form-grid input[type="tel"],
.ks-form-grid input[type="email"],
.ks-form-grid select,
.ks-form-grid textarea {
	width: 100%;
	margin-top: 6px;
	padding: 10px 12px;
	border: 1px solid #DFE4EC;
	border-radius: 6px;
	font-size: 14px;
	color: var(--ks-text);
	background: #fff;
}

.ks-form-grid textarea {
	min-height: 100px;
}

.ks-form-grid input[type="submit"] {
	padding: 14px 42px;
	border: 0;
	border-radius: 6px;
	background: var(--secondary-color, #4E53C8);
	color: #fff;
	font-size: 15px;
	letter-spacing: 2px;
	cursor: pointer;
	transition: all .25s ease;
}

.ks-form-grid input[type="submit"]:hover {
	background: var(--ks-dark);
}

.ks-f-full {
	grid-column: 1 / -1;
}

.wpcf7-response-output {
	margin: 14px 0 0 !important;
	border-radius: 6px;
}

/* =========================================================================
 * 11.5 联系方式列表 + 二维码（页脚小工具与 [keshi_contact_info] 共用）
 * ========================================================================= */
.ks-contact-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

/*
 * 标签定宽 + 值统一左对齐：原来用 flex + 10px 间隔，标签和值视觉上"连在一起"
 * （显示成「服务热线134 5000 4441」）。改为两列网格，并给标签补一个冒号。
 */
.ks-contact-list li {
	display: grid;
	grid-template-columns: 5.2em minmax(0, 1fr);   /* 左列固定给标签，右列放值 */
	column-gap: 8px;
	align-items: start;
	margin-bottom: 7px;
	font-size: 13.5px;
	line-height: 1.8;
}

.ks-contact-list .ks-c-label {
	color: var(--secondary-color, #4E53C8);
	white-space: nowrap;
}

/* 标签后自动补中文冒号，明确区分「名称」和「内容」 */
.ks-contact-list .ks-c-label::after {
	content: "：";
}

.ks-contact-list .ks-c-value {
	word-break: break-word;   /* 邮箱、地址过长时自动换行，不撑破布局 */
}

/* 页脚是深色底，标签用半透明白更好看 */
#colophon .ks-contact-list .ks-c-label {
	color: rgba(255, 255, 255, .55);
}

.ks-qr-row {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	margin: 20px 0 0;
}

.ks-qr-item {
	text-align: center;
}

.ks-qr-item img {
	display: block;
	width: 150px;
	height: 150px;
	object-fit: contain;
	padding: 6px;
	background: #fff;
	border: 1px solid var(--ks-line);
	border-radius: 8px;
}

.ks-qr-item p {
	margin: 8px 0 0;
	font-size: 13px;
	color: var(--ks-muted);
}

.ks-qr-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 150px;
	height: 150px;
	text-align: center;
	font-size: 12px;
	line-height: 1.7;
	color: #98A2B0;
	border: 1px dashed #CFD9E4;
	border-radius: 8px;
}

/* =========================================================================
 * 12. 页脚：深色（微透）背景
 * ========================================================================= */
#colophon {
	position: relative;
	background: linear-gradient(180deg,
		rgba(20, 48, 74, .97) 0%,
		rgba(11, 30, 48, .995) 100%);
	color: rgba(255, 255, 255, .78);
	overflow: hidden;
}

/* 右上角一层很淡的光晕，避免深色一片死板 */
#colophon::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 720px;
	height: 260px;
	background: radial-gradient(ellipse at 80% 0%, rgba(61, 130, 191, .22), transparent 70%);
	pointer-events: none;
}

#colophon .footer_widget_wrap {
	position: relative;
	z-index: 1;
	/* 父主题给这里单独设了 background: var(--bg-color)（白色），
	   会盖住下面的深色页脚，导致"白底白字"看起来一片空白，必须清掉 */
	background: transparent;
	border-top: 0;
	padding: 56px 0 34px;
}

/* 注意用 #colophon.site-footer 提高优先级：
   父主题写的是 `#colophon.site-footer .row.the9-store-flex` 和 `.footer_widget_wrap .widget`，
   选择器权重比单写 #colophon 高，不跟着写就会被父主题的 80px 内边距 / -40px 负外边距盖掉 */
#colophon.site-footer .widget {
	margin-bottom: 0;
	/* 父主题给每个小工具 40px 内边距（配合 .row 的 -40px 外边距对齐容器） */
	padding: 0 40px;
}

#colophon .widget-title {
	position: relative;
	padding-bottom: 12px;
	margin: 0 0 16px;
	font-size: 16px;
	color: #fff;
}

#colophon .widget-title span {
	color: #fff;
}

#colophon .widget-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 32px;
	height: 2px;
	background: var(--secondary-color, #4E53C8);
}

#colophon p,
#colophon li {
	font-size: 13.5px;
	line-height: 1.9;
	color: rgba(255, 255, 255, .72);
}

#colophon a {
	color: rgba(255, 255, 255, .78) !important;
	text-decoration: none;
}

#colophon a:hover,
#colophon a:focus {
	color: #fff !important;
}

#colophon ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

#colophon ul li {
	margin-bottom: 4px;
}

/* 底部版权条 */
#colophon .site_info {
	position: relative;
	z-index: 1;
	background: rgba(0, 0, 0, .22);
	border-top: 1px solid rgba(255, 255, 255, .08);
	padding: 16px 0;
	font-size: 13px;
	color: rgba(255, 255, 255, .6);
}

#colophon .site_info .row {
	align-items: center;
}

#colophon .site_info a {
	color: rgba(255, 255, 255, .6) !important;
}

/* =========================================================================
 * 13. 询价模式细节 + 隐藏主题版权字样
 * ========================================================================= */
.ks-quote-mode .top-form-minicart {
	display: none !important;
}

.ks-quote-mode .single-product form.cart {
	display: none !important;
}

.ks-hide-credit #colophon .dev_info {
	display: none !important;
}

/* =========================================================================
 * 14. 小屏适配
 * ========================================================================= */
@media (max-width: 991px) {
	.home #content .ks-sec {
		padding: 40px 0;
	}
}

@media (max-width: 767px) {
	/*
	 * 首页板块内边距：原来 32px，8 个板块光上下留白就占了约 0.6 屏。
	 * 收到 22px 后仍能区分板块（隔行底色也在），但少滚近 0.2 屏。
	 * 只作用于首页，内页保持原样。
	 */
	.home #content .ks-sec {
		padding: 22px 0;
	}

	.home #content .ks-card {
		padding: 20px 18px;
	}

	.home #content .ks-cards {
		gap: 14px;
	}

	#colophon .footer_widget_wrap {
		padding: 36px 0 20px;
	}

	/* 手机上取消 -40px 的负外边距，避免小工具内容被推出屏幕 */
	#colophon.site-footer .row.the9-store-flex {
		margin-left: 0;
		margin-right: 0;
	}

	#colophon.site-footer .widget {
		padding: 0;
		margin-bottom: 28px;
	}

	.ks-cat-scroll {
		display: flex;
		gap: 8px;
		overflow-x: auto;
		padding-bottom: 6px;
		-webkit-overflow-scrolling: touch;
	}

	.ks-cat-scroll > * {
		flex: 0 0 auto;
	}
}

/* =========================================================================
 * 12.0 询价表单 UI（按主流企业官网表单规范重做）
 *   设计要点：
 *     · 卡片 760px 居中，不再拉满整屏；圆角 16px + 柔和投影，在深色底上浮起
 *     · 每个字段内部「标签在上、控件在下」纵向排列，行距统一 20px
 *     · 标签 13.5px 中灰蓝（弱于正文，减少噪音）；必填项用一点红
 *     · 控件高 47px、圆角 10px、浅灰底 #F8FAFD，聚焦时品牌色描边 + 柔和光环
 *     · 下拉框统一自绘箭头，去掉各浏览器默认样式差异
 *     · 提交按钮不拉满整行，靠左、尺寸克制；移动端才整行
 * ========================================================================= */
.ks-form-grid {
	max-width: 760px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px 24px;
	background: #fff;
	border-radius: 16px;
	padding: 38px 40px 34px;
	box-shadow: 0 20px 50px rgba(8, 22, 38, .24), 0 2px 8px rgba(8, 22, 38, .08);
}

/* 每个字段容器：标签在上、控件在下 */
.ks-form-grid .ks-f {
	display: flex;
	flex-direction: column;
	margin: 0;
	min-width: 0;
}

.ks-form-grid .ks-f > label {
	display: block;
	margin: 0 0 8px;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.4;
	color: #3A4A63;
	letter-spacing: .2px;
}
.ks-form-grid .ks-f > label span {
	color: #E5484D;
	margin-left: 2px;
}
/* CF7 会在标签后补 <br />，上面已改为块级布局，隐藏它避免多出空隙 */
.ks-form-grid .ks-f > br { display: none; }

.ks-form-grid .wpcf7-form-control-wrap { display: block; }

.ks-form-grid input[type="text"],
.ks-form-grid input[type="tel"],
.ks-form-grid input[type="email"],
.ks-form-grid select,
.ks-form-grid textarea {
	width: 100%;
	box-sizing: border-box;
	height: 47px;
	padding: 0 14px;
	font-size: 15px;
	line-height: 47px;
	color: #1B2733;
	background-color: #F8FAFD;
	border: 1px solid #DCE3ED;
	border-radius: 10px;
	transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
	-webkit-appearance: none;
	appearance: none;
}

.ks-form-grid textarea {
	height: auto;
	min-height: 124px;
	padding: 13px 14px;
	line-height: 1.65;
	resize: vertical;
}

/* 下拉框：统一自绘箭头 */
.ks-form-grid select {
	padding-right: 40px;
	background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7A90' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}

.ks-form-grid input:focus,
.ks-form-grid select:focus,
.ks-form-grid textarea:focus {
	outline: none;
	background-color: #fff;
	border-color: var(--secondary-color, #1565C0);
	box-shadow: 0 0 0 3.5px rgba(21, 101, 192, .15);
}

.ks-form-grid ::placeholder { color: #9AA7B8; }

.ks-form-grid .ks-f-full { grid-column: 1 / -1; }

/* 提交按钮：靠左、尺寸克制 */
.ks-form-grid .ks-f-submit { margin-top: 2px; }
.ks-form-grid .ks-f-submit input[type="submit"] {
	width: auto;
	min-width: 190px;
	height: 48px;
	padding: 0 34px;
	border: 0;
	border-radius: 10px;
	background: var(--secondary-color, #1565C0);
	color: #fff;
	font-size: 15.5px;
	font-weight: 600;
	letter-spacing: 1px;
	cursor: pointer;
	box-shadow: 0 8px 18px rgba(21, 101, 192, .28);
	transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.ks-form-grid .ks-f-submit input[type="submit"]:hover {
	background: var(--ks-dark, #14304A);
	transform: translateY(-1px);
	box-shadow: 0 10px 22px rgba(20, 48, 74, .3);
}
.ks-form-grid .ks-f-submit input[type="submit"]:active { transform: translateY(0); }

/* 校验提示与提交结果 */
.ks-form-grid .wpcf7-not-valid-tip { margin-top: 6px; font-size: 12.5px; color: #E5484D; }
.ks-form-grid .wpcf7-spinner { margin: 0 0 0 12px; }
.wpcf7-response-output {
	grid-column: 1 / -1;
	margin: 16px 0 0 !important;
	padding: 12px 16px !important;
	border-radius: 10px;
	font-size: 14px;
}

/* 移动端：收紧内边距、按钮整行
   字段仍保持两列 —— 称呼/手机号、需求类型/需求规模各占一行，
   把 6 行压成 4 行（补充说明与提交按钮本身是整行）。 */
@media (max-width: 700px) {
	.ks-form-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px 12px;
		max-width: 100%;
		padding: 24px 18px 22px;
		border-radius: 14px;
	}
	.ks-form-grid .ks-f-submit input[type="submit"] { width: 100%; min-width: 0; }
}

/* 极窄手机：两列会挤到读不清，退回单列 */
@media (max-width: 359px) {
	.ks-form-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}

/* 表单区标题与说明和表单等宽居中，视觉对齐 */
.ks-sec--form .wp-block-group__inner-container > .wp-block-heading,
.ks-sec--form .wp-block-group__inner-container > p {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
}

/* =========================================================================
 * 13.0 站点 Logo 尺寸与头部行高稳定
 *   父主题在"设置了 Logo"时会把文字标题换成 <img>，而图片没有任何尺寸约束
 *   ——原图多大就多高，于是装着搜索框/服务热线的那一整行被撑高、元素错位。
 *   这里限定 Logo 高度，并给头部那一行最小高度，使有/无 Logo 都不跳动。
 * ========================================================================= */
#masthead .logo-wrap {
	display: flex;
	align-items: center;
	min-height: 46px;
}

#masthead .custom-logo-link {
	display: flex;
	align-items: center;
}

#masthead .logo-wrap img,
#masthead .custom-logo {
	display: block;
	width: auto;
	max-height: 46px;   /* 超出即等比缩放，不再撑高整行 */
	object-fit: contain;
}

/* Logo 右侧的公司名（由子主题按开关输出） */
#masthead .ks-logo-name {
	margin-left: 12px;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: .3px;
	color: var(--ks-dark, #14304A);
	white-space: nowrap;
}

/* 头部那一行给最小高度，避免有无 Logo 时高度跳变 */
#masthead > .container > .row {
	min-height: 46px;
	align-items: center;
}

@media (max-width: 991px) {
	#masthead .logo-wrap img,
	#masthead .custom-logo { max-height: 40px; }
	#masthead .ks-logo-name { font-size: 17px; margin-left: 10px; white-space: normal; }
}

/* =========================================================================
 * 15. 商品卡片：平板 / 手机端改为两列，并精简卡片信息
 * -------------------------------------------------------------------------
 * 问题（实测 @820px）：
 *   父主题 woocommerce-core.css 在 @media (min-width:48em) 里写死了商品列宽
 *   （.columns-4 → 22.15%、.columns-3 → 30.8%）。首页的商品区只占 .ks-cards
 *   的 74%（820px 屏幕上仅 499px），却被排成 4 列 → 每张卡只剩 111px。
 *   再叠加父主题 .product_wrap { padding: 25px } → 正文宽度只剩 61px，
 *   标题、参数表、"咨询"按钮只能一个字一行，把卡片撑成 111×765
 *   （宽高比 1:6.9），看起来就是一条竖着的长条。
 *
 * 处理（只作用于 ≤991px，桌面端 992px 以上完全不动）：
 *   1) 商品列表统一改成 2 列网格（用 grid 避开父主题 float + .first/.last 的
 *      右间距归零逻辑，只改 width 会导致第二张卡换行）
 *   2) 卡片内距收紧，把省下来的宽度还给文字
 *   3) 窄屏精简信息：隐藏分类链接、标题最多两行
 *   4) 底部价格 / 咨询横条保持父主题原设计（绝对定位 + 60px 高深色条），
 *      只压小字号、并把 .product_wrap 的下内距从 100px 收到 84px
 * ========================================================================= */
@media (max-width: 991px) {

	/* 1) 商品列表：统一两列 */
	ul.products.columns-2,
	ul.products.columns-3,
	ul.products.columns-4,
	ul.products.columns-5,
	ul.products.columns-6 {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 18px 14px;
		margin: 0;
		padding: 0;
	}

	ul.products.columns-2 > li.product,
	ul.products.columns-3 > li.product,
	ul.products.columns-4 > li.product,
	ul.products.columns-5 > li.product,
	ul.products.columns-6 > li.product {
		width: auto !important;
		float: none !important;
		clear: none !important;
		margin: 0 !important;
	}

	/* 2) 卡片内距：25px 是"61px 正文宽"的直接原因，收紧到 10px；
	      下内距由父主题的 100px 定为 104px，给下面堆叠的两条按钮留位置（见第 4 条）。
	      另外父主题的图片链接 a.woocommerce-LoopProduct-link 是 inline，
	      里面装着块级图片，会多出一个行框（实测 390px 下白占 44px），改成 block。 */
	.woocommerce ul.products li.product .product_wrap {
		padding: 8px 8px 96px;
	}

	.woocommerce ul.products li.product > a.woocommerce-LoopProduct-link {
		display: block;
	}

	/* 3) 窄屏精简信息 */
	.woocommerce ul.products li.product .cat-name {
		display: none;
	}

	/* 商品主图统一成 4:3 取景框：
	   两件商品的图比例并不一致（实测一张 4:3、一张 1:1），同一行里高的一张会把
	   整行撑到 377px，矮的那张被拉伸、底部白占 44px。统一取景框后行高一致，
	   卡片更矮更整齐。用 contain 而不是 cover —— 等比缩放、不裁剪，
	   白底商品图不会掉内容。 */
	.woocommerce ul.products li.product .product-image img {
		width: 100%;
		height: auto;
		aspect-ratio: 4 / 3;
		object-fit: contain;
	}

	.woocommerce ul.products li.product .woocommerce-loop-product__title {
		font-size: 14px;
		line-height: 1.45;
		margin: 0 0 4px;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.woocommerce ul.products li.product .ks-specs {
		font-size: 11.5px;
		line-height: 1.6;
		margin: 0 0 6px;
	}

	/* 参数标签不再逐字换行（窄卡片里"型号"两个字也会被拆成两行） */
	.woocommerce ul.products li.product .ks-specs li {
		align-items: baseline;
		gap: 4px;
	}

	.woocommerce ul.products li.product .ks-specs .ks-spec-label {
		white-space: nowrap;
	}

	/* 4) 底部价格 / 咨询横条 —— 修掉"按钮文字被裁掉"
	      父主题的设计：ul.button-group 绝对定位贴卡片底部，里面两个 li 各是 60px 高的
	      深色横条，.product_wrap 用 100px 下内距预留位置。
	      但父主题让两条各占卡片一半（li 有 min-width:50%），而按钮文字来自自定义器
	      ks_consult_text，默认是"立即咨询 / 免费试用"，实测需要 140px 宽；
	      390px 屏幕上每条只有 88px，被 li 的 overflow:hidden 裁掉 —— 看起来就是
	      "立即咨询/免费试用 被挡住了"。平板 121px 同样不够。
	      处理：让两条各占整行、上下堆叠（父主题 li 的 max-width 本来就是 100%，
	      子主题也早就写了 .ks-consult-li{flex:1 1 100%}，这里只是让它真正生效）。
	      横条高度由 60px 降到 40px（触摸目标仍然够用），
	      .product_wrap 下内距相应为 96px。 */
	.woocommerce ul.products li.product ul.button-group {
		flex-wrap: wrap;
	}

	.woocommerce ul.products li.product ul.button-group li {
		flex: 1 1 100%;
		min-width: 100%;
		max-width: 100%;
		height: 40px;
		line-height: 40px;
		font-size: 13px;
		letter-spacing: 0;
	}

	.woocommerce ul.products li.product ul.button-group .price,
	.woocommerce ul.products li.product ul.button-group .woocommerce-Price-amount,
	.woocommerce ul.products li.product ul.button-group .ks-price-unit {
		font-size: 14px;
		white-space: nowrap;
	}

	.woocommerce ul.products li.product .ks-consult-btn {
		/* 铺满整条 44px 横条并居中，触达面积更大、视觉更干净 */
		display: flex;
		align-items: center;
		justify-content: center;
		height: 100%;
		padding: 0 6px;
		font-size: 13px;
		white-space: nowrap;
	}
}

/* 视口很窄时（≤420px）再压一档字号；并且允许按钮文字换行而不是被裁掉
   （分类页在 320px 下两列每张只有 111px，11 个字的按钮一行放不下，
   横条高度 40px 足够放两行，所以换行比裁剪更好） */
@media (max-width: 420px) {
	.woocommerce ul.products li.product .ks-consult-btn {
		padding: 0 4px;
		font-size: 12px;
		line-height: 1.25;
		white-space: normal;
		height: auto;
		min-height: 100%;
	}
}

/* -------------------------------------------------------------------------
 * 5) 移动端 / 平板：商品列表最多显示 6 个（两列 = 3 排），避免整页被拉太长
 * -------------------------------------------------------------------------
 * 第 7 个起在 ≤991px 隐藏；点击循环末尾的"查看全部"（?ks_all=1）后，
 * body 会带上 ks-all-products-open 类，截断规则立即失效、商品原地展开，
 * 因此不会出现"被隐藏的商品在移动端无处可看"的问题
 *（分类归档页在"即将上线"模式下不可用，所以入口必须留在当前页）。
 * 桌面端不截断，也不显示这个入口。
 * ------------------------------------------------------------------------- */
.ks-more-products {
	display: none;
}

@media (max-width: 991px) {
	body:not(.ks-all-products-open) ul.products > li.product:nth-child(n+7) {
		display: none;
	}

	.ks-more-products {
		display: block;
		width: -moz-fit-content;
		width: fit-content;
		margin: 14px auto 0;
		padding: 10px 22px;
		border: 1px solid var(--secondary-color, #4E53C8);
		border-radius: 4px;
		color: var(--secondary-color, #4E53C8);
		font-size: 14px;
		line-height: 1.4;
		text-align: center;
		text-decoration: none;
	}

	.ks-more-products:hover,
	.ks-more-products:focus {
		background: var(--secondary-color, #4E53C8);
		color: #fff;
	}
}

/* 更窄的手机（≤560px）：参数表只留前两条，卡片更短 */
@media (max-width: 560px) {
	.woocommerce ul.products li.product .ks-specs li:nth-child(n+3) {
		display: none;
	}
}

/* 手机（≤767px）：参数表（型号 / 成色 / 速度）整块不再显示
   —— 按"移动端产品信息不用展示完全"的处理，卡片因此再矮约 40px；
   要看详细参数点进商品详情页即可。平板（768–991px）保留参数表。 */
@media (max-width: 767px) {
	.woocommerce ul.products li.product .ks-specs {
		display: none;
	}
}

/* =========================================================================
 * 16. 横向溢出兜底：任何元素都不允许把页面撑出"左右滑动"
 * -------------------------------------------------------------------------
 * 实测（全屏 1920px）：文档宽 1913 > 可视宽 1905，多出 8px；
 * 992px 处页脚那一行更宽出 20px（父主题 .row 的 -40px 负外边距叠加）。
 * Chrome 实测 scrollLeft 恒为 0（不允许滚动），但**部分浏览器/触摸设备可以把
 * 这种"没有被裁剪的溢出"拖出来**，用户看到的就是"明明全屏了，页面还能左右滑"。
 *
 * 处理：统一在 html / body / #page 上兜底。用 clip 而不是 hidden ——
 * clip 不会创建滚动容器，因此不会影响吸顶导航（它是 fixed 定位）与其它滚动逻辑；
 * 老浏览器不支持 clip 时回退到 hidden。
 * ========================================================================= */
html,
body,
#page.site {
	overflow-x: hidden;
}

@supports (overflow: clip) {
	html,
	body,
	#page.site {
		overflow-x: clip;
	}
}

/* 页脚那一行的负外边距在 ≤1199px 会造成实际溢出，直接取消 */
@media (max-width: 1199px) {
	#colophon.site-footer .row.the9-store-flex {
		margin-left: 0;
		margin-right: 0;
	}
}

/* -------------------------------------------------------------------------
 * 17. 商品为空时的提示（配合 functions.php 16.0）
 * -------------------------------------------------------------------------
 * 替换 WooCommerce 默认的"没有符合您要求的产品"——那行字会让客户以为页面坏了。
 * ------------------------------------------------------------------------- */
.ks-empty-products {
	max-width: 640px;
	margin: 10px auto 0;
	padding: 28px 24px;
	text-align: center;
	background: #fff;
	border: 1px solid var(--ks-line, #E6EBF2);
	border-radius: 10px;
}

.ks-empty-products .ks-empty-title {
	margin: 0 0 10px;
	font-size: 18px;
	font-weight: 600;
	color: var(--ks-dark, #14304A);
}

.ks-empty-products .ks-empty-desc {
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.8;
	color: var(--ks-muted, #6B7684);
}

.ks-empty-products .ks-consult-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

@media (max-width: 767px) {
	.ks-empty-products {
		padding: 22px 16px;
	}
	.ks-empty-products .ks-empty-title {
		font-size: 16px;
	}
	.ks-empty-products .ks-empty-desc {
		font-size: 13.5px;
	}
}

/* -------------------------------------------------------------------------
 * 6) 极窄视口（≤340px）也保持一行两个
 * -------------------------------------------------------------------------
 * 曾经这里退成单列（更早还试过用 html{zoom} 整体缩放，两者都已放弃）：
 *   · zoom 会让 vw 单位失效（整宽背景变窄）并打乱 AOS 动画的位置计算
 *     （页脚小工具永远 opacity:0），详见 keshi.js 的说明；
 *   · 单列又不符合"一行两个"的要求。
 * 卡片本身已经压得足够小（手机端不显示参数表、按钮条 40px），实测 320px 下
 * 两列每张 141px 仍然放得下按钮文字，因此这里不再做任何降级处理 —— 从 320px
 * 到 991px 一律两列。
 * ------------------------------------------------------------------------- */

/* =========================================================================
 * 17) 首页卡片内的"描述性内链"（.ks-more）
 * -------------------------------------------------------------------------
 * 首页的服务卡与方案卡原来是"图标 + 标题 + 一句话"，没有任何链接：
 * 访客点不进去，搜索引擎也拿不到卡片对应的锚文本。
 * 现在每张卡末尾加一条 .ks-more，锚文本写成"查看视频监控服务"这类
 * 描述性文字（而不是"了解更多"），符合内链锚文本规范。
 *
 * 注意：.ks-card p 已有 `margin:0` 规则，所以这里必须重新给上外边距，
 * 否则链接会紧贴在上一段文字下面。
 * ========================================================================= */
.home #content .ks-card .ks-more {
	margin: 12px 0 0;
	font-size: 13.5px;
	line-height: 1.7;
	color: var(--ks-muted);
}

.home #content .ks-card .ks-more a {
	color: var(--secondary-color, #4E53C8);
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color .2s ease, color .2s ease;
}

.home #content .ks-card .ks-more a:hover,
.home #content .ks-card .ks-more a:focus {
	color: var(--ks-dark);
	border-bottom-color: currentColor;
}

/* 手机端略小一点，避免卡片内文字过挤 */
@media (max-width: 767px) {
	.home #content .ks-card .ks-more {
		font-size: 12.5px;
		margin-top: 9px;
	}
}

/* =========================================================================
 * 18) 页脚三栏：重排栏宽 + 链接列表分列
 * -------------------------------------------------------------------------
 * 问题（实测 1440px）：
 *   三个小工具都被父主题设成 Bootstrap `col-md-4`，即严格三等分（各 459px）。
 *   但三栏的内容量差很多：
 *     · 关于科时智能 —— 3 段文字
 *     · 联系方式     —— 4 行 + 2 个链接
 *     · 服务与支持   —— 13 条链接，排在只有 379px 宽的一列里
 *   结果第 3 栏的 <ul> 高达 511px，把整行撑到 566px、整个页脚撑到 711px，
 *   看起来就是"竖的一长条"。
 *
 * 处理（纯 CSS，不改模板/PHP，随时可回退）：
 *   ① 按内容量重新分配栏宽：关于 5/12、联系方式 3/12、服务与支持 4/12
 *   ② 服务与支持的链接列表改多列（宽屏 3 列、窄屏 2 列）
 *   ③ 平板断点（576~1199px）改成"关于占满一行 + 下面两栏各半行"，
 *      避免 3 栏挤在 700px 里每栏只剩 232px
 *
 * 预期效果：页脚高度约 711px → 450px 左右。
 * ========================================================================= */

/* ③ 平板与小平板：关于占满一行，另两栏各半行 */
@media (min-width: 576px) and (max-width: 1199.98px) {
	#colophon .footer_widget_wrap .row > .widget:nth-child(1) {
		flex: 0 0 100%;
		max-width: 100%;
		margin-bottom: 30px;
	}

	#colophon .footer_widget_wrap .row > .widget:nth-child(2) {
		flex: 0 0 50%;
		max-width: 50%;
	}

	#colophon .footer_widget_wrap .row > .widget:nth-child(3) {
		flex: 0 0 50%;
		max-width: 50%;
	}
}

/* ① 宽屏：按内容量分栏 */
@media (min-width: 1200px) {
	#colophon .footer_widget_wrap .row > .widget:nth-child(1) {
		flex: 0 0 41.666667%;
		max-width: 41.666667%;
	}

	#colophon .footer_widget_wrap .row > .widget:nth-child(2) {
		flex: 0 0 25%;
		max-width: 25%;
	}

	#colophon .footer_widget_wrap .row > .widget:nth-child(3) {
		flex: 0 0 33.333333%;
		max-width: 33.333333%;
	}
}

/* ② 链接列表分列
 *
 * 用 nth-child(3) 而不是 :has(ul)，是为了兼容不支持 :has() 的旧浏览器；
 * 同时补一条 :has() 规则 —— 万一以后调整了小工具顺序，按内容匹配更稳。
 * column-count 是"先填满一列再填下一列"的流向，正好适合链接清单。
 */
#colophon .footer_widget_wrap .row > .widget:nth-child(3) ul,
#colophon .footer_widget_wrap .row > .widget:has(> .textwidget > ul) ul {
	column-count: 3;
	column-gap: 18px;
	/* 避免某一条被跨列拆开 */
	break-inside: avoid;
}

#colophon .footer_widget_wrap .row > .widget:nth-child(3) ul > li,
#colophon .footer_widget_wrap .row > .widget:has(> .textwidget > ul) ul > li {
	break-inside: avoid;
	/* 分列后不需要额外的左缩进占位 */
	list-style: none;
}

/* 窄屏降成 2 列：3 列时每列只有约 60px，中文链接会折行 */
@media (max-width: 1199.98px) {
	#colophon .footer_widget_wrap .row > .widget:nth-child(3) ul,
	#colophon .footer_widget_wrap .row > .widget:has(> .textwidget > ul) ul {
		column-count: 2;
	}
}

/* =========================================================================
 * 19) 搜索结果条目（配合 template-parts/content-search.php）
 * -------------------------------------------------------------------------
 * 背景：搜索从"只搜商品"改成"全站"之后，结果里会出现服务页、方案页、
 *       知识文章等各种内容类型。父主题的结果样式是按博客文章设计的
 *       （"发布于 ×年×月×日　分类："），用在页面上会出现空的"分类："。
 *       所以子主题覆盖了模板，这里配套写样式。
 *
 * 版式：类型徽标 + 标题 + 栏目路径 + 摘要
 * ========================================================================= */
.ks-sr-item {
	padding: 22px 0;
	border-bottom: 1px solid var(--ks-line);
}

.ks-sr-item:first-of-type {
	padding-top: 4px;
}

.ks-sr-head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
}

/* 类型徽标：不同内容类型用不同颜色，便于一眼区分 */
.ks-sr-badge {
	flex: 0 0 auto;
	display: inline-block;
	padding: 2px 9px;
	border-radius: 4px;
	font-size: 12px;
	line-height: 1.7;
	font-weight: 600;
	white-space: nowrap;
	background: #EEF2F7;
	color: #4A5866;
}

.ks-sr-badge--service   { background: #E8F1FB; color: #1A6091; }
.ks-sr-badge--solution  { background: #EAF3EC; color: #256B3A; }
.ks-sr-badge--knowledge { background: #F1EDFB; color: #4B3A9E; }
.ks-sr-badge--case      { background: #FDF0E7; color: #9A5B1E; }
.ks-sr-badge--product   { background: #FDECEF; color: #A32A38; }
.ks-sr-badge--support,
.ks-sr-badge--area,
.ks-sr-badge--about,
.ks-sr-badge--contact   { background: #EEF2F7; color: #4A5866; }

.ks-sr-title {
	margin: 0;
	padding: 0;
	font-size: 18px;
	line-height: 1.5;
	flex: 1 1 auto;
	min-width: 0;
}

.ks-sr-title::after,
.ks-sr-title::before {
	display: none;
}

.ks-sr-title a {
	color: var(--ks-dark);
	text-decoration: none;
}

.ks-sr-title a:hover,
.ks-sr-title a:focus {
	color: var(--secondary-color, #4E53C8);
	text-decoration: underline;
}

/* 栏目路径：让访客知道这条结果在站内的位置 */
.ks-sr-path {
	margin: 7px 0 0;
	font-size: 13px;
	line-height: 1.7;
	color: var(--ks-muted);
}

.ks-sr-path a {
	color: var(--ks-muted);
	text-decoration: none;
}

.ks-sr-path a:hover {
	color: var(--secondary-color, #4E53C8);
	text-decoration: underline;
}

.ks-sr-sep {
	margin: 0 6px;
	color: #B7C1CC;
}

.ks-sr-excerpt {
	margin: 9px 0 0;
	font-size: 14.5px;
	line-height: 1.85;
	color: #55606D;
}

@media (max-width: 767px) {
	.ks-sr-item {
		padding: 18px 0;
	}

	.ks-sr-title {
		font-size: 16.5px;
	}

	.ks-sr-excerpt {
		font-size: 13.5px;
	}
}

/* =========================================================================
 * 20) 搜索无结果 / 404 的下一步引导（配合 template-parts/content-none.php）
 * -------------------------------------------------------------------------
 * 搜索改成全站之后，无结果页就是"最后一公里"。只写一句"换个词试试"
 * 等于把访客送走，所以这里给三条建议 + 常用入口。
 * ========================================================================= */
.ks-no-result .page-title {
	margin-bottom: 14px;
}

.ks-no-result-tips {
	max-width: 720px;
	margin: 0 0 22px;
	padding: 0;
	list-style: none;
}

.ks-no-result-tips li {
	position: relative;
	padding-left: 18px;
	margin-bottom: 7px;
	font-size: 15px;
	line-height: 1.85;
	color: #55606D;
}

.ks-no-result-tips li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 11px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--secondary-color, #4E53C8);
	opacity: .55;
}

.ks-no-result-tips a {
	color: var(--secondary-color, #4E53C8);
	font-weight: 600;
	text-decoration: none;
}

.ks-no-result-tips a:hover {
	text-decoration: underline;
}

/* 常用入口：一排小按钮，可换行 */
.ks-no-result-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 26px;
}

.ks-no-result-links a {
	display: inline-block;
	padding: 8px 16px;
	border: 1px solid var(--ks-line);
	border-radius: 6px;
	background: #fff;
	font-size: 14px;
	color: var(--ks-dark);
	text-decoration: none;
	transition: border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.ks-no-result-links a:hover,
.ks-no-result-links a:focus {
	border-color: var(--secondary-color, #4E53C8);
	color: var(--secondary-color, #4E53C8);
	box-shadow: 0 4px 12px rgba(20, 48, 74, .07);
}

.ks-no-result-search {
	max-width: 520px;
}

.ks-no-result-search-label {
	margin: 0 0 8px;
	font-size: 14px;
	color: var(--ks-muted);
}

.ks-no-result-search input[type="search"] {
	width: 100%;
	max-width: 380px;
	padding: 10px 14px;
	border: 1px solid var(--ks-line);
	border-radius: 6px;
	font-size: 15px;
	background: #fff;
}

.ks-no-result-search input[type="search"]:focus {
	outline: none;
	border-color: var(--secondary-color, #4E53C8);
}

.ks-no-result-search button,
.ks-no-result-search input[type="submit"] {
	margin-top: 10px;
	padding: 9px 22px;
	border: 0;
	border-radius: 6px;
	background: var(--secondary-color, #4E53C8);
	color: #fff;
	font-size: 14px;
	cursor: pointer;
}

@media (max-width: 767px) {
	.ks-no-result-tips li {
		font-size: 14px;
	}

	.ks-no-result-links a {
		padding: 7px 13px;
		font-size: 13.5px;
	}
}

/* =========================================================================
 * 21) 面包屑（配合 inc/keshi-seo.php）
 * -------------------------------------------------------------------------
 * 位置：`<main>` 开头、正文之前（挂在 the9_store_container_wrap_start 优先级 11）。
 * 页面大标题在页面顶部的 banner 里，面包屑紧随其后落在正文上方，
 * 既符合层级阅读习惯，也不改动主题原有的 banner 结构。
 *
 * 样式上刻意做得比正文轻：字号 13px、灰色，只在悬停和"当前页"上加权重，
 * 避免和页面标题抢视线。
 * ========================================================================= */
.ks-crumb {
	margin: 0 0 20px;
	font-size: 13px;
	line-height: 1.7;
	color: var(--ks-muted);
}

.ks-crumb ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ks-crumb li {
	display: inline-flex;
	align-items: center;
	min-width: 0;
}

.ks-crumb a {
	color: var(--ks-muted);
	text-decoration: none;
	transition: color .2s ease;
}

.ks-crumb a:hover,
.ks-crumb a:focus {
	color: var(--secondary-color, #4E53C8);
	text-decoration: underline;
}

.ks-crumb-sep {
	margin: 0 7px;
	color: #BCC5D0;
}

/* 当前页：加重一点，并允许长标题换行而不是撑破布局 */
.ks-crumb [aria-current="page"] {
	color: var(--ks-text);
	font-weight: 600;
	overflow-wrap: anywhere;
}

/* 首页不显示面包屑，这里不加任何额外间距 */
.home .ks-crumb,
.front-page .ks-crumb {
	display: none;
}

@media (max-width: 767px) {
	.ks-crumb {
		margin-bottom: 14px;
		font-size: 12.5px;
	}

	.ks-crumb-sep {
		margin: 0 5px;
	}
}

/* =========================================================================
 * 22) 首页首屏文字（.ks-hero-text）
 * -------------------------------------------------------------------------
 * 背景：原来首页首屏只有三张横幅图片，标题、说明、按钮都"画在图里"，
 * 页面里没有任何 H1 —— 图片没加载、读屏软件、搜索引擎抓取时，
 * 读不到"这家公司在哪、做什么、怎么联系"。审计文档列为首要问题。
 *
 * 现在的做法：真实 HTML（H1 + 一段说明 + 三个按钮），放在轮播**下方**。
 *
 * 为什么不叠在图上：
 *   · 横幅图片本身已经把标题画在图里，再叠一层等于同一句话出现两次
 *   · 叠图还需要一层深色渐变去压海报，画面更挤
 *   · 搜索引擎与 AI 读的是 HTML 本身，文字在图上还是图下没有区别，
 *     SEO/GEO 的价值完全保留
 *   · 桌面与手机现在是同一种排布，只需调整字号，不用再写两套布局
 * ========================================================================= */

.ks-hero-text {
	margin-top: 18px;
}

.ks-hero-title {
	margin: 0 0 10px;
	padding: 0;
	font-size: 30px;
	line-height: 1.4;
	font-weight: 700;
	color: var(--ks-text);
}

.ks-hero-title::after,
.ks-hero-title::before {
	display: none;
}

.ks-hero-desc {
	margin: 0;
	font-size: 15px;
	line-height: 1.85;
	color: #5A6572;
}

.ks-hero-btns {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 18px;
}

.ks-hero-btn {
	display: inline-block;
	padding: 11px 24px;
	border: 1px solid var(--ks-line);
	border-radius: 6px;
	background: #fff;
	font-size: 15px;
	line-height: 1.4;
	color: var(--ks-text);
	text-decoration: none;
	white-space: nowrap;
	transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.ks-hero-btn:hover,
.ks-hero-btn:focus {
	border-color: var(--secondary-color, #4E53C8);
	color: var(--secondary-color, #4E53C8);
	text-decoration: none;
}

.ks-hero-btn--primary {
	border-color: var(--secondary-color, #4E53C8);
	background: var(--secondary-color, #4E53C8);
	color: #fff;
}

.ks-hero-btn--primary:hover,
.ks-hero-btn--primary:focus {
	background: #3B40B0;
	border-color: #3B40B0;
	color: #fff;
}

/* -------------------------------------------------------------------------
 * 平板：字号收一档
 * ---------------------------------------------------------------------- */
@media (max-width: 1199px) {
	.ks-hero-title {
		font-size: 25px;
	}

	.ks-hero-desc {
		font-size: 14px;
	}

	.ks-hero-btn {
		padding: 10px 20px;
		font-size: 14px;
	}
}

/* -------------------------------------------------------------------------
 * 手机：只收字号，不再需要重排布局
 *
 * 早期文字浮在图上、圆点绝对定位压着内容，才需要用 flex + order 重排。
 * 现在文字本来就在轮播下方，圆点也回到文档流，这些重排规则都不需要了。
 * 左右箭头也恢复显示 —— 当初隐藏它，只是因为它被叠加的文字层挡住了。
 * ---------------------------------------------------------------------- */
@media (max-width: 991px) {
	.ks-hero-text {
		margin-top: 14px;
	}

	.ks-hero-title {
		font-size: 21px;
		margin-bottom: 8px;
	}

	.ks-hero-desc {
		font-size: 13.5px;
		line-height: 1.8;
	}

	.ks-hero-btns {
		gap: 9px;
		margin-top: 14px;
	}

	.ks-hero-btn {
		flex: 1 1 auto;
		padding: 9px 14px;
		font-size: 13.5px;
		text-align: center;
	}
}

/* 深色区域中的说明链接保持可读；键盘焦点不依赖悬停。 */
.home #content .ks-sec--form .ks-form-note a { color: #d5eaff; text-decoration: underline; }
.ks-head-search:focus-within { outline: 2px solid var(--ks-primary, #1764b5); outline-offset: 3px; }
#navbar a:focus-visible, #navbar button:focus-visible { outline: 2px solid #2677c9; outline-offset: -3px; }
/* 顶栏按整项换行，避免欢迎语把联系方式挤成逐字竖排。 */
.top-bar-wrap .container { gap: 16px; }
.top-bar-wrap .left-menu { min-width: 0; }
.top-bar-wrap .right-menu { flex-shrink: 0; }
.top-bar-wrap .top-bar-menu > ul { flex-wrap: wrap; }
.top-bar-wrap .top-bar-menu > ul > li > a { white-space: nowrap; }
@media (max-width: 991px) {
	.top-bar-wrap .left-menu { display: none; }
	.top-bar-wrap .right-menu, .top-bar-wrap .top-bar-menu { width: 100%; }
	.top-bar-wrap .top-bar-menu > ul { justify-content: space-between; gap: 0 12px; }
	.top-bar-wrap .top-bar-menu > ul > li { margin: 0; }
	.top-bar-wrap .top-bar-menu > ul > li > a { padding: 9px 0; }
}

/* 极窄手机：按钮两行排开 */
@media (max-width: 400px) {
	.ks-hero-btn {
		flex: 1 1 100%;
	}
}

/* =========================================================================
 * 23) 企业事实表 与 最后更新日期
 * -------------------------------------------------------------------------
 * 内容全部来自后台（企业资料设置 + 文章修改时间），这里只负责排版：
 *   · 事实表第一列收窄，两列在同一行读起来更像"资料卡"
 *   · "最后更新"用弱化的小字，接在正文末尾，不抢内容
 * ========================================================================= */
.ks-facts th[scope="row"],
.ks-sla th[scope="row"] {
	width: 28%;
	min-width: 96px;
	white-space: nowrap;
}

.ks-facts td,
.ks-sla td {
	word-break: break-word;
}

.ks-sla-note {
	margin-top: 10px;
	font-size: 13px;
	color: #6B7684;
}

.ks-updated {
	margin: 28px 0 0;
	padding-top: 14px;
	border-top: 1px solid var(--ks-line);
	font-size: 13px;
	color: #8A94A0;
}

.ks-updated time {
	font-variant-numeric: tabular-nums;
}

@media (max-width: 480px) {
	.ks-facts th[scope="row"],
	.ks-sla th[scope="row"] {
		width: auto;
		min-width: 0;
		white-space: normal;
	}
}

/* =========================================================================
 * 25) 页脚可见性兜底
 * -------------------------------------------------------------------------
 * 父主题给页脚小工具加了 data-aos="fade-up"，初始 opacity:0，靠滚动触发动画。
 * 实测：正常滚动会正常淡入；但如果页面**一打开就已经滚到页脚**（例如访问
 * /#colophon、或浏览器恢复上次滚动位置），AOS 不会触发，页脚会永久停在
 * opacity:0 —— 联系方式、服务导航这些关键内容全部看不见。
 *
 * 页脚是全站导航与联系信息，不应该依赖动画脚本才可见，所以这里固定为可见。
 * 只压掉透明度，保留位移动画。这条与本次首页改版无关，是父主题的既有行为。
 * ========================================================================= */
#colophon .widget {
	opacity: 1 !important;
}

/* =========================================================================
 * 26) 首页卡片两列排布（手机）
 * -------------------------------------------------------------------------
 * 背景：首页压缩后，剩下的卡片在手机上仍是竖着一列堆叠，
 * 四张卡就要滚一屏多。改成两列后，同样的内容只需要一半高度。
 *
 * 只作用于加了 .ks-cards--2up 的卡片行 —— 文字较长的"两大业务板块"
 * 不加这个类，保持单列，避免长句子在 160px 宽里被切得很难读。
 * ========================================================================= */
@media (max-width: 767px) {
	.home #content .ks-cards--2up {
		flex-wrap: wrap;
	}

	.home #content .ks-cards--2up > .wp-block-column {
		flex-basis: calc(50% - 7px) !important;
		max-width: calc(50% - 7px);
	}

	.home #content .ks-cards--2up .ks-card {
		padding: 16px 14px;
	}

	.home #content .ks-cards--2up .ks-card h3 {
		font-size: 15px;
		line-height: 1.4;
	}

	.home #content .ks-cards--2up .ks-ico {
		margin-bottom: 10px;
	}

	.home #content .ks-cards--2up .ks-ico i {
		width: 38px;
		height: 38px;
		font-size: 19px;
	}

	.home #content .ks-cards--2up .ks-more {
		margin-top: 8px;
		font-size: 13px;
	}
}

/* =========================================================================
 * 27) 商品主图统一取景框（所有宽度）
 * -------------------------------------------------------------------------
 * 问题：商品图的实际比例并不一致 —— 实测夏普机型是 280×210（4:3）、
 * 理光是 300×300（1:1）。同一行里就会显示成 381×285 与 381×381，
 * 卡片高度 572 / 667，看起来一大一小、不规整。
 *
 * 第 15 节里其实已经写过 4:3 取景框，但那条被放在 @media (max-width:991px) 里，
 * 桌面端（≥992px）根本没生效 —— 所以 PC 上才是原样。这里补一条全局规则。
 *
 * 用 contain 而不是 cover：等比缩放、不裁剪，白底商品图不会掉内容。
 * ========================================================================= */
.woocommerce ul.products li.product .product-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: contain;
}

/*
 * 关键一步：图片外面还套着 <figure>。
 * 它作为 flex 项会按内容收缩到"原图宽度"（实测夏普 280px、理光 300px），
 * 于是 img 的 width:100% 只是相对这个 figure 算的 —— 结果两张图仍然一大一小。
 * 让 figure 占满 .product-image 的宽度，两张图才会真正一样大。
 */
.woocommerce ul.products li.product .product-image figure {
	width: 100%;
	margin: 0;
}

/* 图片容器同样居中，避免两张图在各自框里位置不一致 */
.woocommerce ul.products li.product .product-image {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
}