/*
Theme Name: Storefront Style Packs
Theme URI: https://woocommerce.com/storefront/
Description: WooCommerce 官方 Storefront 的子主题，六套风格用 CSS 变量（--sf-bg/--sf-text/--sf-primary/--sf-accent/--sf-radius/--sf-font）实现：建站任务写 sf_style option，子主题把 sf-style-<id> 加到 body 上，不覆盖任何 WooCommerce 模板。
Author: SiteForge
Version: 1.3.0
Requires at least: 6.4
Requires PHP: 8.0
Template: storefront
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: storefront-sf
*/

/*
 * 1.2.0 的视觉层：页头一行排开（品牌 / 导航 / 购物车）、细公告条、全宽 hero、
 * 统一商品卡、详情-购物车-结账-政策页排版、五栏页脚。
 * 只写 CSS：Storefront 的模板文件一个都没覆盖，DOM 变了样式自然退回去，站点不会白屏。
 * 变量默认值 = fashion；assets/presets.css 里 body.sf-style-<id> 逐套覆盖。
 */

body {
	--sf-bg: #ffffff;
	--sf-surface: #faf9f7;
	--sf-card-bg: #ffffff;
	--sf-text: #1b1b1b;
	--sf-muted: #776c62;
	--sf-primary: #1b1b1b;
	--sf-accent: #8a6a4f;
	--sf-line: rgba(0, 0, 0, 0.1);
	--sf-shadow: rgba(27, 27, 27, 0.18);
	--sf-radius: 2px;
	--sf-font: Georgia, "Times New Roman", serif;
	--sf-heading-font: Georgia, "Times New Roman", serif;
	--sf-heading-weight: 600;
	--sf-heading-transform: none;
	--sf-heading-spacing: 0.01em;
	--sf-header-bg: #ffffff;
	--sf-announce-bg: #1b1b1b;
	--sf-announce-text: #f3ece4;
	--sf-btn-bg: transparent;
	--sf-btn-text: #1b1b1b;
	--sf-btn-border: rgba(27, 27, 27, 0.32);
	--sf-btn-hover-bg: #1b1b1b;
	--sf-btn-hover-text: #ffffff;
	--sf-hero-bg: linear-gradient(135deg, #1b1b1b 0%, #4a3a2c 100%);
	--sf-hero-panel: linear-gradient(150deg, #33261d 0%, #7a5b3e 55%, #c9a37a 100%);
	--sf-hero-text: #ffffff;
	--sf-hero-cta-bg: #f3ece4;
	--sf-hero-cta-text: #1b1b1b;
	--sf-footer-bg: #faf7f2;
	/* 版心与左右留白：宽屏时用 (100vw - 1240px)/2 让页头、页脚、hero 落在同一条竖线上 */
	--sf-page: 1240px;
	--sf-gutter: max(clamp(16px, 4vw, 40px), calc((100vw - var(--sf-page)) / 2));
	background-color: var(--sf-bg);
	color: var(--sf-text);
	font-family: var(--sf-font);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

body h1,
body h2,
body h3,
body h4,
body .sf-hero__title,
body .woocommerce-loop-product__title {
	font-family: var(--sf-heading-font);
	font-weight: var(--sf-heading-weight);
	letter-spacing: var(--sf-heading-spacing);
	text-transform: var(--sf-heading-transform);
	color: var(--sf-text);
}

body a {
	color: var(--sf-accent);
}

body a:hover,
body a:focus {
	color: var(--sf-text);
}

/*
 * 满宽出血用的是 calc(50% - 50vw)：带竖向滚动条的桌面浏览器里 100vw 含滚动条宽度，
 * hero / 页脚会往右多出 8–16px 触发横向滚动条。在 #page 上 clip 掉（不用 overflow-x:
 * hidden，那会新建滚动容器，影响以后可能加的 sticky）。
 */
body #page {
	overflow-x: clip;
}

/* 版心：Storefront 默认 1060px，品牌店用 1240px 才撑得开 */
body .col-full {
	max-width: var(--sf-page);
}

body .site-content {
	padding-top: 0;
	padding-bottom: 0;
}

/* 没有 hero 的页面（商品、购物车、结账、政策页）靠这里跟页头拉开距离 */
body #primary {
	padding-top: clamp(22px, 3vw, 40px);
}

/* ---- 公告条：细、满宽、字距拉开；没有 option 时 functions.php 不输出 ---- */
.sf-announce {
	background: var(--sf-announce-bg);
	color: var(--sf-announce-text);
}

.sf-announce__inner {
	padding: 9px var(--sf-gutter);
	margin: 0;
	font-size: 0.7rem;
	line-height: 1.5;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-align: center;
}

.sf-announce a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---- 页头：品牌 / 导航 / 购物车 一行排开 ---- */
/*
 * Storefront 的页头 DOM 是两段：先 <div class="col-full">（品牌在内），
 * 再 <div class="storefront-primary-navigation"><div class="col-full">（导航 + 购物车）。
 * 这里用 display:contents 让第一段的 .col-full 不参与盒子，品牌与导航区直接并排。
 */
body .site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: clamp(16px, 2.4vw, 48px);
	padding: clamp(14px, 1.6vw, 20px) var(--sf-gutter);
	background-color: var(--sf-header-bg) !important;
	border-bottom: 1px solid var(--sf-line);
}

body .site-header > .col-full {
	display: contents;
}

body .site-branding {
	margin: 0;
	padding: 0;
	float: none;
	flex: 0 1 auto;
	max-width: 62%;
}

body .site-title {
	margin: 0;
	padding: 0;
	font-family: var(--sf-heading-font);
	font-size: clamp(17px, 1.35vw, 21px);
	font-weight: var(--sf-heading-weight);
	line-height: 1.2;
	letter-spacing: 0.045em;
	text-transform: none;
}

body .site-title a {
	color: var(--sf-text);
	text-decoration: none;
	border-bottom: 0;
}

body .site-title a:hover,
body .site-title a:focus {
	color: var(--sf-accent);
}

body .site-description {
	margin: 5px 0 0;
	font-size: 0.7rem;
	line-height: 1.4;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--sf-muted);
}

body .site-header .storefront-primary-navigation {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
}

body .site-header .storefront-primary-navigation > .col-full {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: clamp(14px, 2vw, 36px);
	max-width: none;
	margin: 0;
	padding: 0;
}

