/* ==========================================================================
   ORGANICWAY — Global Design System v1.0  (2026-10-21)
   统一全站配色与组件风格：绿系品牌色 + 暖中性灰阶 + 统一圆角/阴影/焦点环。
   作用域：前台内容与主题组件；不动后台、不动 WooCommerce 下单流程、
   不覆盖营养成分表（.nutrition-facts*）与表格设计系统（ow-tables.css 负责）。
   加载顺序：astra 主题 CSS → 本文件 → ow-tables.css（表格细节最后生效）
   ========================================================================== */

:root {
	/* ---- brand green scale (600 = 现有品牌绿 #68a00f) ---- */
	--ow-green-50:  #f5faf0;
	--ow-green-100: #e9f4de;
	--ow-green-200: #d8eac4;
	--ow-green-300: #bcd99c;
	--ow-green-400: #9dc870;
	--ow-green-500: #78ac33;
	--ow-green-600: #68a00f;   /* brand */
	--ow-green-700: #55800c;
	--ow-green-800: #44660a;
	--ow-green-900: #375208;

	/* ---- warm neutral scale (与品牌绿同色温) ---- */
	--ow-ink:        #1e2a1b;   /* 标题/强调文字 */
	--ow-body:       #414a3f;   /* 正文 */
	--ow-muted:      #6d776a;   /* 次级文字 */
	--ow-faint:      #9aa396;   /* 占位/极弱文字 */
	--ow-line:       #e3e8dd;   /* 常规描边 */
	--ow-line-soft:  #eef1ea;   /* 弱描边/分隔线 */
	--ow-surface:    #ffffff;
	--ow-surface-2:  #f7f9f4;   /* 区块底色 */
	--ow-surface-3:  #f0f4ea;   /* 浅绿底 */
	--ow-surface-inverse: #1e2a1b;

	/* ---- semantic ---- */
	--ow-danger: #c0392b;
	--ow-warn:   #b7791f;
	--ow-info:   #2b6cb0;

	/* ---- type scale (统一全站字号) ---- */
	--ow-fs-2xs: 12px;   /* 角标 / 徽章 */
	--ow-fs-xs:  13px;   /* 面包屑 / 辅助文字 */
	--ow-fs-sm:  14px;   /* 表格 / 表单标签 / 小字 */
	--ow-fs-base:15px;   /* 按钮 / 卡片标题 */
	--ow-fs-md:  16px;   /* 正文基准 */
	--ow-fs-lg:  18px;   /* h4 */
	--ow-fs-xl:  20px;   /* h3 */
	--ow-fs-2xl: 24px;   /* h2 */
	--ow-fs-3xl: 30px;   /* h1 */
	--ow-lh-tight: 1.25;
	--ow-lh-snug:  1.45;
	--ow-lh-base:  1.7;
	--ow-lh-loose: 1.8;

	/* ---- shape / depth / motion ---- */
	--ow-radius-sm: 6px;
	--ow-radius:    10px;
	--ow-radius-lg: 14px;
	--ow-shadow-1: 0 1px 2px rgba(30, 42, 27, .05);
	--ow-shadow-2: 0 2px 10px rgba(30, 42, 27, .07);
	--ow-shadow-3: 0 10px 28px rgba(30, 42, 27, .10);
	--ow-focus-ring: 0 0 0 3px rgba(104, 160, 15, .28);
	--ow-speed: .18s;
}

