/*
Theme Name: SHENYE
Theme URI: https://shenye.sites.vantom.cn/
Author: Henan Shenye Trading Co., Ltd.
Description: Block theme for the SHENYE overseas store. Visual system follows the SHENYE brand guidelines: deep green, rattan brass, sand beige, ink black and paper white, set in Montserrat. Business logic lives in the shenye-core plugin.
Requires at least: 7.0
Requires PHP: 8.0
Version: 0.2.8
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: shenye
Tags: full-site-editing, block-patterns, e-commerce, rtl-language-support
*/

/*
 * 颜色、字体、字号、间距、按钮样式都定义在 theme.json 里。
 * 这个文件只放 theme.json 表达不了的东西：标志尺寸、页头布局、几个版式细节。
 * 改配色或字号请改 theme.json，不要在这里覆盖。
 */

/* ---------- 次要按钮（描边） ---------- */

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	border: 1px solid currentColor;
	color: inherit;
}

/*
 * 悬停反色必须带 !important：区块调色板类（.has-paper-color 等）由 WordPress
 * 以 !important 输出，否则深底上的描边按钮悬停后会出现白底白字。
 */
.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:focus-visible {
	background-color: var(--wp--preset--color--paper) !important;
	border-color: var(--wp--preset--color--paper) !important;
	color: var(--wp--preset--color--green) !important;
}

/* ---------- 标志 ---------- */

.shenye-logo {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
}

.shenye-logo a {
	display: inline-flex;
	text-decoration: none;
}

.shenye-logo svg {
	display: block;
	width: 9.5rem;
	height: auto;
}

.shenye-logo--reverse svg {
	width: 11rem;
}

/* ---------- 页头 ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background-color: var(--wp--preset--color--paper);
	border-bottom: 1px solid rgba(22, 19, 16, 0.14);
}

/* WooCommerce 在迷你购物车旁自动加入的"我的账户"入口，改成品牌色 */

.site-header .wc-block-customer-account__link,
.site-header .wc-block-mini-cart__button {
	color: var(--wp--preset--color--ink);
	border-radius: 2px;
}

.site-header .wc-block-customer-account__link:hover,
.site-header .wc-block-mini-cart__button:hover {
	color: var(--wp--preset--color--brass-deep);
}

/* 页头里的报价按钮：与导航同高，不拉伸 */

.site-header .wp-block-button.shenye-header__quote {
	margin-block: 0;
}

.site-header .wp-block-button.shenye-header__quote .wp-block-button__link {
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
	white-space: nowrap;
}

/* 菜单里只给移动端看的报价入口 */
.site-header .shenye-nav-quote {
	display: none;
}

@media (max-width: 599px) {
	.site-header {
		position: static;
	}

	/* 窄屏放不下"标志 + 汉堡 + 账户 + 报价按钮 + 购物车"，
	   报价按钮收进菜单，入口也留在页脚 */
	.site-header .shenye-header__quote {
		display: none;
	}

	.site-header .wp-block-group.alignwide {
		gap: var(--wp--preset--spacing--30);
	}

	.site-header .shenye-nav-quote {
		display: list-item;
	}

	.site-header .shenye-nav-quote > a {
		color: var(--wp--preset--color--brass);
	}
}

.site-header .wp-block-navigation ul {
	gap: var(--wp--preset--spacing--40);
}

/* 导航在小屏幕上折叠成覆盖层，用品牌墨绿做底 */

.site-header .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--green);
	color: var(--wp--preset--color--paper);
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
}

.site-header .wp-block-navigation__responsive-container.is-menu-open a,
.site-header .wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--paper);
}

/* ---------- 图形标 ---------- */

.shenye-symbol svg {
	display: block;
	width: 100%;
	height: auto;
	max-width: 22rem;
	margin-inline: auto;
}

/* ---------- 等宽数字：价格与尺寸 ---------- */

.shenye-numeric,
.wp-block-woocommerce-product-price,
.woocommerce-Price-amount,
td.shenye-spec-table__value,
th.shenye-spec-table__value {
	font-variant-numeric: tabular-nums;
}

/* ---------- 表格 ---------- */

.wp-block-table table,
.shenye-spec-table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}