/* 桌面导航：一行、字距拉开、当前项一条细下划线（移动端仍交给 Storefront 的汉堡按钮） */
@media (min-width: 900px) {
	body #site-navigation {
		flex: 0 1 auto;
		margin: 0;
		width: auto;
	}

	body #site-navigation .primary-navigation {
		float: none;
	}

	body #site-navigation #primary-menu {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: clamp(14px, 1.8vw, 32px);
		margin: 0;
		padding: 0;
		list-style: none;
	}

	body #site-navigation #primary-menu > li {
		float: none !important;
		width: auto !important;
		margin: 0 !important;
		padding: 0;
	}

	body #site-navigation #primary-menu > li > a {
		display: inline-block;
		padding: 6px 0;
		font-size: 0.74rem;
		letter-spacing: 0.14em;
		text-transform: uppercase;
		color: var(--sf-text);
		text-decoration: none;
		border-bottom: 1px solid transparent;
		transition: color 0.2s ease, border-color 0.2s ease;
	}

	body #site-navigation #primary-menu > li > a:hover,
	body #site-navigation #primary-menu > li > a:focus,
	body #site-navigation #primary-menu > li.current-menu-item > a {
		color: var(--sf-accent);
		border-bottom-color: var(--sf-accent);
	}
}

/* 购物车：金额和件数一行，右侧对齐 */
body .site-header-cart {
	margin: 0;
	padding: 0;
	float: none;
	flex: 0 0 auto;
}

body .site-header-cart .cart-contents {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--sf-text);
	text-decoration: none;
	white-space: nowrap;
}

body .site-header-cart .cart-contents:hover,
body .site-header-cart .cart-contents:focus {
	color: var(--sf-accent);
}

body .site-header-cart .cart-contents .count {
	color: var(--sf-muted);
	letter-spacing: 0.08em;
}

/* ---- 首页 hero：eyebrow + 品牌短语 + 副标题 + CTA，最大宽度 1240，满宽出血 ---- */
.sf-hero {
	position: relative;
	overflow: hidden;
	margin: 0 calc(50% - 50vw) clamp(34px, 4.4vw, 58px);
	background: var(--sf-hero-bg);
	color: var(--sf-hero-text);
}

/* 一层很淡的高光，让大面积渐变不至于像一块纯色板 */
.sf-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(120% 90% at 78% 4%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 62%);
	pointer-events: none;
}

.sf-hero__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
	align-items: center;
	gap: clamp(28px, 4vw, 64px);
	width: 100%;
	margin: 0 auto;
	padding: clamp(46px, 6.2vw, 92px) var(--sf-gutter);
}

.sf-hero__copy {
	max-width: 640px;
}

.sf-hero--layout-centered .sf-hero__inner {
	grid-template-columns: minmax(0, 820px);
	justify-content: center;
	padding-top: clamp(52px, 7vw, 104px);
	padding-bottom: clamp(52px, 7vw, 104px);
	text-align: center;
}

.sf-hero--layout-centered .sf-hero__copy {
	margin-left: auto;
	margin-right: auto;
}

.sf-hero--layout-centered .sf-hero__visual {
	display: none;
}

.sf-hero__eyebrow {
	margin: 0 0 clamp(14px, 1.6vw, 20px);
	font-family: var(--sf-font);
	font-size: 0.72rem;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	opacity: 0.82;
}

.sf-hero__eyebrow::before {
	content: "";
	display: inline-block;
	width: 26px;
	height: 1px;
	margin-right: 12px;
	vertical-align: middle;
	background: currentColor;
	opacity: 0.7;
}

.sf-hero--layout-centered .sf-hero__eyebrow::before {
	display: none;
}

/*
 * 注意要用 body 前缀：上面 h1 分组里已经写了 body .sf-hero__title { color: var(--sf-text) }，
 * 只写 .sf-hero__title 会被它盖掉，标题在深色 hero 上变成深咖啡色。
 */
body .sf-hero__title {
	margin: 0 0 clamp(14px, 1.6vw, 20px);
	font-family: var(--sf-heading-font);
	font-size: clamp(34px, 4.6vw, 60px);
	font-weight: var(--sf-heading-weight);
	line-height: 1.04;
	letter-spacing: var(--sf-heading-spacing);
	text-transform: var(--sf-heading-transform);
	color: var(--sf-hero-text);
}

.sf-hero__text {
	max-width: 46ch;
	margin: 0 0 clamp(24px, 2.6vw, 34px);
	font-size: 1.02rem;
	line-height: 1.65;
	opacity: 0.88;
}

.sf-hero--layout-centered .sf-hero__text {
	max-width: 56ch;
	margin-left: auto;
	margin-right: auto;
}

.sf-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 24px;
}

.sf-hero--layout-centered .sf-hero__actions {
	justify-content: center;
}

.sf-hero__cta,
.sf-hero__cta:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 30px;
	border: 1px solid var(--sf-hero-cta-bg);
	border-radius: var(--sf-radius);
	background: var(--sf-hero-cta-bg);
	color: var(--sf-hero-cta-text);
	font-family: var(--sf-font);
	font-size: 0.74rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.sf-hero__cta:hover,
.sf-hero__cta:focus {
	background: transparent;
	color: var(--sf-hero-text);
	border-color: currentColor;
}

.sf-hero__link {
	font-size: 0.74rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--sf-hero-text);
	text-decoration: none;
	border-bottom: 1px solid currentColor;
	padding-bottom: 3px;
}

.sf-hero__link:hover,
.sf-hero__link:focus {
	opacity: 0.75;
	color: var(--sf-hero-text);
}

/* hero 右侧的抽象画框：纯 CSS 渐变，不用外部图片，也不假装是商品图 */
.sf-hero__visual {
	position: relative;
	justify-self: end;
	width: 100%;
	max-width: 460px;
}

/*
 * hero 右侧的画框：渐变底 + 品牌首字母（monogram）+ 一圈细圆环 + 一圈细内框。
 * 纯 CSS，不引用外部图片；窄屏和居中版式整块隐藏。
 */
.sf-hero__frame {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 5 / 6;
	overflow: hidden;
	border-radius: calc(var(--sf-radius) * 1.6);
	background:
		radial-gradient(120% 90% at 26% 12%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 60%),
		var(--sf-hero-panel);
	box-shadow: 0 34px 70px -30px rgba(0, 0, 0, 0.65);
}

.sf-hero__frame::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 46%;
	width: 62%;
	aspect-ratio: 1;
	transform: translate(-50%, -50%);
	border: 1px solid rgba(255, 255, 255, 0.34);
	border-radius: 50%;
}

.sf-hero__frame::after {
	content: "";
	position: absolute;
	inset: 14px;
	border: 1px solid rgba(255, 255, 255, 0.26);
	border-radius: calc(var(--sf-radius) * 1.1);
}