/* ============================================================ base type */
body {
	color: var(--ow-body);
	font-size: var(--ow-fs-md);
	line-height: var(--ow-lh-base);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 {
	color: var(--ow-ink);
	font-weight: 700;
	letter-spacing: -.01em;
	line-height: var(--ow-lh-tight);
	text-wrap: balance;
}

h1, .entry-content h1 { font-size: clamp(26px, 21px + 1.8vw, 34px); }
h2, .entry-content h2 { font-size: clamp(22px, 19px + .9vw, 28px); }
h3, .entry-content h3 { font-size: clamp(19px, 18px + .35vw, 23px); }
h4, .entry-content h4 { font-size: var(--ow-fs-lg); }
h5, .entry-content h5 { font-size: var(--ow-fs-md); }
h6, .entry-content h6 { font-size: var(--ow-fs-sm); letter-spacing: .04em; text-transform: uppercase; color: var(--ow-muted); }

p, .entry-content p, .entry-content li { font-size: var(--ow-fs-md); line-height: var(--ow-lh-base); }
.entry-content ul, .entry-content ol { line-height: var(--ow-lh-base); }

/* ============================================================ links */
a {
	color: var(--ow-green-700);
	text-decoration: none;
	transition: color var(--ow-speed) ease, background-color var(--ow-speed) ease, border-color var(--ow-speed) ease, box-shadow var(--ow-speed) ease, transform var(--ow-speed) ease;
}
a:hover, a:focus { color: var(--ow-green-800); }
.entry-content a:not(.uagb-infobox-cta-link):not(.wp-block-button__link):hover { text-decoration: underline; text-underline-offset: 3px; }

/* 文本选择 */
::selection { background: var(--ow-green-200); color: var(--ow-ink); }
::-moz-selection { background: var(--ow-green-200); color: var(--ow-ink); }

/* 统一焦点环（键盘可达性） */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--ow-green-600);
	outline-offset: 2px;
	border-radius: 3px;
}

/* ============================================================ buttons */
a.button, button, .ast-button, .button,
input[type="button"], input[type="submit"], input[type="reset"],
.wp-block-button__link, .uagb-infobox-cta-link {
	background: var(--ow-green-600) !important;
	border: 1px solid var(--ow-green-600) !important;
	border-radius: 4px !important;
	color: #fff !important;
	font-weight: 600;
	font-size: var(--ow-fs-base);
	letter-spacing: .01em;
	line-height: 1.2;
	padding: .68em 1.25em !important;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none !important;
	transition: background-color var(--ow-speed) ease, border-color var(--ow-speed) ease, color var(--ow-speed) ease;
}
a.button:hover, button:hover, .ast-button:hover,
input[type="button"]:hover, input[type="submit"]:hover, input[type="reset"]:hover,
.wp-block-button__link:hover, .uagb-infobox-cta-link:hover {
	background: var(--ow-green-700) !important;
	border-color: var(--ow-green-700) !important;
	color: #fff;
	text-decoration: none;
	transform: none;
	box-shadow: none !important;
}
a.button:active, button:active, .ast-button:active,
.wp-block-button__link:active, .uagb-infobox-cta-link:active {
	background: var(--ow-green-800) !important;
	transform: none;
	box-shadow: none !important;
}
/* 次要 / 描边按钮 */
a.button.alt, .button.alt, button.button.alt,
.wp-block-button.is-style-outline .wp-block-button__link {
	background: #fff !important;
	border: 1px solid var(--ow-green-600) !important;
	color: var(--ow-green-700) !important;
	box-shadow: none !important;
}
a.button.alt:hover, .button.alt:hover, button.button.alt:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--ow-green-50) !important;
	border-color: var(--ow-green-700) !important;
	color: var(--ow-green-800) !important;
	box-shadow: none !important;
	transform: none;
}