.wp-block-table th,
.wp-block-table td,
.shenye-spec-table th,
.shenye-spec-table td {
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--20);
	border-bottom: 1px solid rgba(22, 19, 16, 0.14);
	text-align: left;
	vertical-align: top;
}

.wp-block-table thead th {
	color: var(--wp--preset--color--brass-deep);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.wp-block-table figcaption,
.wp-block-table caption {
	margin-top: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--x-small);
	text-align: left;
}

/* 参数表：左列是项目名，右列是数值 */

.shenye-spec-table th {
	width: 40%;
	font-weight: 400;
}

.shenye-spec-table td {
	font-weight: 600;
}

/* ---------- 折叠问答 ---------- */

.wp-block-details {
	border-bottom: 1px solid rgba(22, 19, 16, 0.14);
	padding: var(--wp--preset--spacing--30) 0;
}

.wp-block-details summary {
	font-weight: 600;
	line-height: 1.4;
}

.wp-block-details > * + * {
	margin-top: var(--wp--preset--spacing--20);
}

.wp-block-details p {
	font-weight: 400;
}

/* ---------- 页头标题区 ---------- */

.shenye-page-head .wp-block-post-excerpt {
	margin-top: 0;
	color: var(--wp--preset--color--ink);
}

/* ---------- 小屏 ---------- */

@media (max-width: 781px) {
	.shenye-logo svg {
		width: 7.5rem;
	}
}

@media (max-width: 479px) {
	.shenye-logo svg {
		width: 7rem;
	}
}

/* ---------- 图片模块 ---------- */

/* 首屏：图片上压一层墨绿，文字靠左，小屏时高度收一点 */
.shenye-hero {
	border-bottom: 1px solid var(--wp--preset--color--brass);
}

.shenye-hero .wp-block-cover__image-background {
	object-position: 62% 50%;
}

.shenye-hero .wp-block-cover__inner-container > .wp-block-group {
	margin-right: auto;
}

@media (max-width: 781px) {
	.shenye-hero {
		min-height: 520px !important;
	}

	.shenye-hero .wp-block-cover__image-background {
		object-position: 70% 50%;
	}
}

/* 场景与生产过程的小图：统一 4:3 裁切，避免高度参差 */
.shenye-scene-img {
	margin: 0;
}

.shenye-scene-img img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* 使用体验、工厂页的大图 */
.shenye-experience-img,
.shenye-wide-img {
	margin: 0;
}

.shenye-experience-img img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.shenye-wide-img img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.shenye-factory-main img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

/* 深底上的图片说明 */
.is-style-outline .wp-block-button__link,
.shenye-hero .wp-block-button__link {
	backdrop-filter: none;
}

/* ---------- 首页首屏轮播 ---------- */

.shenye-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.shenye-hero-slider {
	position: relative;
	min-height: 660px;
	overflow: hidden;
	background-color: var(--wp--preset--color--green);
	border-bottom: 1px solid var(--wp--preset--color--brass);
}

.shenye-hero-slider__media,
.shenye-hero-slider__img {
	position: absolute;
	inset: 0;
}

.shenye-hero-slider__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 62% 50%;
	opacity: 0;
	transition: opacity 900ms ease;
}

.shenye-hero-slider__img.is-active {
	opacity: 1;
}

.shenye-hero-slider__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(22, 19, 16, 0.86) 0%, rgba(34, 67, 58, 0.62) 42%, rgba(34, 67, 58, 0.12) 78%, rgba(34, 67, 58, 0) 100%), linear-gradient(180deg, rgba(22, 19, 16, 0.12) 0%, rgba(22, 19, 16, 0) 30%, rgba(22, 19, 16, 0.42) 100%);
}

.shenye-hero-slider__inner {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 660px;
	max-width: 1240px;
	margin: 0 auto;
	padding: var(--wp--preset--spacing--70) var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
}

.shenye-hero-slider__copy {
	position: absolute;
	max-width: 600px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 600ms ease;
}

.shenye-hero-slider__copy.is-active {
	opacity: 1;
	visibility: visible;
}

.shenye-hero-slider__eyebrow {
	margin: 0 0 var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--sand);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.28em;
	text-transform: uppercase;
}