.sf-hero__monogram {
	position: relative;
	z-index: 1;
	margin-top: -4%;
	font-family: var(--sf-heading-font);
	font-weight: var(--sf-heading-weight);
	font-size: clamp(96px, 11vw, 168px);
	line-height: 1;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--sf-hero-text);
	opacity: 0.72;
	user-select: none;
}

/* ---- 按钮：统一成描边小字按钮，悬停填实；alt / 结账类用主色实心 ---- */
body a.button,
body button.button,
body input.button,
body #respond input#submit,
body .woocommerce a.button,
body .woocommerce button.button,
body .woocommerce input.button,
body .woocommerce #respond input#submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 22px;
	border: 1px solid var(--sf-btn-border);
	border-radius: var(--sf-radius);
	background-color: var(--sf-btn-bg);
	color: var(--sf-btn-text);
	font-family: var(--sf-font);
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body a.button:hover,
body a.button:focus,
body button.button:hover,
body button.button:focus,
body input.button:hover,
body input.button:focus,
body #respond input#submit:hover,
body .woocommerce a.button:hover,
body .woocommerce a.button:focus,
body .woocommerce button.button:hover,
body .woocommerce button.button:focus,
body .woocommerce input.button:hover,
body .woocommerce input.button:focus,
body .woocommerce #respond input#submit:hover {
	background-color: var(--sf-btn-hover-bg);
	border-color: var(--sf-btn-hover-bg);
	color: var(--sf-btn-hover-text);
}

body .woocommerce a.button.alt,
body .woocommerce button.button.alt,
body .woocommerce input.button.alt,
body button.single_add_to_cart_button,
body a.checkout-button,
body #place_order,
body .wc-proceed-to-checkout a.checkout-button {
	background-color: var(--sf-primary);
	border-color: var(--sf-primary);
	color: var(--sf-bg);
}

body .woocommerce a.button.alt:hover,
body .woocommerce button.button.alt:hover,
body .woocommerce input.button.alt:hover,
body button.single_add_to_cart_button:hover,
body a.checkout-button:hover,
body #place_order:hover,
body .wc-proceed-to-checkout a.checkout-button:hover {
	background-color: var(--sf-accent);
	border-color: var(--sf-accent);
	color: var(--sf-bg);
}

body .woocommerce a.button.disabled,
body .woocommerce button.button:disabled,
body .woocommerce a.button:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

/* ---- 商品列表 / 商品卡 ---- */
body ul.products {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(18px, 2.2vw, 32px);
	margin: 0 0 clamp(32px, 4vw, 56px);
	padding: 0;
	clear: both;
	list-style: none;
}

body ul.products.columns-1 {
	grid-template-columns: minmax(0, 1fr);
}

body ul.products.columns-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

body ul.products.columns-4,
body ul.products.columns-5,
body ul.products.columns-6 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

body ul.products li.product {
	display: flex;
	flex-direction: column;
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0;
	overflow: hidden;
	background-color: var(--sf-card-bg);
	border: 1px solid var(--sf-line);
	border-radius: calc(var(--sf-radius) * 1.15);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

body ul.products li.product:hover {
	transform: translateY(-4px);
	border-color: transparent;
	box-shadow: 0 26px 46px -24px var(--sf-shadow);
}

body ul.products li.product .woocommerce-LoopProduct-link {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	text-decoration: none;
}

/* 图框统一 1:1、白底、留一点内边距：站内商品图都是白底方图，contain 不裁形状 */
body ul.products li.product a img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	padding: clamp(10px, 1.5vw, 22px);
	margin: 0 !important;
	background-color: #ffffff;
	border-radius: 0 !important;
}

body ul.products li.product .woocommerce-loop-product__title {
	margin: 0;
	padding: 16px clamp(14px, 1.6vw, 20px) 6px;
	font-family: var(--sf-heading-font);
	font-size: clamp(0.86rem, 0.95vw, 0.98rem);
	font-weight: var(--sf-heading-weight);
	line-height: 1.42;
	letter-spacing: 0.01em;
	color: var(--sf-text);
}

body ul.products li.product .price {
	margin: 0 0 14px;
	padding: 0 clamp(14px, 1.6vw, 20px);
	color: var(--sf-text);
	font-size: 0.9rem;
	font-weight: 500;
	letter-spacing: 0.03em;
}

body ul.products li.product .price ins {
	background: none;
	color: var(--sf-accent);
	font-weight: 600;
	text-decoration: none;
}

body ul.products li.product .price del {
	opacity: 0.55;
}

body ul.products li.product .button {
	align-self: stretch;
	margin: auto clamp(14px, 1.6vw, 20px) clamp(16px, 1.8vw, 22px);
	text-align: center;
}

body ul.products li.product .onsale {
	top: 12px;
	right: 12px;
	left: auto;
	padding: 5px 10px;
	border-radius: var(--sf-radius);
	background: var(--sf-accent);
	color: var(--sf-bg);
	font-size: 0.64rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.4;
}

/* 商品列表页头：标题 + 结果数 + 排序 */
body .woocommerce-products-header {
	margin: 0 0 clamp(20px, 2.6vw, 32px);
}

body .woocommerce-products-header__title.page-title {
	margin: 0 0 10px;
	font-size: clamp(28px, 3.2vw, 42px);
	line-height: 1.1;
}

/* 结果数靠左、排序下拉靠右（WooCommerce 的钩子顺序固定，只能用浮动对齐） */
body .woocommerce-result-count {
	float: left;
	margin: 0 0 14px;
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	color: var(--sf-muted);
}

body .woocommerce-ordering {
	float: right;
	margin: 0 0 14px;
}

body .woocommerce-ordering select {
	padding: 9px 12px;
	border: 1px solid var(--sf-line);
	border-radius: var(--sf-radius);
	background-color: transparent;
	color: var(--sf-text);
	font-family: var(--sf-font);
	font-size: 0.78rem;
	letter-spacing: 0.04em;
}

/* 面包屑（Storefront 在 #content 之前输出，自带 col-full 宽度） */
body .woocommerce-breadcrumb {
	max-width: var(--sf-page);
	margin: 0 auto;
	padding: 14px var(--sf-gutter) 0;
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--sf-muted);
}