/* 主 CTA（询盘按钮）实心品牌绿，与次要按钮拉开层级 */
a.button.single_add_to_cart_button,
button.button.single_add_to_cart_button,
.button.single_add_to_cart_button,
.single_add_to_cart_button,
.woocommerce div.product form.cart .button.single_add_to_cart_button {
	background: var(--ow-green-600) !important;
	border: 1px solid var(--ow-green-600) !important;
	color: #fff !important;
	box-shadow: none !important;
}
/* 幽灵按钮 */
.wp-block-button.is-style-ghost .wp-block-button__link {
	background: transparent;
	border-color: transparent;
	color: var(--ow-green-700);
	box-shadow: none;
}
.wp-block-button.is-style-ghost .wp-block-button__link:hover {
	background: var(--ow-green-50);
	color: var(--ow-green-800);
}
/* 禁用态 */
a.button.disabled, button:disabled, .wp-block-button__link[aria-disabled="true"] {
	opacity: .55;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* ============================================================ quote / code / lists */
blockquote, .wp-block-quote, .entry-content blockquote {
	border-left: 3px solid var(--ow-green-600);
	background: var(--ow-green-50);
	border-radius: 0 var(--ow-radius-sm) var(--ow-radius-sm) 0;
	padding: 1.1em 1.4em;
	margin: 1.4em 0;
	font-size: var(--ow-fs-md);
	font-style: normal;
	color: var(--ow-body);
}
blockquote p:last-child, .wp-block-quote p:last-child { margin-bottom: 0; }
blockquote cite, .wp-block-quote cite, .wp-block-quote footer {
	font-style: normal;
	font-size: .9em;
	color: var(--ow-muted);
}

code, kbd, samp, pre {
	background: var(--ow-surface-2);
	border: 1px solid var(--ow-line-soft);
	border-radius: var(--ow-radius-sm);
	color: var(--ow-green-800);
	font-size: var(--ow-fs-sm);
}
pre {
	padding: 1.1em 1.3em;
	overflow-x: auto;
	line-height: 1.6;
}
pre code { background: none; border: 0; color: var(--ow-body); padding: 0; }

.entry-content ul li::marker,
.entry-content ol li::marker { color: var(--ow-green-600); }

/* ============================================================ separators */
hr, .entry-content hr, .wp-block-separator {
	border: 0;
	border-top: 1px solid var(--ow-line);
	height: auto;
	opacity: 1;
	margin: 2em 0;
}
.wp-block-separator.has-text-color { color: var(--ow-muted); }
.wp-block-separator.is-style-wide { border-top-width: 1px; border-top-color: var(--ow-line); }

/* ============================================================ badges / sale */
span.onsale,
.woocommerce span.onsale, .woocommerce div.product span.onsale,
.woocommerce ul.products li.product .onsale, .woocommerce-page ul.products li.product .onsale {
	background: var(--ow-green-600);
	color: #fff;
	border-radius: 999px;
	padding: .3em .9em;
	font-size: var(--ow-fs-2xs);
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	line-height: 1.6;
	box-shadow: 0 2px 8px rgba(68, 102, 10, .28);
	min-height: 0;
	min-width: 0;
}

/* ============================================================ breadcrumb */
.woocommerce-breadcrumb {
	color: var(--ow-muted);
	font-size: var(--ow-fs-xs);
	letter-spacing: .01em;
}
.woocommerce-breadcrumb a { color: var(--ow-muted); }
.woocommerce-breadcrumb a:hover { color: var(--ow-green-700); text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================ TOC */
.ez-toc-container #ez-toc-container .ez-toc-title {
	color: var(--ow-ink);
	font-weight: 700;
	letter-spacing: .02em;
}
.ez-toc-list a { color: var(--ow-muted); }
.ez-toc-list a:hover { color: var(--ow-green-700); }
.ez-toc-list .ez-toc-active > a, .ez-toc-list .active > a { color: var(--ow-green-700); font-weight: 600; }

/* ============================================================ FAQ (Rank Math) */
#rank-math-faq .rank-math-list-item {
	border-bottom: 1px solid var(--ow-line-soft);
}
#rank-math-faq .rank-math-question {
	color: var(--ow-ink);
	font-size: var(--ow-fs-md);
	font-weight: 600;
	transition: color var(--ow-speed) ease;
}
#rank-math-faq .rank-math-question:hover { color: var(--ow-green-700); }
#rank-math-faq .rank-math-answer { color: var(--ow-body); font-size: var(--ow-fs-md); }
#rank-math-faq .rank-math-answer p { line-height: 1.75; }

/* ============================================================ forms */
.wpforms-field-label, .wpforms-field-label .wpforms-field-label-text {
	color: var(--ow-ink);
	font-size: var(--ow-fs-sm);
	font-weight: 600;
	letter-spacing: .01em;
}
.wpforms-field-required { color: var(--ow-danger); }
input[type="text"], input[type="email"], input[type="url"], input[type="tel"],
input[type="number"], input[type="search"], input[type="password"],
select, textarea, .wpforms-field input, .wpforms-field textarea, .wpforms-field select {
	background: var(--ow-surface);
	border: 1px solid var(--ow-line);
	border-radius: var(--ow-radius-sm);
	color: var(--ow-body);
	box-shadow: none;
	transition: border-color var(--ow-speed) ease, box-shadow var(--ow-speed) ease;
}
input:focus, select:focus, textarea:focus,
.wpforms-field input:focus, .wpforms-field textarea:focus, .wpforms-field select:focus {
	border-color: var(--ow-green-600);
	box-shadow: var(--ow-focus-ring);
	outline: none;
}
input::placeholder, textarea::placeholder { color: var(--ow-faint); }
input[type="checkbox"], input[type="radio"], .wpforms-field input[type="checkbox"] {
	accent-color: var(--ow-green-600);
	border-radius: 3px;
}

