/*
Theme Name: Kesen
Theme URI: https://kesensetech.com/en/
Author: Kesen
Author URI: https://kesensetech.com/
Description: Standalone theme for the Kesen English export site (environmental monitoring instruments). No parent theme required, no external framework. Page body content carries the layout that was developed in the static build, and this theme supplies only the site shell.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.1
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kesen
Tags: custom-menu, featured-images, translation-ready, one-column, two-columns, block-styles
*/

/* --------------------------------------------------------------------------
   主题主样式只做三件事：
   1. 输出站点头部、导航、页脚外壳（其余样式在 assets/kesen.css）
   2. 让 WordPress 默认的图文/画廊/引用块与正文中已有的 class 视觉一致
   3. 表格与代码块在各页 CSS 里没有定义，这里统一补上
   正文排版本身不在这里 —— 它由 assets/kesen.css 的静态页内联样式合并段提供，
   全部选择器都被 :where() 降权，编辑时不会被后台改动。
   -------------------------------------------------------------------------- */

body {
	margin: 0;
	background-color: #fff;
	color: #16202a;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.7;
}

a { color: #155e9e; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* 古腾堡内容宽度与静态站一致 */
.entry-content { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.entry-content > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.entry-content .alignwide { max-width: 1180px; }
.entry-content .alignfull { max-width: none; }

/* 表格：静态站的产品规格表全部是 <table>，编辑器也需要能看 */
.entry-content table { border-collapse: collapse; width: 100%; margin: 16px 0 20px; font-size: 14px; }
.entry-content th,
.entry-content td { border: 1px solid #e2e8ee; padding: 8px 11px; text-align: left; vertical-align: top; }
.entry-content thead th { background: #f0f4f8; color: #3d4b59; font-size: 12.5px; letter-spacing: .4px; text-transform: uppercase; }
.entry-content tbody tr:nth-child(even) { background: #fcfdfe; }

.entry-content code { background: #f0f4f8; color: #084e46; padding: 1px 5px; border-radius: 4px; font-size: 12.3px; }
.entry-content pre { background: #f0f4f8; padding: 12px 14px; border-radius: 8px; overflow-x: auto; font-size: 12.8px; }
.entry-content pre code { background: none; padding: 0; }

.entry-content blockquote {
	margin: 18px 0;
	padding: 12px 18px;
	border-left: 3px solid #0b6e63;
	background: #fcfdfe;
	color: #3d4b59;
}
.entry-content blockquote cite { display: block; margin-top: 6px; font-size: 13px; color: #6b7a89; }

.entry-content figure { margin: 18px 0; }
.entry-content figcaption { font-size: 12.5px; color: #6b7a89; margin-top: 6px; }

/* 编辑器里不要出现静态站的水印框（那只是交付期的拍摄提醒） */
.entry-content .kesen-photo-notice { display: none; }

/* 表单保护：后台不显示插件渲染的表单输入框之外的多余控件 */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

@media (max-width: 600px) {
	.entry-content { padding: 0 16px; }
}

/* 产品列表缩略图：卡片是主题渲染的，样式不走静态页那份作用域化的 CSS */
.kesen-product-thumb-wrap { display: block; margin: 0 0 10px; line-height: 0; }
.kesen-product-thumb { display: block; width: 100%; height: auto; border-radius: 6px; background: #f4f6f8; }
.kesen-product-photo { margin: 18px 0; }
.kesen-product-photo .kesen-product-thumb { border-radius: 8px; }

/* 首页顶部 hero 产品图带：导入前就能显示（主题自带资源），保证落地页首屏有图 */
.kesen-hero-gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	margin: 26px 0 6px;
}
.kesen-hero-gallery .kesen-hero-figure {
	margin: 0;
	border: 1px solid #e2e8ee;
	border-radius: 10px;
	overflow: hidden;
	background: #f4f6f8;
}
.kesen-hero-gallery .kesen-hero-figure img {
	display: block;
	width: 100%;
	height: 240px;
	object-fit: cover;
}
@media (max-width: 600px) {
	.kesen-hero-gallery { grid-template-columns: 1fr; }
	.kesen-hero-gallery .kesen-hero-figure img { height: 200px; }
}

/* 首页产品展示区：浅色分隔带，把落地页正文与产品网格视觉分开 */
.kesen-home-showcase {
	background: #f6f9f8;
	border-top: 1px solid #e2e8ee;
	border-bottom: 1px solid #e2e8ee;
	margin: 40px 0 0;
	padding: 34px 0 42px;
}