body .woocommerce-breadcrumb a {
	color: var(--sf-muted);
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

body .woocommerce-breadcrumb a:hover {
	color: var(--sf-text);
	border-bottom-color: var(--sf-line);
}

/* ---- 商品详情 ---- */
/* 列间距用 column-gap：标签页/关联商品换行时不要再叠一层 row-gap */
body.single-product div.product {
	display: grid;
	grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
	column-gap: clamp(26px, 4vw, 64px);
	row-gap: 0;
	align-items: start;
}

body.single-product div.product .woocommerce-product-gallery {
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
}

body.single-product div.product .summary {
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
}

body.single-product div.product .woocommerce-product-gallery__image img {
	border-radius: calc(var(--sf-radius) * 1.1);
}

body.single-product .flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 10px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

body.single-product .flex-control-thumbs li {
	float: none;
	width: auto;
	margin: 0;
}

body.single-product .flex-control-thumbs img {
	border-radius: calc(var(--sf-radius) * 0.6);
	opacity: 0.65;
	border: 1px solid transparent;
}

body.single-product .flex-control-thumbs img.flex-active,
body.single-product .flex-control-thumbs img:hover {
	opacity: 1;
	border-color: var(--sf-line);
}

body.single-product .product_title {
	margin: 0 0 10px;
	font-size: clamp(26px, 3vw, 40px);
	line-height: 1.12;
}

body.single-product .summary .price {
	margin: 0 0 18px;
	color: var(--sf-accent);
	font-size: clamp(1.05rem, 1.4vw, 1.25rem);
	font-weight: 500;
	letter-spacing: 0.03em;
}

body.single-product .summary .woocommerce-product-details__short-description {
	margin: 0 0 24px;
	color: var(--sf-muted);
	font-size: 0.98rem;
	line-height: 1.72;
}

body.single-product .summary form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin: 0 0 22px;
}

body.single-product .summary form.cart .quantity {
	margin: 0;
}

body.single-product .summary form.cart .quantity .qty {
	width: 74px;
	padding: 11px 12px;
	border: 1px solid var(--sf-line);
	border-radius: var(--sf-radius);
	background-color: transparent;
	color: var(--sf-text);
	font-family: var(--sf-font);
	font-size: 0.95rem;
}

body.single-product .summary form.cart .single_add_to_cart_button {
	flex: 1 1 220px;
}

body.single-product .product_meta {
	margin: 0;
	padding-top: 16px;
	border-top: 1px solid var(--sf-line);
	color: var(--sf-muted);
	font-size: 0.76rem;
	letter-spacing: 0.05em;
	line-height: 1.9;
}

body.single-product .product_meta > span {
	display: block;
}

/* div.product 是两列网格：标签页和关联商品必须整行，不然会被塞进右栏 */
body.single-product .woocommerce-tabs,
body.single-product section.related,
body.single-product section.upsells {
	grid-column: 1 / -1;
}

body.single-product .woocommerce-tabs {
	clear: both;
	margin-top: clamp(36px, 5vw, 64px);
}

body.single-product .woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 28px;
	margin: 0 0 26px;
	padding: 0;
	border-bottom: 1px solid var(--sf-line);
	list-style: none;
}

body.single-product .woocommerce-tabs ul.tabs::before,
body.single-product .woocommerce-tabs ul.tabs::after {
	display: none;
}

body.single-product .woocommerce-tabs ul.tabs li {
	float: none;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
}

body.single-product .woocommerce-tabs ul.tabs li::before,
body.single-product .woocommerce-tabs ul.tabs li::after {
	display: none;
}

body.single-product .woocommerce-tabs ul.tabs li a {
	display: block;
	margin-bottom: -1px;
	padding: 12px 0;
	border-bottom: 2px solid transparent;
	color: var(--sf-muted);
	font-size: 0.72rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
}

body.single-product .woocommerce-tabs ul.tabs li.active a {
	color: var(--sf-text);
	border-bottom-color: var(--sf-accent);
}

body.single-product .woocommerce-tabs .panel h2 {
	font-size: clamp(20px, 2vw, 26px);
}

body.single-product section.related,
body.single-product section.upsells {
	margin-top: clamp(36px, 4.6vw, 60px);
}

/* ---- 表单控件（地址、优惠码、数量、筛选）：跟主题同一套线框 ---- */
body input[type="text"],
body input[type="email"],
body input[type="tel"],
body input[type="url"],
body input[type="password"],
body input[type="search"],
body input[type="number"],
body textarea,
body select,
body .woocommerce input[type="text"],
body .woocommerce input[type="email"],
body .woocommerce input[type="tel"],
body .woocommerce input[type="password"],
body .woocommerce input[type="number"],
body .woocommerce textarea,
body .woocommerce select {
	padding: 11px 14px;
	border: 1px solid var(--sf-line);
	border-radius: var(--sf-radius);
	background-color: #ffffff;
	color: var(--sf-text);
	font-family: var(--sf-font);
	font-size: 0.94rem;
}

body input[type="text"]:focus,
body input[type="email"]:focus,
body input[type="tel"]:focus,
body input[type="password"]:focus,
body input[type="search"]:focus,
body input[type="number"]:focus,
body textarea:focus,
body select:focus {
	outline: 1px solid var(--sf-accent);
	outline-offset: 1px;
}

body .woocommerce form .form-row label,
body .woocommerce-page form .form-row label {
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--sf-muted);
}

body .woocommerce form .form-row .required {
	color: var(--sf-accent);
	text-decoration: none;
}

/* ---- 购物车 ---- */
body .woocommerce table.shop_table {
	border: 1px solid var(--sf-line);
	border-radius: calc(var(--sf-radius) * 1.15);
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	background-color: var(--sf-card-bg);
}

body .woocommerce table.shop_table th {
	padding: 13px 16px;
	background-color: transparent;
	border-bottom: 1px solid var(--sf-line);
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--sf-muted);
}

body .woocommerce table.shop_table td {
	padding: 16px;
	border-top: 1px solid var(--sf-line);
	vertical-align: middle;
	font-size: 0.92rem;
}

body .woocommerce table.shop_table tbody tr:first-child td {
	border-top: 0;
}

body .woocommerce table.shop_table td.product-thumbnail img {
	width: 74px;
	border-radius: calc(var(--sf-radius) * 0.7);
}

body .woocommerce table.shop_table td.product-name a {
	color: var(--sf-text);
	text-decoration: none;
}

body .woocommerce table.shop_table a.remove {
	color: var(--sf-muted) !important;
	font-size: 0.9rem;
}

body .woocommerce table.shop_table a.remove:hover {
	background: var(--sf-accent);
	color: var(--sf-bg) !important;
}

/* 购物车数量框：只要一个小方框，不要撑满整列 */
body .woocommerce .quantity .qty,
body .woocommerce table.shop_table .quantity .qty {
	width: 4.4em;
	max-width: 96px;
	padding: 9px 10px;
	text-align: center;
}

body .woocommerce .cart .button,
body .woocommerce .cart input.button {
	min-width: 0;
}

/* 优惠码在左、更新购物车在右（WooCommerce 的 DOM 没法改，只能用浮动） */
body .woocommerce form.woocommerce-cart-form::after {
	content: "";
	display: table;
	clear: both;
}