/* ============================================================ product cards */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	background: var(--ow-surface);
	border: 1px solid var(--ow-line-soft);
	border-radius: var(--ow-radius);
	overflow: hidden;
	box-shadow: var(--ow-shadow-1);
	transition: transform var(--ow-speed) ease, box-shadow var(--ow-speed) ease, border-color var(--ow-speed) ease;
}
.woocommerce ul.products li.product:hover,
.woocommerce-page ul.products li.product:hover {
	transform: translateY(-3px);
	border-color: var(--ow-green-200);
	box-shadow: var(--ow-shadow-2);
}
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title {
	color: var(--ow-ink);
	font-weight: 600;
	font-size: var(--ow-fs-base);
}
.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price { color: var(--ow-green-700); }

/* WooCommerce 属性表（Additional information）——与正文表格风格对齐 */
.woocommerce table.shop_attributes,
.woocommerce-page table.shop_attributes {
	border: 1px solid var(--ow-line);
	border-radius: var(--ow-radius);
	overflow: hidden;
	border-collapse: separate;
	border-spacing: 0;
}
.woocommerce table.shop_attributes th,
.woocommerce table.shop_attributes td {
	background: var(--ow-surface);
	border-bottom: 1px solid var(--ow-line-soft);
	color: var(--ow-body);
	padding: .7em .9em;
}
.woocommerce table.shop_attributes th { background: var(--ow-surface-2); color: var(--ow-ink); font-weight: 600; }
.woocommerce table.shop_attributes tr:last-child th,
.woocommerce table.shop_attributes tr:last-child td { border-bottom: 0; }