.shenye-hero-slider__title {
	margin: 0 0 var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--paper);
	font-size: clamp(2rem, 1.2rem + 2.6vw, 3rem);
	font-weight: 300;
	line-height: 1.15;
	letter-spacing: 0.02em;
}

.shenye-hero-slider__text {
	margin: 0;
	max-width: 34em;
	color: var(--wp--preset--color--paper);
	font-size: 1.0625rem;
	line-height: 1.65;
}

.shenye-hero-slider__actions {
	position: absolute;
	left: var(--wp--preset--spacing--40);
	right: var(--wp--preset--spacing--40);
	bottom: var(--wp--preset--spacing--50);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--30);
	flex-wrap: wrap;
}

.shenye-hero-slider__actions .wp-block-buttons {
	margin: 0;
}

.shenye-hero-slider__controls {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
}

.shenye-hero-slider__arrow {
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid rgba(250, 248, 244, 0.5);
	background: transparent;
	color: var(--wp--preset--color--paper);
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	border-radius: 2px;
}

.shenye-hero-slider__arrow:hover,
.shenye-hero-slider__arrow:focus-visible {
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--green);
}

.shenye-hero-slider__dots {
	display: flex;
	align-items: center;
	gap: 6px;
}

.shenye-hero-slider__dot {
	width: 7px;
	height: 7px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(250, 248, 244, 0.42);
	cursor: pointer;
	transition: background 200ms ease, transform 200ms ease;
}

.shenye-hero-slider__dot:hover {
	background: rgba(250, 248, 244, 0.75);
}

.shenye-hero-slider__dot.is-active {
	background: var(--wp--preset--color--brass);
	transform: scale(1.35);
}

.shenye-hero-slider__controls {
	background: rgba(22, 19, 16, 0.28);
	padding: 6px 8px;
	border-radius: 2px;
}

@media (max-width: 781px) {
	.shenye-hero-slider {
		min-height: 0;
	}

	.shenye-hero-slider__inner {
		min-height: 560px;
		flex-direction: column;
		justify-content: flex-end;
		padding-bottom: var(--wp--preset--spacing--40);
	}

	.shenye-hero-slider__img {
		object-position: 70% 30%;
	}

	/* 小屏改成流式：当前这一屏的文案参与排版，按钮跟在文案下面，不会互相压住 */
	.shenye-hero-slider__copy {
		position: static;
		display: none;
		max-width: none;
		opacity: 1;
		visibility: visible;
	}

	.shenye-hero-slider__copy.is-active {
		display: block;
	}

	.shenye-hero-slider__actions {
		position: static;
		margin-top: var(--wp--preset--spacing--40);
		flex-direction: column;
		align-items: flex-start;
	}

	.shenye-hero-slider__controls {
		display: none;
	}

	.shenye-hero-slider__text {
		font-size: 1rem;
	}
}

/* 短代码输出的档位表在正文窄栏里也能铺开 */
.shenye-tier-table {
	width: 100%;
	max-width: none;
	margin: 0;
}

@media (max-width: 781px) {
	.shenye-tier-table {
		width: 100%;
	}

	.shenye-tier-table th,
	.shenye-tier-table td {
		padding: 0.5rem 0.25rem;
		font-size: 0.75rem;
	}
}

/* 页面顶部的图片条：左侧压深一点，保证文字可读 */
.shenye-page-cover .wp-block-cover__background {
	/* 遮罩改成整块不透明，用渐变自身的透明度控制深浅，避免和 cover 的透明度相乘 */
	opacity: 1 !important;
	background: linear-gradient(90deg, rgba(22, 19, 16, 0.86) 0%, rgba(22, 19, 16, 0.62) 38%, rgba(34, 67, 58, 0.38) 72%, rgba(34, 67, 58, 0.22) 100%) !important;
}

/* 商店页简介：与标题同一条左边界，正文限宽便于阅读 */
.shenye-shop-intro {
	max-width: none;
}

.shenye-shop-intro__body > * {
	max-width: 720px;
}