body .woocommerce .coupon {
	float: left;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	max-width: 100%;
}

body .woocommerce .coupon .input-text {
	flex: 0 0 auto;
	width: min(240px, 46vw);
}

body .woocommerce form.woocommerce-cart-form button[name="update_cart"] {
	float: right;
}

body .woocommerce .cart-collaterals {
	margin-top: clamp(26px, 3vw, 38px);
}

body .woocommerce .cart_totals {
	width: 100% !important;
	max-width: 440px;
	margin-left: auto;
	padding: clamp(20px, 2.4vw, 30px);
	background-color: var(--sf-surface);
	border: 1px solid var(--sf-line);
	border-radius: calc(var(--sf-radius) * 1.15);
}

body .woocommerce .cart_totals h2 {
	margin: 0 0 16px;
	font-size: 0.72rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--sf-muted);
}

body .woocommerce .cart_totals table.shop_table {
	border: 0;
	background: transparent;
}

body .woocommerce .cart_totals table.shop_table th,
body .woocommerce .cart_totals table.shop_table td {
	padding: 9px 0;
	border-top: 1px solid var(--sf-line);
	font-size: 0.9rem;
}

body .woocommerce .cart_totals .order-total th,
body .woocommerce .cart_totals .order-total td {
	font-size: 1.02rem;
	font-weight: 600;
}

body .woocommerce .cart_totals .wc-proceed-to-checkout {
	margin: 18px 0 0;
	padding: 0;
}

body .woocommerce .cart_totals .wc-proceed-to-checkout a {
	width: 100%;
}

body .woocommerce .cart-empty,
body .woocommerce .return-to-shop {
	font-size: 1rem;
}

body .woocommerce .cart-empty {
	padding: 26px 0;
	border-top: 1px solid var(--sf-line);
	border-bottom: 1px solid var(--sf-line);
}

/* ---- 结账：左地址、右订单摘要 ---- */
body .woocommerce form.checkout {
	display: grid;
	grid-template-columns: minmax(0, 1.32fr) minmax(0, 0.92fr);
	grid-template-areas:
		"details heading"
		"details review";
	/* 第一行只放标题，剩下的高度都给订单摘要，否则「Your order」会被顶到很远 */
	grid-template-rows: min-content 1fr;
	align-content: start;
	column-gap: clamp(26px, 4vw, 56px);
	row-gap: 14px;
	align-items: start;
}

body .woocommerce form.checkout #customer_details {
	grid-area: details;
	float: none;
	width: auto;
	margin: 0;
}

body .woocommerce form.checkout #order_review_heading {
	grid-area: heading;
	float: none;
	width: auto;
	margin: 0;
	font-size: 0.74rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--sf-muted);
}

body .woocommerce form.checkout #order_review {
	grid-area: review;
	float: none;
	width: auto;
	padding: clamp(18px, 2.2vw, 26px);
	background-color: var(--sf-surface);
	border: 1px solid var(--sf-line);
	border-radius: calc(var(--sf-radius) * 1.15);
}

/*
 * 账单/收货字段：WooCommerce 默认把 form-row-first/last 各浮 47%，
 * 在这里改成两列网格，first/last 各占一格、wide 整行，窄屏再退成一列。
 */
body .woocommerce form.checkout .col2-set {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 26px;
}

body .woocommerce form.checkout .col2-set .col-1,
body .woocommerce form.checkout .col2-set .col-2 {
	float: none;
	width: 100%;
	margin: 0;
}

body .woocommerce form.checkout .woocommerce-billing-fields__field-wrapper,
body .woocommerce form.checkout .woocommerce-shipping-fields__field-wrapper,
body .woocommerce form.checkout .woocommerce-additional-fields__field-wrapper {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 4px 18px;
	align-items: start;
}

body .woocommerce form.checkout .form-row {
	float: none;
	width: 100%;
	padding: 0;
	margin: 0;
}

body .woocommerce form.checkout .form-row.form-row-wide {
	grid-column: 1 / -1;
}

body .woocommerce form.checkout .form-row label {
	display: block;
	margin: 0 0 4px;
	line-height: 1.5;
}

/* 复选框（ship to a different address）：标签和方框排一行，不要大写 */
body .woocommerce form.checkout .form-row label.checkbox {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 6px;
	font-size: 0.85rem;
	letter-spacing: 0;
	text-transform: none;
	color: var(--sf-text);
}

body .woocommerce form.checkout .form-row input[type="checkbox"] {
	margin: 0;
}

body .woocommerce form.checkout .woocommerce-billing-fields h3,
body .woocommerce form.checkout .woocommerce-shipping-fields h3,
body .woocommerce form.checkout .woocommerce-additional-fields h3 {
	margin: 0 0 14px;
	font-size: 0.74rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--sf-muted);
}

body .woocommerce form.checkout .woocommerce-additional-fields {
	margin-top: 10px;
}

body .woocommerce form.checkout .form-row.notes textarea {
	min-height: 96px;
}

body .woocommerce #order_review table.shop_table {
	border: 0;
	background: transparent;
}

body .woocommerce #order_review table.shop_table th,
body .woocommerce #order_review table.shop_table td {
	padding: 10px 0;
	font-size: 0.9rem;
}

body .woocommerce #order_review #payment {
	background: transparent;
	border-radius: 0;
}

body .woocommerce #order_review #payment ul.payment_methods {
	padding: 12px 0;
	border-bottom: 1px solid var(--sf-line);
}

body .woocommerce #order_review #payment ul.payment_methods li {
	margin: 0 0 12px;
	font-size: 0.92rem;
}

body .woocommerce #order_review #payment div.form-row.place-order {
	padding: 16px 0 0;
}

body .woocommerce #order_review #payment #place_order {
	width: 100%;
}

body .woocommerce-checkout #payment .payment_box {
	background: var(--sf-bg);
	border: 1px solid var(--sf-line);
	border-radius: var(--sf-radius);
	color: var(--sf-muted);
	font-size: 0.85rem;
	line-height: 1.6;
}

body .woocommerce-checkout #payment .payment_box::before {
	display: none;
}

/* 结算页的「已有优惠码」提示：Storefront 默认挂得很开 */
body .woocommerce-form-coupon-toggle .woocommerce-info,
body .woocommerce .woocommerce-info {
	border-top: 1px solid var(--sf-accent);
	background-color: var(--sf-surface);
	color: var(--sf-text);
	font-size: 0.9rem;
}

body .woocommerce-message {
	border-top-color: var(--sf-accent);
	background-color: var(--sf-surface);
	color: var(--sf-text);
}

body .woocommerce-error {
	border-top-color: #b23a2f;
}

