/*
 Theme Name: VegLine Child
 Theme URI: https://mudane.test
 Description: Blocksy child theme for the VegLine fruit & vegetable processing equipment site.
 Author: VegLine
 Template: blocksy
 Version: 1.0.3
 Text Domain: vegline-child
*/

/* ============================================================
   目录模式：隐藏残留的价格 / 库存 / 加购占位
   ============================================================ */
.woocommerce-Price-amount,
.product_meta .stock,
.vegline-hide {
	display: none !important;
}

/* ============================================================
   首页英雄区
   ============================================================ */
.vegline-hero {
	text-align: center;
	background: #0f3d2e;
	color: #ffffff;
	padding: 84px 20px 90px;
	position: relative;
}
.vegline-hero .wp-block-heading {
	font-size: clamp(32px, 5vw, 54px);
	line-height: 1.12;
	margin: 0 auto 18px;
	font-weight: 700;
	color: #ffffff;
}
.vegline-hero p {
	font-size: 18px;
	max-width: 720px;
	margin: 0 auto 32px;
	line-height: 1.6;
	color: #dcefe6;
}
.vegline-hero .wp-block-buttons {
	justify-content: center;
}
.vegline-hero .wp-block-button__link {
	padding: 13px 28px;
	font-size: 16px;
	border-radius: 7px;
}
/* 修复首页 hero 第一个按钮：白色背景上的文字应为深色 */
.vegline-hero .wp-block-button:first-child .wp-block-button__link,
.vegline-hero .wp-block-button:first-child .wp-block-button__link.has-white-color,
.vegline-hero .wp-block-button:first-child .wp-block-button__link.has-text-color {
	color: #0f3d2e !important;
}
/* hero 第二个按钮：透明背景 + 白色边框文字 */
.vegline-hero .wp-block-button:last-child .wp-block-button__link,
.vegline-hero .wp-block-button:last-child .wp-block-button__link.has-white-color,
.vegline-hero .wp-block-button:last-child .wp-block-button__link.has-text-color {
	background: transparent !important;
	border: 1px solid #ffffff;
	color: #ffffff !important;
}

/* ============================================================
   Why VegLine / 底部 CTA 区
   （group 内联背景色未随块渲染输出，这里在 CSS 里兜底）
   ============================================================ */
.vegline-why {
	background: #f4f7f5;
	padding: 56px 20px;
	text-align: center;
}
.vegline-why .wp-block-columns {
	max-width: 1080px;
	margin: 0 auto;
	text-align: left;
}
.vegline-why h3 {
	color: #173a2c;
}
.vegline-cta {
	background: #0f3d2e;
	padding: 64px 20px;
	text-align: center;
}
.vegline-cta .wp-block-heading {
	color: #ffffff;
}
.vegline-cta p {
	color: #dcefe6;
	max-width: 640px;
	margin: 0 auto 24px;
}
.vegline-cta .wp-block-button__link {
	background: #ffffff !important;
	color: #0f3d2e !important;
	border-radius: 6px;
	padding: 12px 28px;
	font-weight: 600;
}
.vegline-cta .wp-block-button__link:hover {
	opacity: .92;
}

/* ============================================================
   首页：隐藏 Blocksy 自动页面标题（内容区已自带 H1）
   ============================================================ */
.home.page-id-28 .entry-header,
.home.page-id-28 .page-title,
.home.page-id-28 .ct-page-header,
.home.page-id-28 [data-prefix="single_page"] .entry-header {
	display: none;
}

/* ============================================================
   首页分类列表 -> 卡片网格（无需图片）
   ============================================================ */
.wc-block-product-categories-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 14px;
}
.wc-block-product-categories-list-item { margin: 0; }
.wc-block-product-categories-list-item a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 18px;
	background: #fff;
	border: 1px solid #e3e9e6;
	border-radius: 8px;
	font-weight: 600;
	color: #1f7a4d;
	text-decoration: none;
	transition: .15s ease;
}
.wc-block-product-categories-list-item a:hover {
	border-color: #1f7a4d;
	box-shadow: 0 2px 12px rgba(15, 61, 46, .08);
}
.wc-block-product-categories-list-item-count {
	margin-left: 10px;
	font-size: 13px;
	color: #6b7c75;
	background: #eef3f1;
	padding: 2px 10px;
	border-radius: 20px;
}

/* ============================================================
   分类页：结果数 + 排序下拉框
   ============================================================ */
.woocommerce-result-count,
.woocommerce .woocommerce-result-count {
	color: #556b60;
	font-size: 14px;
	margin-bottom: 24px;
}
.woocommerce-ordering,
.woocommerce .woocommerce-ordering {
	margin-bottom: 24px;
}
.woocommerce-ordering select,
.woocommerce .woocommerce-ordering select {
	appearance: auto;
	-webkit-appearance: auto;
	padding: 9px 32px 9px 12px;
	border: 1px solid #cfd9d4;
	border-radius: 6px;
	background: #fff;
	font-size: 14px;
	color: #173a2c;
}