/* 表单控件：下拉、数量框统一成纸白底 + 沙岩描边，箭头用藤金细线 */
select,
select.orderby,
form.cart select,
.woocommerce-variation select,
table.variations select {
	appearance: none;
	-webkit-appearance: none;
	font-family: inherit;
	font-size: 0.9375rem;
	line-height: 1.4;
	color: var(--wp--preset--color--ink);
	background-color: var(--wp--preset--color--paper);
	border: 1px solid rgba(176, 129, 63, 0.38);
	border-radius: 0;
	padding: 0.6rem 2.4rem 0.6rem 0.85rem;
	min-width: 11rem;
	max-width: 100%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23B0813F' stroke-width='1.4' stroke-linecap='square'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.9rem center;
	background-size: 11px 8px;
	cursor: pointer;
	transition: border-color 160ms ease;
}

select:hover {
	border-color: var(--wp--preset--color--brass);
}

select:focus-visible {
	outline: none;
	border-color: var(--wp--preset--color--green);
	box-shadow: 0 0 0 1px var(--wp--preset--color--green);
}

/* 排序下拉跟在结果计数右边，不要撑满 */
.wp-block-woocommerce-catalog-sorting select,
select.orderby {
	min-width: 12rem;
	font-size: 0.8125rem;
	padding: 0.45rem 2.2rem 0.45rem 0.75rem;
}

/* 商品页颜色选择：表格改成上下两块，整行铺开，与加入购物车按钮同宽 */
table.variations {
	width: 100%;
	margin: 0 0 var(--wp--preset--spacing--30);
	border-collapse: collapse;
}

table.variations tbody,
table.variations tr,
table.variations th.label,
table.variations td.value {
	display: block;
	width: 100%;
	padding: 0;
	text-align: left;
}

table.variations th.label label {
	font-size: 0.6875rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brass-deep);
}

table.variations td.value select {
	width: 100%;
	margin-top: 0.35rem;
}

/* WooCommerce 自带样式里的 .variations select 优先级更高，这里补一条更具体的选择器 */
.wp-block-woocommerce-add-to-cart-form .variations td.value select,
form.variations_form table.variations td.value select,
.single-product table.variations td.value select {
	width: 100%;
	min-width: 0;
	font-size: 0.9375rem;
	line-height: 1.4;
	padding: 0.6rem 2.4rem 0.6rem 0.85rem;
}

/* 重置变体链接 */
.reset_variations {
	display: inline-block;
	margin-top: 0.35rem;
	font-size: 0.75rem;
	color: var(--wp--preset--color--brass-deep);
}

/* 数量框 */
.quantity input.qty,
input.qty {
	width: 4rem;
	min-height: 44px;
	padding: 0 0.5rem;
	font-family: inherit;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--paper);
	border: 1px solid var(--wp--preset--color--sand);
	border-radius: 0;
	text-align: center;
}

.quantity input.qty:focus-visible {
	outline: none;
	border-color: var(--wp--preset--color--green);
}

/* 单行文本类输入框：搜索、结账、账户表单统一成同一套边框 */
input:not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
textarea {
	font-family: inherit;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--ink);
	background-color: var(--wp--preset--color--paper);
	border: 1px solid rgba(176, 129, 63, 0.38);
	border-radius: 0;
}

input:not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):focus,
textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--green);
	box-shadow: 0 0 0 1px var(--wp--preset--color--green);
}

/* 搜索表单：输入框与按钮同高，和下面的按钮留出间距 */
.wp-block-search {
	margin-bottom: var(--wp--preset--spacing--40);
}

.wp-block-search__input {
	min-height: 48px;
	padding: 0 0.9rem;
}

.wp-block-search__button {
	margin-left: 0.5rem;
	min-height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* 变体价格与库存提示 */
.woocommerce-variation-price {
	margin-bottom: var(--wp--preset--spacing--30);
}

@media (max-width: 781px) {
	select,
	select.orderby {
		min-width: 0;
		width: 100%;
	}
}

/* 页脚社媒：图标与文字同色，悬停提亮 */
.shenye-social {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
	margin: 1.1rem 0 0.9rem;
}

.shenye-social__link {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	text-decoration: none;
	color: var(--wp--preset--color--sand);
	opacity: 0.9;
	transition: opacity 160ms ease, color 160ms ease;
}

.shenye-social__link:hover,
.shenye-social__link:focus-visible {
	color: var(--wp--preset--color--paper);
	opacity: 1;
}

.shenye-social__link svg {
	flex: none;
}

.shenye-footer__entity {
	max-width: 34rem;
	opacity: 0.72;
	line-height: 1.6;
	margin-top: 0.6rem !important;
}

/* DDP 承诺块：零售卡里的硬承诺，视觉上要压过周围文案 */
.shenye-promise {
	border-left: 3px solid var(--wp--preset--color--green);
	background: rgba(34, 67, 58, 0.06);
	padding: 1rem 1.15rem;
	margin: 1.25rem 0 1.5rem;
}

.shenye-promise__head {
	font-family: inherit;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--green);
	margin: 0 0 0.4rem;
}

