/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

/* =====================================================
   百家小部件 - 产品列表样式（工业风格）
   ===================================================== */

.bjw-product-list-wrapper {
	width: 100%;
}

/* 网格布局 */
.bjw-product-grid {
	display: grid;
	gap: 20px;
}
.bjw-product-grid.bjw-columns-2 { grid-template-columns: repeat(2, 1fr); }
.bjw-product-grid.bjw-columns-3 { grid-template-columns: repeat(3, 1fr); }
.bjw-product-grid.bjw-columns-4 { grid-template-columns: repeat(4, 1fr); }
.bjw-product-grid.bjw-columns-5 { grid-template-columns: repeat(5, 1fr); }
.bjw-product-grid.bjw-columns-6 { grid-template-columns: repeat(6, 1fr); }

/* 产品卡片 */
.bjw-product-item {
	position: relative;
	border: 1px solid #e0e0e0;
	padding: 5px;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.bjw-product-item:hover {
	border-color: #93C758;
	box-shadow: 0 2px 12px rgba(147, 199, 88, 0.15);
}

.bjw-product-link {
	display: block;
	text-decoration: none;
}

/* 图片外层容器（用于定位询盘按钮） */
.bjw-product-thumb {
	position: relative;
	overflow: hidden;
}

/* 图片容器 */
.bjw-product-image {
	position: relative;
	width: 100%;
	height: 280px;
	overflow: hidden;
	background-color: #f5f5f5;
}

.bjw-product-image img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.4s ease;
}

/* 悬停切换相册图 */
.bjw-product-image .bjw-img-hover {
	opacity: 0;
}

.bjw-has-hover:hover .bjw-img-main {
	opacity: 0;
}

.bjw-has-hover:hover .bjw-img-hover {
	opacity: 1;
}

/* 询盘按钮 - 从图片底部上滑 */
.bjw-inquiry-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 42px;
	background-color: #93C758;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 1px;
	text-decoration: none;
	text-transform: uppercase;
	transform: translateY(100%);
	transition: transform 0.3s ease, background-color 0.25s ease;
	z-index: 2;
}

.bjw-product-thumb:hover .bjw-inquiry-btn {
	transform: translateY(0);
}

.bjw-inquiry-btn:hover {
	background-color: #a3d46a;
	color: #fff;
}

/* 产品信息 */
.bjw-product-info {
	padding: 10px 5px 5px;
}

.bjw-product-category {
	font-size: 12px;
	color: #999;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 6px;
	line-height: 1.4;
}

.bjw-product-category a {
	color: inherit;
	text-decoration: none;
}

.bjw-product-category a:hover {
	color: #666;
}

.bjw-product-title {
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: #222;
	line-height: 1.5;
	text-decoration: none;
	transition: color 0.25s ease;
}

.bjw-product-title:hover {
	color: #b89a5a;
}

/* 无产品提示 */
.bjw-no-products {
	text-align: center;
	padding: 40px 0;
	color: #999;
	font-size: 14px;
}

/* =====================================================
   分页样式（工业风格）
   ===================================================== */

.bjw-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin-top: 40px;
	padding-top: 30px;
	border-top: 1px solid #e5e5e5;
}

.bjw-pagination a,
.bjw-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	border: 1px solid #ddd;
	color: #333;
	background: #fff;
	transition: all 0.25s ease;
}

.bjw-pagination a:hover {
	background: #333;
	color: #fff;
	border-color: #333;
}

.bjw-pagination .current {
	background: #333;
	color: #fff;
	border-color: #333;
}

.bjw-pagination .dots {
	border: none;
	background: none;
	color: #999;
}

/* =====================================================
   响应式适配
   ===================================================== */

