/*
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.0.1
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
*/

/* 默认值 = fashion；assets/presets.css 里 body.sf-style-<id> 逐套覆盖这些变量。 */
body {
	--sf-bg: #ffffff;
	--sf-surface: #faf9f7;
	--sf-text: #1b1b1b;
	--sf-primary: #1b1b1b;
	--sf-accent: #8a6a4f;
	--sf-line: rgba(0, 0, 0, 0.1);
	--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-hero-bg: linear-gradient(135deg, #1b1b1b 0%, #4a3a2c 100%);
	--sf-hero-text: #ffffff;
	background-color: var(--sf-bg);
	color: var(--sf-text);
	font-family: var(--sf-font);
	font-size: 16px;
	line-height: 1.65;
}

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);
}

/* 首页 hero：由 functions.php 在 Storefront 首页钩子上输出，也可以用 [sf_hero] 自己放 */
.sf-hero {
	background: var(--sf-hero-bg);
	color: var(--sf-hero-text);
	padding: clamp(48px, 8vw, 96px) 24px;
	margin: 0 0 40px;
}

.sf-hero__inner {
	max-width: 1080px;
	margin: 0 auto;
}

/* 首屏版式（hero 注入时写 option sf_hero.layout）：centered 居中，split 保持左对齐 */
.sf-hero--layout-centered .sf-hero__inner {
	text-align: center;
}

.sf-hero--layout-centered .sf-hero__text {
	margin-left: auto;
	margin-right: auto;
}

.sf-hero__eyebrow {
	margin: 0 0 14px;
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	opacity: 0.85;
}

.sf-hero__title {
	margin: 0 0 14px;
	font-size: clamp(30px, 5vw, 54px);
	line-height: 1.15;
	color: var(--sf-hero-text);
}

.sf-hero__text {
	max-width: 640px;
	margin: 0 0 26px;
	font-size: 17px;
	line-height: 1.6;
	opacity: 0.92;
}

.sf-hero__cta,
.sf-hero__cta:visited {
	display: inline-block;
	padding: 12px 26px;
	border-radius: var(--sf-radius);
	background: var(--sf-primary);
	color: var(--sf-bg);
	text-decoration: none;
	font-weight: 600;
	letter-spacing: 0.04em;
}

.sf-hero__cta:hover,
.sf-hero__cta:focus {
	background: var(--sf-accent);
	color: var(--sf-bg);
}

/* 按钮：Storefront / WooCommerce 的几种按钮统一到当前风格的圆角和主色 */
body .woocommerce a.button,
body .woocommerce button.button,
body .woocommerce input.button,
body .woocommerce #respond input#submit,
body .woocommerce a.button.alt,
body .woocommerce button.button.alt,
body button,
body input[type="submit"],
body .sf-hero__cta {
	border-radius: var(--sf-radius);
}

body .woocommerce a.button,
body .woocommerce button.button,
body .woocommerce input.button,
body .woocommerce #respond input#submit,
body .woocommerce a.button.alt,
body .woocommerce button.button.alt,
body input[type="submit"] {
	background-color: var(--sf-primary);
	color: var(--sf-bg);
	border-color: var(--sf-primary);
}

body .woocommerce a.button:hover,
body .woocommerce button.button:hover,
body .woocommerce input.button:hover,
body .woocommerce #respond input#submit:hover,
body .woocommerce a.button.alt:hover,
body .woocommerce button.button.alt:hover {
	background-color: var(--sf-accent);
	border-color: var(--sf-accent);
	color: var(--sf-bg);
}

/* 商品卡 */
body.woocommerce ul.products li.product,
body.woocommerce-page ul.products li.product {
	background-color: var(--sf-surface);
	border: 1px solid var(--sf-line);
	border-radius: var(--sf-radius);
	padding: 12px 12px 18px;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

body.woocommerce ul.products li.product:hover,
body.woocommerce-page ul.products li.product:hover {
	box-shadow: 0 14px 34px var(--sf-line);
}

body.woocommerce ul.products li.product a img,
body.woocommerce-page ul.products li.product a img {
	border-radius: calc(var(--sf-radius) / 1.6);
}

body.woocommerce ul.products li.product .price,
body.woocommerce-page ul.products li.product .price {
	color: var(--sf-accent);
	font-weight: 600;
}

body.woocommerce ul.products li.product .woocommerce-loop-product__title {
	padding-top: 10px;
}

/* 页头、页脚与分隔线跟随底色，避免深色/暖色风格里露出纯白底 */
body .site-header,
body .site-footer {
	background-color: var(--sf-surface);
	border-color: var(--sf-line);
}

body .site-footer {
	color: var(--sf-text);
}

body .woocommerce-message,
body .woocommerce-info,
body .woocommerce-error {
	border-top-color: var(--sf-accent);
}