.shenye-promise__body {
	font-size: 1rem;
	line-height: 1.6;
	margin: 0;
	color: var(--wp--preset--color--ink);
}

.shenye-promise__note {
	font-size: 0.8125rem;
	line-height: 1.55;
	color: rgba(22, 19, 16, 0.68);
	margin: 0.5rem 0 0;
}

/* 三项硬指标 */
.shenye-spec {
	border-top: 1px solid rgba(176, 129, 63, 0.45);
	padding-top: 1rem;
	height: 100%;
}

.shenye-spec__figure {
	font-size: clamp(1.75rem, 2.6vw, 2.35rem);
	font-weight: 300;
	line-height: 1.1;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--green);
	margin: 0 0 0.25rem;
}

.shenye-spec__label {
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brass-deep);
	margin: 0 0 0.7rem;
}

.shenye-spec__text {
	font-size: 0.875rem;
	line-height: 1.65;
	color: rgba(22, 19, 16, 0.78);
	margin: 0;
}

/* 商店页导览：三列小事实 + B2B 引导条 */
.shenye-shop-intro__body > .shenye-shop-facts,
.shenye-shop-intro__body > .shenye-shop-b2b {
	max-width: none;
}

.shenye-shop-facts {
	margin-top: var(--wp--preset--spacing--40);
	padding-top: var(--wp--preset--spacing--30);
	border-top: 1px solid rgba(176, 129, 63, 0.4);
}

.shenye-shop-facts__label {
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brass-deep);
	margin: 0 0 0.35rem !important;
}

.shenye-shop-b2b {
	margin: var(--wp--preset--spacing--50) 0 var(--wp--preset--spacing--40);
}

.shenye-shop-b2b h3 {
	margin-top: 0;
	max-width: 34rem;
}

.shenye-shop-b2b > * {
	max-width: 46rem;
}

/* 批发页的箱规表 */
.shenye-spec-table table {
	font-size: 0.9375rem;
}

.shenye-spec-table th {
	font-size: 0.6875rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brass-deep);
	font-weight: 600;
}

/* 硬指标区块在小屏上不要挤成一条 */
@media (max-width: 781px) {
	.shenye-spec {
		margin-bottom: var(--wp--preset--spacing--40);
	}
}

/* 流程表：三段文字挤在 720 栅格里，收窄首尾列 */
.shenye-stage-table table {
	font-size: 0.875rem;
}

.shenye-stage-table th:nth-child(1),
.shenye-stage-table td:nth-child(1),
.shenye-stage-table th:nth-child(3),
.shenye-stage-table td:nth-child(3) {
	width: 15%;
	white-space: nowrap;
}

/* 图文板块列表：桌面端左右交错，移动端上下堆叠 */
.shenye-blocks {
	display: grid;
	gap: var(--wp--preset--spacing--50);
	margin: var(--wp--preset--spacing--50) 0 0;
}

.shenye-blocks__item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: var(--wp--preset--spacing--50);
	align-items: center;
}

/* 偶数条把图换到右边，形成节奏 */
.shenye-blocks__item:nth-child(even) .shenye-blocks__media {
	order: 2;
}

.shenye-blocks__media {
	margin: 0;
	overflow: hidden;
	background: var(--wp--preset--color--sand);
}

.shenye-blocks__img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.shenye-blocks__title {
	font-size: clamp(1.125rem, 1.6vw, 1.375rem);
	margin: 0 0 0.6rem;
	color: var(--wp--preset--color--green);
}