/* ==================================================== variation label picker */
.ow-vl-wrap { margin: 0 0 .4em; }
.ow-vl-options { display: flex; flex-wrap: wrap; gap: 8px; }
.ow-vl-option { position: relative; display: inline-flex; }
.ow-vl-radio { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ow-vl-text {
	display: inline-block;
	padding: .45em .9em;
	border: 1px solid var(--ow-line);
	border-radius: 4px;
	background: #fff;
	color: var(--ow-body);
	font-size: var(--ow-fs-base);
	line-height: 1.35;
	cursor: pointer;
	transition: border-color var(--ow-speed) ease, background-color var(--ow-speed) ease, color var(--ow-speed) ease;
}
.ow-vl-option:hover .ow-vl-text { border-color: var(--ow-green-400); }
.ow-vl-radio:checked + .ow-vl-text {
	border-color: var(--ow-green-600);
	background: var(--ow-green-600);
	color: #fff;
}
.ow-vl-radio:focus-visible + .ow-vl-text {
	outline: 2px solid var(--ow-green-600);
	outline-offset: 2px;
}
.ow-vl-option.is-disabled .ow-vl-text {
	opacity: .45;
	cursor: not-allowed;
	text-decoration: line-through;
}
table.variations th, table.variations td { padding: .4em .6em; border: 0; }
table.variations th label {
	color: var(--ow-ink);
	font-weight: 600;
	font-size: var(--ow-fs-sm);
	letter-spacing: .01em;
}
table.variations select { display: none; }


/* ============================================== variation swatches (插件) 简约化 */
/* 插件自身 CSS 依赖后台才注册的 dashicons → 前台依赖解析失败会被 WP 丢弃，
   故这里补齐它最关键的规则（隐藏 select 包装 + swatch 内部布局），保证始终可用。 */
.cfvsw-hidden-select { display: none !important; }
.cfvsw-swatches-container { display: flex; flex-wrap: wrap; gap: 8px; }
.cfvsw-swatches-option .cfvsw-swatch-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	width: calc(100% - 2px);
	border-radius: inherit;
	line-height: 1.35;
}
.cfvsw-swatches-option {
	font-size: var(--ow-fs-base);
	color: var(--ow-body);
	background: #fff;
	border: 1px solid var(--ow-line);
	border-radius: 4px;
	padding: .45em .9em;
	line-height: 1.35;
	cursor: pointer;
	transition: border-color var(--ow-speed) ease, background-color var(--ow-speed) ease, color var(--ow-speed) ease;
}
.cfvsw-label-option,
.cfvsw-image-option { border-color: var(--ow-line) !important; }
.cfvsw-swatches-option:not(.cfvsw-swatches-disabled, .cfvsw-swatches-out-of-stock):hover {
	border-color: var(--ow-green-400) !important;
	background: var(--ow-green-50);
}
.cfvsw-selected-swatch {
	border-color: var(--ow-green-600) !important;
	background: var(--ow-green-600) !important;
	color: #fff !important;
}
.cfvsw-selected-swatch .cfvsw-swatch-inner { color: #fff !important; }
.cfvsw-swatches-out-of-stock,
.cfvsw-swatches-disabled { opacity: .45; }
.cfvsw-swatches-blur::before { opacity: .25; }


/* ============================== 推荐模块 + 遗留蓝统一为品牌绿 ==============
   ow-keyword-recommender.css 里残留 WordPress 默认蓝 #0073aa / #005f8e：
   .wc-article-content h4 a:hover / .wc-rp-body h3 a:hover / .wc-rp-readmore / .btn-quote
   → 全部换成品牌绿，并把 Astra 调色板槽位 0（链接色）也指向品牌绿，
     这样所有引用 var(--ast-global-color-0) 的组件自动统一。 */
html:root { --ast-global-color-0: var(--ow-green-600); }

.wc-article-content h4 a { color: var(--ow-ink); }
.wc-article-content h4 a:hover { color: var(--ow-green-700) !important; }
.wc-article-content p { color: var(--ow-muted); }
.wc-article-item { border-bottom-color: var(--ow-line); }
.wc-article-item:hover { background: var(--ow-surface-2); }
.wc-article-item:hover .wc-article-thumb img { transform: scale(1.04); }
.wc-article-thumb img { transition: transform var(--ow-speed) ease; }

.wc-rp-body h3 a { color: var(--ow-ink); }
.wc-rp-body h3 a:hover { color: var(--ow-green-700) !important; }
.wc-rp-readmore { color: var(--ow-green-700) !important; }
.wc-rp-readmore:hover { color: var(--ow-green-800) !important; }

.btn-quote { background: var(--ow-green-600) !important; color: #fff !important; }
.btn-quote:hover { background: var(--ow-green-700) !important; color: #fff !important; }

/* 无障碍跳转链接（skip-link）沿用主题蓝 → 统一绿 */
.site .skip-link, .screen-reader-text:focus { color: var(--ow-green-700) !important; }

/* ============================================================ misc surfaces */
.ast-article-single, .site-content {
	--ow-shadow-1: 0 1px 2px rgba(30, 42, 27, .05);
}

.ast-builder-social-element:hover { color: var(--ow-green-700) !important; }
.ast-icon svg { transition: transform var(--ow-speed) ease; }

.widget-title, .wp-block-heading h2, .footer-widget .widget-title {
	color: var(--ow-ink);
	letter-spacing: -.01em;
}

/* 描边按钮悬停时保持深绿文字（避免白字隐形） */
.woocommerce .button.alt:hover { color: var(--ow-green-800) !important; }

/* ============================================================ a11y */
@media (prefers-reduced-motion: reduce) {
	a, button, .ast-button, .wp-block-button__link,
	.woocommerce ul.products li.product { transition: none !important; }
	a.button:hover, button:hover, .wp-block-button__link:hover { transform: none; }
}

/* ============================================================ print */
@media print {
	a.button, button, .ast-button, .wp-block-button__link {
		background: none !important;
		color: #000 !important;
		border: 1px solid #000 !important;
		box-shadow: none !important;
	}
	.woocommerce span.onsale { background: none !important; color: #000 !important; border: 1px solid #000; }
}