/* ---- 政策页 / 普通页面正文：只给文字元素限宽，短代码里的网格不受影响 ---- */
/*
 * 纯文字页（政策、关于）在宽屏上左边一长条右边空白很难看：把标题和正文收进
 * 860px 的居中文档栏。购物车/结账页有 woocommerce-cart / woocommerce-checkout
 * 的 body class，被排除在外，宽度照旧。
 */
body.page:not(.woocommerce-cart):not(.woocommerce-checkout) .entry-header,
body.page:not(.woocommerce-cart):not(.woocommerce-checkout) .entry-content {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
}

body .entry-header .entry-title {
	margin: 0 0 clamp(16px, 2vw, 26px);
	font-size: clamp(28px, 3.2vw, 42px);
	line-height: 1.12;
}

body .entry-content {
	font-size: 1rem;
	line-height: 1.78;
}

body .entry-content > p,
body .entry-content > ul,
body .entry-content > ol,
body .entry-content > h2,
body .entry-content > h3,
body .entry-content > h4,
body .entry-content > blockquote,
body .entry-content > table {
	max-width: 72ch;
}

/*
 * 注意用直接子元素：购物车/结账的表格也在 .entry-content 里（页面短代码包着），
 * 写成后代选择器会给 WooCommerce 的表格加上单元格边框，排版直接散掉。
 */
body .entry-content > h2 {
	margin: clamp(30px, 3.4vw, 42px) 0 0.6em;
	padding-bottom: 0.35em;
	border-bottom: 1px solid var(--sf-line);
	font-size: clamp(20px, 2vw, 26px);
	line-height: 1.25;
}

body .entry-content > h3 {
	margin: 1.7em 0 0.45em;
	font-size: 1.05rem;
	letter-spacing: 0.03em;
}

body .entry-content > ul,
body .entry-content > ol {
	padding-left: 1.15em;
}

body.page:not(.woocommerce-cart):not(.woocommerce-checkout) .entry-content li {
	margin-bottom: 0.4em;
}

body.page:not(.woocommerce-cart):not(.woocommerce-checkout) .entry-content a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

body .entry-content > table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.94rem;
}

body .entry-content > table th,
body .entry-content > table td {
	padding: 10px 14px;
	border: 1px solid var(--sf-line);
	text-align: left;
}

/* ---- 五栏页脚：品牌 / Shop / Help / Legal / Store details ---- */
body .site-footer {
	padding: 0;
	border-top: 0;
	background-color: transparent;
	color: var(--sf-text);
}

.sf-footer {
	margin: 0 calc(50% - 50vw);
	padding: clamp(38px, 4.4vw, 58px) 0 clamp(24px, 3vw, 34px);
	background: var(--sf-footer-bg);
	border-top: 1px solid var(--sf-line);
}

.sf-footer__grid {
	display: grid;
	grid-template-columns: 1.7fr 0.85fr 1fr 0.85fr 1.15fr;
	align-items: start;
	gap: clamp(20px, 2.6vw, 44px);
	margin: 0 auto;
	padding: 0 var(--sf-gutter);
}

.sf-footer__name {
	margin: 0 0 10px;
	font-family: var(--sf-heading-font);
	font-size: 0.95rem;
	font-weight: var(--sf-heading-weight);
	line-height: 1.3;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--sf-text);
}

.sf-footer__tagline {
	max-width: 32ch;
	margin: 0 0 14px;
	font-size: 0.85rem;
	line-height: 1.62;
	color: var(--sf-muted);
}

.sf-footer__line {
	margin: 0 0 6px;
	font-size: 0.84rem;
	line-height: 1.6;
	color: var(--sf-muted);
}

.sf-footer__line a {
	color: var(--sf-text);
	text-decoration: none;
	border-bottom: 1px solid var(--sf-line);
}

.sf-footer__line a:hover {
	border-bottom-color: var(--sf-accent);
	color: var(--sf-accent);
}

.sf-footer__note {
	margin: 12px 0 0;
	font-size: 0.78rem;
	line-height: 1.6;
	letter-spacing: 0.02em;
	color: var(--sf-muted);
	opacity: 0.85;
}

.sf-footer__title {
	margin: 0 0 14px;
	font-family: var(--sf-font);
	font-size: 0.66rem;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--sf-muted);
}

.sf-footer__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sf-footer__list li {
	margin: 0 0 9px;
	font-size: 0.86rem;
	line-height: 1.5;
}