.shenye-blocks__text {
	font-size: 0.9375rem;
	line-height: 1.7;
	color: rgba(22, 19, 16, 0.78);
	margin: 0 0 1rem;
	max-width: 34rem;
}

.shenye-blocks__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wp--preset--color--brass-deep);
	border-bottom: 1px solid currentColor;
	padding-bottom: 0.15rem;
	transition: color 160ms ease;
}

.shenye-blocks__link:hover,
.shenye-blocks__link:focus-visible {
	color: var(--wp--preset--color--green);
}

/* 没有配图：左侧藤金竖线 + 单栏文字，不留空白格子 */
.shenye-blocks__item.is-text-only {
	grid-template-columns: minmax(0, 1fr);
}

.shenye-blocks__item.is-text-only .shenye-blocks__body {
	border-left: 2px solid var(--wp--preset--color--brass);
	padding-left: var(--wp--preset--spacing--40);
}

@media (max-width: 781px) {
	.shenye-blocks__item {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--wp--preset--spacing--30);
	}

	.shenye-blocks__item:nth-child(even) .shenye-blocks__media {
		order: 0;
	}

	.shenye-blocks__img {
		aspect-ratio: 16 / 10;
	}
}

/* 首页双卡：两栏等高，按钮贴底对齐 */
.shenye-dual-cta.wp-block-columns {
	align-items: stretch;
}

.shenye-dual-cta > .wp-block-column {
	display: flex;
}

.shenye-dual-cta > .wp-block-column > .wp-block-group {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.shenye-dual-cta .wp-block-buttons {
	margin-top: auto;
}

.shenye-dual-cta .shenye-promise {
	margin-bottom: 1.25rem;
}

/* ---------- Resources & Buying Guides ---------- */

.shenye-guides {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--50);
	margin-top: var(--wp--preset--spacing--60);
}

.shenye-guides__card {
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--paper);
	border: 1px solid rgba(176, 129, 63, 0.35);
	transition: border-color 160ms ease, transform 160ms ease;
}

.shenye-guides__card:hover {
	border-color: var(--wp--preset--color--brass);
	transform: translateY(-2px);
}

.shenye-guides__media {
	display: block;
	overflow: hidden;
	background: var(--wp--preset--color--sand);
}

.shenye-guides__media img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.shenye-guides__body {
	padding: var(--wp--preset--spacing--40);
	display: flex;
	flex-direction: column;
	flex: 1;
}

.shenye-guides__meta {
	font-size: 0.6875rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brass-deep);
	margin: 0 0 0.5rem;
}

.shenye-guides__title {
	font-size: 1.125rem;
	line-height: 1.35;
	margin: 0 0 0.6rem;
}

.shenye-guides__title a {
	color: var(--wp--preset--color--green);
	text-decoration: none;
}

.shenye-guides__title a:hover {
	text-decoration: underline;
}

.shenye-guides__text {
	font-size: 0.875rem;
	line-height: 1.65;
	color: rgba(22, 19, 16, 0.75);
	margin: 0 0 1rem;
}

.shenye-guides__link {
	margin-top: auto;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brass-deep);
	text-decoration: none;
	border-bottom: 1px solid currentColor;
	align-self: flex-start;
	padding-bottom: 0.15rem;
}

/* 文章页 */
.shenye-guide-head__meta {
	font-size: 0.6875rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brass-deep);
	margin: 0 0 1.25rem;
}

.shenye-guide-head__media {
	margin: 0 0 var(--wp--preset--spacing--50);
	overflow: hidden;
}

.shenye-guide-head__media img {
	display: block;
	width: 100%;
	aspect-ratio: 21 / 9;
	object-fit: cover;
}

@media (max-width: 781px) {
	.shenye-guides {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* 页头账户入口：自绘图标，避免 gravatar 图片取不到时出现破图 */
.shenye-account {
	display: flex;
	align-items: center;
}

.shenye-account__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	transition: color 160ms ease;
}

.shenye-account__link:hover,
.shenye-account__link:focus-visible {
	color: var(--wp--preset--color--brass-deep);
}

.shenye-account__icon {
	display: block;
	width: 21px;
	height: 21px;
	flex: none;
}

.shenye-account .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