/* ============================================================
   面包屑：统一分隔符颜色
   ============================================================ */
.woocommerce-breadcrumb,
.woocommerce .woocommerce-breadcrumb {
	color: #6b7c75;
	font-size: 13px;
	margin-bottom: 26px;
}
.woocommerce-breadcrumb a,
.woocommerce .woocommerce-breadcrumb a { color: #1f7a4d; text-decoration: none; }
.woocommerce-breadcrumb a:hover,
.woocommerce .woocommerce-breadcrumb a:hover { text-decoration: underline; }
.vegline-delimiter { color: #a8bab1; }

/* ============================================================
   Request a Quote 页：隐藏自动页面标题，避免与内容 H2 重复
   ============================================================ */
.page-id-27 .entry-header,
.page-id-27 .page-title,
.page-id-27 .ct-entry-title {
	display: none;
}
.page-id-27 .entry-content > h2:first-child,
.page-id-27 .entry-content > .wp-block-heading:first-child {
	margin-top: 0;
}

/* ============================================================
   产品卡片（首页精选 + Woo 默认循环）
   ============================================================ */
.wc-block-grid__product,
.woocommerce ul.products li.product {
	border: 1px solid #e3e9e6;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
	transition: .15s ease;
}
.wc-block-grid__product:hover,
.woocommerce ul.products li.product:hover {
	box-shadow: 0 6px 22px rgba(15, 61, 46, .10);
	transform: translateY(-2px);
}
.wc-block-grid__product-image img,
.woocommerce ul.products li.product img {
	width: 100%;
	height: 220px;
	object-fit: cover;
	display: block;
}
.wc-block-grid__product-title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	padding: 14px 16px 4px;
	font-size: 16px;
	font-weight: 600;
	color: #173a2c;
}
.wc-block-grid__product .wp-block-button,
.woocommerce ul.products li.product .button {
	padding: 0 16px 18px;
}
.wc-block-grid__product .wp-block-button__link,
.woocommerce ul.products li.product .button {
	display: block;
	text-align: center;
	background: #1f7a4d;
	color: #fff;
	border-radius: 6px;
	padding: 10px 14px;
	font-weight: 600;
	text-decoration: none;
}
.wc-block-grid__product .wp-block-button__link:hover,
.woocommerce ul.products li.product .button:hover { background: #173a2c; }

/* 让默认循环与块网格对齐成网格 */
.woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 20px;
}

/* ============================================================
   询盘触发按钮（WooCommerce Quote or Enquiry CF7 插件）
   插件仅注入背景色，这里补齐内边距 / 圆角 / 文字色
   ============================================================ */
.wqoecf_enquiry_button {
	display: inline-block;
	padding: 11px 22px;
	border-radius: 6px;
	color: #fff !important;
	font-weight: 600;
	text-decoration: none !important;
	cursor: pointer;
	border: none;
	margin-top: 14px;
}
.wqoecf_enquiry_button:hover { opacity: .92; }

/* ============================================================
   产品单页
   ============================================================ */
.woocommerce div.product .product_title { font-size: 28px; color: #173a2c; }
.woocommerce div.product .summary { color: #2b2b2b; }
.woocommerce div.product .wqoecf_enquiry_button {
	display: inline-block;
	padding: 12px 26px;
	border-radius: 6px;
	color: #fff !important;
	font-weight: 600;
	margin-top: 18px;
}

/* ============================================================
   规格表（产品描述内的 .vegline-spec）
   ============================================================ */
table.vegline-spec {
	width: 100%;
	border-collapse: collapse;
	margin: 14px 0 22px;
}
table.vegline-spec th,
table.vegline-spec td {
	border: 1px solid #e3e9e6;
	padding: 10px 14px;
	text-align: left;
	vertical-align: top;
}
table.vegline-spec th {
	background: #f4f7f5;
	width: 34%;
	color: #173a2c;
	font-weight: 600;
}
table.vegline-spec td { color: #2b2b2b; }

/* ============================================================
   Contact Form 7（询盘页 + 弹窗）
   ============================================================ */
.wpcf7-form label {
	display: block;
	margin-bottom: 14px;
	font-weight: 600;
	color: #173a2c;
}
.wpcf7-form .wpcf7-form-control {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #cfd9d4;
	border-radius: 6px;
	font-size: 15px;
}
.wpcf7-form textarea { min-height: 130px; }
.wpcf7-form .wpcf7-submit {
	background: #1f7a4d;
	color: #fff;
	border: none;
	padding: 12px 28px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
}
.wpcf7-form .wpcf7-submit:hover { background: #173a2c; }
.wqoecf-pop-up-box input[readonly] {
	background: #f4f7f5;
	color: #6b7c75;
}