.sf-footer__list a {
	color: var(--sf-text);
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.sf-footer__list a:hover,
.sf-footer__list a:focus {
	color: var(--sf-accent);
	border-bottom-color: var(--sf-accent);
}

.sf-footer__business .sf-footer__line {
	margin: 0 0 7px;
}

/* 支付方式小标签：由 functions.php 读 WooCommerce 已启用的网关，没有就不输出 */
.sf-footer__pay {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.sf-footer__pay li {
	margin: 0;
	padding: 5px 8px;
	border: 1px solid var(--sf-line);
	border-radius: calc(var(--sf-radius) * 0.5);
	font-size: 0.6rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--sf-muted);
}

/* 版权行：跟页脚同一底色，左版权右条款 */
body .site-footer .site-info {
	max-width: none;
	width: auto;
	margin: 0 calc(50% - 50vw);
	padding: clamp(16px, 2vw, 22px) var(--sf-gutter) clamp(22px, 3vw, 32px);
	border-top: 1px solid var(--sf-line);
	background: var(--sf-footer-bg);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
	font-size: 0.74rem;
	line-height: 1.6;
	letter-spacing: 0.05em;
	text-align: left;
	color: var(--sf-muted);
}

/* Storefront 的版权行里有一个 <br> 分隔隐私政策链接，用 flex 排版时它只会多出空当 */
body .site-footer .site-info br {
	display: none;
}

body .site-footer .site-info a {
	color: var(--sf-muted);
	text-decoration: none;
	border-bottom: 1px solid var(--sf-line);
}

body .site-footer .site-info a:hover {
	color: var(--sf-text);
	border-bottom-color: var(--sf-text);
}

/* ---- 响应式 ---- */

/* 平板：页头恢复两行（品牌一行、导航条一行），商品卡两列 */
@media (max-width: 899px) {
	body .site-header {
		display: block;
		padding: 14px 0 0;
	}

	body .site-header > .col-full {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		padding: 0 clamp(16px, 4vw, 24px) 14px;
	}

	body .site-branding {
		max-width: 100%;
	}

	body .site-header .storefront-primary-navigation {
		margin: 0;
		background: var(--sf-surface);
		border-top: 1px solid var(--sf-line);
	}

	body .site-header .storefront-primary-navigation > .col-full {
		justify-content: space-between;
		padding: 8px clamp(16px, 4vw, 24px);
		gap: 12px;
	}

	/* 汉堡按钮做成文字链接，跟页头的字距一致，别像一块灰色色块 */
	body .site-header .menu-toggle {
		padding: 6px 0;
		background: transparent;
		color: var(--sf-text);
		font-family: var(--sf-font);
		font-size: 0.72rem;
		font-weight: 600;
		letter-spacing: 0.14em;
		text-transform: uppercase;
		border: 0;
		border-radius: 0;
	}

	.sf-hero__inner {
		grid-template-columns: minmax(0, 1fr);
		padding-top: clamp(40px, 7vw, 64px);
		padding-bottom: clamp(40px, 7vw, 64px);
	}

	.sf-hero__visual {
		display: none;
	}

	body ul.products,
	body ul.products.columns-4,
	body ul.products.columns-5,
	body ul.products.columns-6 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	body.single-product div.product {
		grid-template-columns: minmax(0, 1fr);
	}

	body .woocommerce form.checkout {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"details"
			"heading"
			"review";
	}

	.sf-footer__grid {
		grid-template-columns: 1fr 1fr;
		gap: clamp(22px, 4vw, 32px);
	}

	.sf-footer__brand {
		grid-column: 1 / -1;
	}

	.sf-footer__tagline {
		max-width: 48ch;
	}
}

/* 手机：页脚两列、品牌列占满，购物车小计换行 */
@media (max-width: 640px) {
	body {
		font-size: 15px;
	}

	body .woocommerce form.checkout .col2-set {
		grid-template-columns: minmax(0, 1fr);
	}

	body .woocommerce form.checkout .woocommerce-billing-fields__field-wrapper,
	body .woocommerce form.checkout .woocommerce-shipping-fields__field-wrapper {
		grid-template-columns: minmax(0, 1fr);
	}

	.sf-footer__grid {
		grid-template-columns: 1fr 1fr;
	}

	.sf-footer__name {
		font-size: 0.9rem;
	}

	body .site-footer .site-info {
		justify-content: flex-start;
	}

	body ul.products {
		gap: 14px;
	}

	body ul.products li.product .woocommerce-loop-product__title {
		padding: 12px 12px 4px;
		font-size: 0.84rem;
	}

	body ul.products li.product .price {
		padding: 0 12px;
		margin-bottom: 10px;
	}

	body ul.products li.product .button {
		margin: auto 12px 14px;
		padding: 10px 12px;
		font-size: 0.64rem;
		letter-spacing: 0.08em;
	}

	body .woocommerce .coupon .input-text {
		flex: 1 1 100%;
	}

	body .woocommerce .cart_totals {
		max-width: none;
	}
}

/* 小屏：两列商品卡里按钮要能一行放下，优惠码不再浮动 */
@media (max-width: 480px) {
	body ul.products li.product .button {
		padding: 9px 6px;
		font-size: 0.6rem;
		letter-spacing: 0.04em;
	}

	body .woocommerce .coupon {
		float: none;
		width: 100%;
	}

	body .woocommerce form.woocommerce-cart-form button[name="update_cart"] {
		float: none;
		margin-top: 12px;
	}
}

/* =====================================================================
 * 1.2.1 真站修正（静态 mock 看不出、装到 kilncreek 才暴露的三处）
 * ===================================================================== */

/* (1) 页头：品牌 + 搜索同一行，副标题压成一行省略号，别把 header 撑成四行 */
body .site-branding {
	display: flex;
	align-items: center;
	gap: clamp(12px, 1.6vw, 28px);
	max-width: none;
	flex: 0 1 auto;
	min-width: 0;
}

body .site-branding > .site-title,
body .site-branding > .site-description {
	flex: 0 0 auto;
}

body .site-description {
	max-width: 34ch;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

body .site-search {
	flex: 0 0 auto;
	margin: 0;
	padding: 0;
}

body .site-search .widget_product_search,
body .site-search form.woocommerce-product-search {
	margin: 0;
}

body .site-search form.woocommerce-product-search {
	display: flex;
	align-items: center;
	gap: 6px;
}

body .site-search input.search-field {
	width: 148px;
	height: 34px;
	padding: 0 12px;
	font-size: 0.78rem;
	border: 1px solid var(--sf-line);
	border-radius: 999px;
	background: var(--sf-surface, #fff);
}

body .site-search button,
body .site-search input[type="submit"] {
	height: 34px;
	padding: 0 14px;
	font-size: 0.7rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	border: 1px solid var(--sf-line);
	border-radius: 999px;
	background: transparent;
	color: var(--sf-text);
	white-space: nowrap;
}

@media (max-width: 900px) {
	body .site-search { display: none; }
	body .site-description { max-width: 22ch; }
}

/* (2) 商品网格：Storefront 的 ::before/::after 是 display:table 的清除浮动，
   放进 grid 后会各占一个格子，导致第一行整体右移一格 */
body ul.products::before,
body ul.products::after {
	content: none !important;
	display: none !important;
}

body ul.products li.product,
body ul.products li.product.first,
body ul.products li.product.last {
	float: none !important;
	clear: none !important;
	width: auto !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* (3) 列表下方那条重复的排序工具条（钩子已在 functions.php 摘掉，这里兜底隐藏） */
body .storefront-sorting + ul.products + .storefront-sorting {
	display: none !important;
}

/* =====================================================================
 * 1.2.2：宽屏下导航被挤成两行（Shop / Our story 一行、Contact us 掉下一行）
 * ===================================================================== */
body .site-branding {
	flex: 1 1 auto;
	min-width: 0;
}

body .site-search {
	margin-left: auto;
}

body .site-header .storefront-primary-navigation {
	flex: 0 0 auto;
}

body .site-header .storefront-primary-navigation > .col-full {
	flex-wrap: nowrap;
	justify-content: flex-end;
	gap: clamp(12px, 1.4vw, 26px);
}

body #site-navigation,
body #site-navigation .primary-navigation,
body #site-navigation #primary-menu {
	flex-wrap: nowrap;
	white-space: nowrap;
}

body #site-navigation #primary-menu li {
	white-space: nowrap;
	flex: 0 0 auto;
}

body #site-navigation #primary-menu a {
	white-space: nowrap;
}

body .site-header-cart,
body .site-header-cart .cart-contents {
	flex: 0 0 auto;
	white-space: nowrap;
}

@media (max-width: 1100px) {
	body .site-search input.search-field { width: 110px; }
}

/* 1.2.3 收掉页头下方的空带：Storefront 给 .site-header 带了 ~68px 的 margin-bottom */
body .site-header {
	margin-bottom: 0 !important;
}

/* =====================================================================
 * 1.2.4 页头回到 Storefront 原生两段式
 * 之前用 display:contents + 自定义 flex 把两段合成一行，在真站上和 Storefront
 * 自带的 .site-search / 浮动规则打架：品牌被压成一列竖排字、搜索框盖住导航。
 * 这里不再改结构，只做「字体 + 间距 + 隐藏长副标题/搜索框」这几件安全的事。
 * ===================================================================== */
body .site-header {
	display: block;
	margin-bottom: 0 !important;
	padding: clamp(14px, 1.6vw, 22px) 0;
	background-color: var(--sf-header-bg) !important;
	border-bottom: 1px solid var(--sf-line);
}

body .site-header > .col-full {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: clamp(16px, 2.4vw, 48px);
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 var(--sf-gutter);
}

body .site-branding {
	float: none;
	margin: 0;
	padding: 0;
	flex: 0 0 auto;
	max-width: none;
	display: block;
}

body .site-title {
	margin: 0;
	font-family: var(--sf-heading-font);
	font-size: clamp(18px, 1.4vw, 22px);
	letter-spacing: 0.04em;
	line-height: 1.2;
	white-space: nowrap;
}

/* 长副标题在页头只会把 header 撑成四行，页脚和 hero 已经写了简介 */
body .site-header .site-description,
body .site-header .site-search {
	display: none !important;
}

body .site-header .storefront-primary-navigation {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
}

body .site-header .storefront-primary-navigation > .col-full {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: nowrap;
	gap: clamp(14px, 1.8vw, 30px);
	max-width: none;
	margin: 0;
	padding: 0;
}

body #site-navigation,
body #site-navigation .primary-navigation,
body #site-navigation #primary-menu {
	display: flex;
	flex-wrap: nowrap;
	white-space: nowrap;
	float: none;
	margin: 0;
}