@media (max-width: 1024px) {
	.bjw-product-grid.bjw-columns-4,
	.bjw-product-grid.bjw-columns-5,
	.bjw-product-grid.bjw-columns-6 {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	.bjw-product-grid.bjw-columns-3,
	.bjw-product-grid.bjw-columns-4,
	.bjw-product-grid.bjw-columns-5,
	.bjw-product-grid.bjw-columns-6 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.bjw-product-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

/* =====================================================
   询盘弹窗样式
   ===================================================== */

.bjw-inquiry-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0, 0, 0, 0.55);
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.bjw-inquiry-overlay.bjw-active {
	display: flex;
}

.bjw-modal {
	position: relative;
	background: #fff;
	width: 100%;
	max-width: 820px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

.bjw-modal-close {
	position: absolute;
	top: 12px;
	right: 16px;
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	color: #999;
	cursor: pointer;
	z-index: 2;
	transition: color 0.2s;
}

.bjw-modal-close:hover {
	color: #333;
}

.bjw-modal-inner {
	display: flex;
}

/* 左侧：产品信息 */
.bjw-modal-product-side {
	flex: 0 0 40%;
	max-width: 40%;
	background: #f7f7f7;
	padding: 30px 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.bjw-modal-product-image {
	width: 100%;
	margin-bottom: 16px;
}

.bjw-modal-product-image img {
	width: 100%;
	height: auto;
	object-fit: cover;
	display: block;
}

.bjw-modal-product-title {
	font-size: 16px;
	font-weight: 600;
	color: #222;
	text-align: center;
	line-height: 1.5;
	margin-bottom: 8px;
	word-break: break-word;
}

.bjw-modal-product-category {
	font-size: 12px;
	color: #999;
	text-transform: uppercase;
	letter-spacing: 1px;
	text-align: center;
}

/* 右侧：询盘表单 */
.bjw-modal-form-side {
	flex: 1;
	padding: 30px 28px;
}

.bjw-modal-form-heading {
	font-size: 20px;
	font-weight: 700;
	color: #222;
	margin: 0 0 20px;
}

.bjw-form-row {
	margin-bottom: 14px;
}

.bjw-form-row input[type="text"],
.bjw-form-row input[type="email"],
.bjw-form-row textarea {
	display: block;
	width: 100%;
	padding: 10px 14px;
	font-size: 14px;
	border: 1px solid #ddd;
	background: #fff;
	color: #333;
	outline: none;
	transition: border-color 0.2s;
	box-sizing: border-box;
}

.bjw-form-row input:focus,
.bjw-form-row textarea:focus {
	border-color: #93C758;
}

.bjw-form-row textarea {
	resize: vertical;
	min-height: 80px;
}

.bjw-form-submit {
	display: inline-block;
	width: 100%;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background-color: #93C758;
	border: none;
	cursor: pointer;
	text-align: center;
	letter-spacing: 0.5px;
	transition: background-color 0.25s;
}

.bjw-form-submit:hover {
	background-color: #004A9B;
}

.bjw-form-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.bjw-form-message {
	margin-top: 12px;
	padding: 10px 14px;
	font-size: 14px;
	line-height: 1.5;
}

.bjw-form-message.bjw-success {
	background: #edf7e1;
	color: #3a7d0a;
	border: 1px solid #c5e6a0;
}

.bjw-form-message.bjw-error {
	background: #fef0f0;
	color: #c0392b;
	border: 1px solid #f5c6cb;
}

/* 询盘按钮组：并排排列（含手机端） */
.bjw-btn-group {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 12px;
}

.bjw-btn-group .bjw-detail-inquiry-btn,
.bjw-btn-group .bjw-outline-btn {
	flex: 1;
	min-width: 0;
	white-space: nowrap;
	text-align: center;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
	line-height: 1.5;
	vertical-align: middle;
	display: flex;
	align-items: center;
	justify-content: center;
}

@media (max-width: 767px) {
	.bjw-btn-group {
		gap: 8px;
	}
	.bjw-btn-group .bjw-detail-inquiry-btn,
	.bjw-btn-group .bjw-outline-btn {
		padding-left: 12px !important;
		padding-right: 12px !important;
		font-size: 13px !important;
		letter-spacing: 0;
	}
}

/* 轮廓按钮（无背景，带边框）*/
.bjw-outline-btn {
	display: inline-flex;
	padding: 14px 40px;
	font-size: 15px;
	font-weight: 600;
	color: #333333;
	background-color: transparent;
	border: 1px solid #333333;
	cursor: pointer;
	text-align: center;
	letter-spacing: 0.5px;
	text-decoration: none;
	transition: color 0.25s ease, border-color 0.25s ease;
	white-space: nowrap;
}

.bjw-outline-btn:hover {
	color: #004A9B;
	border-color: #004A9B;
}

/* 详情页询盘按钮默认样式 */
.bjw-detail-inquiry-btn {
	display: inline-flex;
	padding: 14px 40px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background-color: #93C758;
	border: 1px solid transparent;
	cursor: pointer;
	text-align: center;
	letter-spacing: 0.5px;
	text-decoration: none;
	transition: background-color 0.25s ease, border-color 0.25s ease;
}

.bjw-detail-inquiry-btn:hover {
	background-color: #004A9B;
	color: #fff;
}

/* 弹窗响应式 */
@media (max-width: 768px) {
	.bjw-modal-inner {
		flex-direction: column;
	}

	.bjw-modal-product-side {
		flex: none;
		max-width: 100%;
		padding: 20px;
	}

	.bjw-modal-product-image {
		max-width: 200px;
		margin: 0 auto 12px;
	}

	.bjw-modal-form-side {
		padding: 20px;
	}
}

/* =====================================================
   通用询盘按钮 & 弹窗
   ===================================================== */

/* 按钮 */
.bjw-giq-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 40px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background-color: #93C758;
	border: 1px solid transparent;
	cursor: pointer;
	letter-spacing: 0.5px;
	text-decoration: none;
	transition: background-color 0.25s ease;
	white-space: nowrap;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
	line-height: 1.5;
}

.bjw-giq-btn:hover {
	background-color: #004A9B;
}

/* 弹窗 - 复用 .bjw-inquiry-overlay + .bjw-modal，仅补充通用表单布局 */
.bjw-giq-form-wrap {
	padding: 36px 40px;
	width: 100%;
	box-sizing: border-box;
}

.bjw-giq-title {
	font-size: 22px;
	font-weight: 700;
	color: #222;
	margin: 0 0 24px;
}

/* 两列表单行 */
.bjw-giq-row-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 14px;
}

/* 字段组：label + input */
.bjw-giq-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.bjw-giq-label {
	font-size: 13px;
	font-weight: 600;
	color: #333;
	letter-spacing: 0.02em;
}

.bjw-giq-label .bjw-required {
	color: #e00;
	margin-left: 2px;
}

/* 复用 bjw-form-row 的 input 样式，同时覆盖给 giq */
.bjw-giq-form input[type="text"],
.bjw-giq-form input[type="email"],
.bjw-giq-form input[type="tel"],
.bjw-giq-form textarea {
	display: block;
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #ddd;
	border-radius: 3px;
	font-size: 14px;
	color: #333;
	background: #fff;
	outline: none;
	transition: border-color 0.2s;
	box-sizing: border-box;
}

.bjw-giq-form input:focus,
.bjw-giq-form textarea:focus {
	border-color: #93C758;
}

.bjw-giq-form .bjw-form-row {
	margin-bottom: 14px;
}

.bjw-giq-form textarea {
	resize: vertical;
	min-height: 100px;
}

/* 提交按钮 */
.bjw-giq-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 40px;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	background-color: #93C758;
	border: none;
	cursor: pointer;
	letter-spacing: 0.5px;
	transition: background-color 0.25s;
	width: 100%;
	margin-top: 4px;
}