body #site-navigation #primary-menu li,
body #site-navigation #primary-menu a {
	white-space: nowrap;
	flex: 0 0 auto;
}

body .site-header-cart,
body .site-header-cart .cart-contents {
	flex: 0 0 auto;
	white-space: nowrap;
}

@media (max-width: 900px) {
	body .site-header > .col-full { gap: 12px; }
	body .site-title { font-size: 18px; }
}

/* 1.2.5 header reset: keep Storefront native structure, only visual tweaks */
body .site-header {
	display: block !important;
	margin-bottom: 0 !important;
	padding: clamp(14px, 1.4vw, 20px) 0 !important;
	background-color: var(--sf-header-bg) !important;
	border-bottom: 1px solid var(--sf-line);
}
body .site-header > .col-full {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: clamp(18px, 2.4vw, 48px);
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 var(--sf-gutter);
}
body .site-header .site-branding {
	float: none !important;
	display: block !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
body .site-header .site-description { display: none !important; }
body .site-header .site-search { display: none !important; }
body .site-header .site-title {
	margin: 0 !important;
	font-family: var(--sf-heading-font);
	font-size: clamp(18px, 1.35vw, 22px);
	line-height: 1.2;
	letter-spacing: 0.04em;
	white-space: nowrap;
}
body .site-header .site-title a { color: var(--sf-text); text-decoration: none; }
body .site-header .storefront-primary-navigation { display: block !important; margin: 0 !important; }
body .site-header .storefront-primary-navigation > .col-full {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	flex-wrap: nowrap !important;
	gap: clamp(16px, 2vw, 32px);
	max-width: none;
	margin: 0;
	padding: 0;
}
body .site-header #site-navigation { display: block !important; float: none !important; width: auto !important; margin: 0; }
body .site-header #site-navigation .primary-navigation { display: block !important; float: none !important; }
body .site-header #site-navigation ul.menu {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center;
	gap: clamp(16px, 2vw, 34px);
	margin: 0;
	padding: 0;
	list-style: none;
}
body .site-header #site-navigation ul.menu > li { white-space: nowrap; margin: 0; padding: 0; }
body .site-header #site-navigation .menu-toggle { display: none !important; }
body .site-header #site-navigation > .menu { display: none !important; }
body .site-header .site-header-cart { float: none !important; margin: 0 !important; width: auto !important; }
@media (max-width: 900px) {
	body .site-header > .col-full { gap: 12px; }
	body .site-header #site-navigation ul.menu { gap: 14px; }
}

/* 1.2.6 brand left: first header row left-aligned (was centered by space-between) */
body .site-header > .col-full {
	justify-content: flex-start !important;
}
body .site-header .storefront-primary-navigation > .col-full {
	justify-content: space-between !important;
}

/* 1.2.7 nav align: nav flush with brand on the left, cart pinned right */
body .site-header .storefront-primary-navigation > .col-full {
	justify-content: flex-start !important;
	max-width: 1280px !important;
	margin: 0 auto !important;
	padding: 0 var(--sf-gutter) !important;
}
body .site-header #site-navigation {
	margin-right: auto !important;
	text-align: left;
}
body .site-header #site-navigation ul.menu {
	justify-content: flex-start !important;
}
body .site-header .site-header-cart {
	margin-left: auto !important;
}

/* =====================================================================
 * 1.3.0 首屏横幅图：option sf_hero.image（本站媒体库地址）铺满 hero
 * ===================================================================== */
body .sf-hero.sf-hero--has-image {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	color: #fff;
	min-height: clamp(360px, 46vw, 560px);
	display: flex;
	align-items: center;
}

body .sf-hero.sf-hero--has-image .sf-hero__inner {
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 var(--sf-gutter);
	grid-template-columns: minmax(0, 640px) 1fr;
}

body .sf-hero.sf-hero--has-image .sf-hero__eyebrow,
body .sf-hero.sf-hero--has-image .sf-hero__title,
body .sf-hero.sf-hero--has-image .sf-hero__text {
	color: #fff;
	text-shadow: 0 1px 24px rgba(0, 0, 0, .35);
}

body .sf-hero.sf-hero--has-image .sf-hero__text {
	color: rgba(255, 255, 255, .92);
}

body .sf-hero.sf-hero--has-image .sf-hero__cta {
	background: #fff;
	color: #2b211b;
	border-color: #fff;
}

body .sf-hero.sf-hero--has-image .sf-hero__cta:hover {
	background: rgba(255, 255, 255, .88);
	color: #2b211b;
}

body .sf-hero.sf-hero--has-image .sf-hero__link {
	color: #fff;
	border-bottom-color: rgba(255, 255, 255, .6);
}

@media (max-width: 900px) {
	body .sf-hero.sf-hero--has-image .sf-hero__inner {
		grid-template-columns: 1fr;
	}
}