.bjw-giq-submit:hover {
	background-color: #004A9B;
}

.bjw-giq-submit:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

/* 消息提示 */
.bjw-giq-message {
	margin-top: 12px;
	padding: 10px 14px;
	border-radius: 3px;
	font-size: 14px;
}

.bjw-giq-message.bjw-success {
	background: #f0fae8;
	color: #3a7d0a;
	border: 1px solid #c5e6a0;
}

.bjw-giq-message.bjw-error {
	background: #fef0f0;
	color: #c0392b;
	border: 1px solid #f5c6cb;
}

/* 弹窗宽度覆盖（通用弹窗无产品侧边，偏窄一些） */
#bjw-giq-overlay .bjw-modal {
	max-width: 640px;
}

/* 响应式 */
@media (max-width: 600px) {
	.bjw-giq-form-wrap {
		padding: 24px 20px;
	}
	.bjw-giq-row-2 {
		grid-template-columns: 1fr;
	}
}

/* =====================================================
   订阅表单
   ===================================================== */

.bjw-sub-wrap {
	width: 100%;
}

/* 横向排列：姓名 | 邮箱 | 按钮 */
.bjw-sub-form {
	display: flex;
	align-items: stretch;
	gap: 8px;
	flex-wrap: nowrap;
}

.bjw-sub-input {
	flex: 1 1 0;
	min-width: 0;
	padding: 12px 16px;
	font-size: 14px;
	color: #333;
	background: #fff;
	border: 1px solid #ddd;
	outline: none;
	transition: border-color 0.2s;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
	height: auto;
	line-height: 1.5;
	margin: 0;
}

.bjw-sub-input:focus {
	border-color: #93C758;
	position: relative;
	z-index: 1;
}

.bjw-sub-btn {
	flex: 0 0 auto;
	align-self: stretch;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 32px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.05em;
	color: #fff;
	background-color: #93C758;
	border: none;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.25s;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	line-height: normal;
	font-family: inherit;
}

.bjw-sub-btn:hover {
	background-color: #004A9B;
}

.bjw-sub-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

/* 消息提示 */
.bjw-sub-message {
	margin-top: 10px;
	padding: 10px 14px;
	font-size: 14px;
	border-radius: 3px;
}

.bjw-sub-message.bjw-success {
	background: #f0fae8;
	color: #3a7d0a;
	border: 1px solid #c5e6a0;
}

.bjw-sub-message.bjw-error {
	background: #fef0f0;
	color: #c0392b;
	border: 1px solid #f5c6cb;
}

/* 响应式：小屏幕纵向排列 */
@media (max-width: 640px) {
	.bjw-sub-form {
		flex-direction: column;
		gap: 6px;
	}
	.bjw-sub-btn {
		width: 100%;
		padding: 12px 32px;
	}
}
