/* =========================================================
   产品筛选器 Easy Product Filter - 前台样式
   ========================================================= */

/* ---- 左侧筛选面板 ---- */
.epf-filter {
	background: #ffffff;
	border: 1px solid #e4e4e4;
	border-radius: 8px;
	padding: 16px 18px 18px;
}
.epf-filter-group h4 {
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 700;
	color: #1a1a1a;
}
.epf-filter-group + .epf-filter-group {
	border-top: 1px solid #eeeeee;
	padding-top: 14px;
	margin-top: 14px;
}
.epf-cb {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	cursor: pointer;
	font-size: 14px;
	color: #333333;
	line-height: 1.4;
}
.epf-cb input[type="checkbox"] {
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
	accent-color: #1a1a1a;
	margin: 0;
}
.epf-name { flex: 1 1 auto; }
.epf-count {
	margin-left: auto;
	color: #999999;
	font-size: 12px;
	flex: 0 0 auto;
}
.epf-reset-link {
	display: inline-block;
	margin-top: 10px;
	padding: 0;
	border: 0;
	background: none;
	font-size: 13px;
	color: #b34d1f;
	cursor: pointer;
	text-decoration: underline;
}
.epf-empty-hint {
	font-size: 13px;
	color: #999999;
	line-height: 1.6;
}

/* ---- 右侧产品网格 ---- */
.epf-grid-wrap {
	position: relative;
}
.epf-result-meta {
	font-size: 13px;
	color: #666666;
	margin-bottom: 14px;
}
.epf-grid {
	display: grid;
	grid-template-columns: repeat(var(--epf-cols, 3), 1fr);
	gap: 20px;
}
.epf-card {
	background: #ffffff;
	border: 1px solid #ececec;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease;
}
.epf-card:hover {
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.epf-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	background: #f4f4f4;
	overflow: hidden;
}
.epf-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.epf-thumb-placeholder {
	color: #bbbbbb;
	font-size: 13px;
}
.epf-card-body {
	padding: 12px 14px 14px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1 1 auto;
}
.epf-title {
	margin: 0;
	font-size: 15px;
	line-height: 1.4;
}
.epf-title a {
	color: #1a1a1a;
	text-decoration: none;
}
.epf-title a:hover {
	color: #b34d1f;
}
.epf-model {
	font-size: 12px;
	font-weight: 600;
	color: #b34d1f;
}
.epf-excerpt {
	margin: 0;
	font-size: 13px;
	color: #666666;
	line-height: 1.6;
}
.epf-empty {
	padding: 40px 20px;
	text-align: center;
	color: #999999;
	font-size: 14px;
	border: 1px dashed #dcdcdc;
	border-radius: 8px;
}

/* ---- 分页 ---- */
.epf-pagination {
	margin-top: 22px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
}
.epf-page {
	border: 1px solid #dddddd;
	background: #ffffff;
	color: #333333;
	padding: 6px 13px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	line-height: 1.4;
}
.epf-page:hover {
	border-color: #b34d1f;
	color: #b34d1f;
}
.epf-page.current {
	background: #1a1a1a;
	color: #ffffff;
	border-color: #1a1a1a;
	cursor: default;
}

/* ---- 加载状态 ---- */
.epf-loading .epf-grid {
	opacity: 0.45;
	pointer-events: none;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
	.epf-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}
}
@media (max-width: 480px) {
	.epf-grid {
		grid-template-columns: repeat(1, 1fr);
	}
}

/* =========================================================
   顶部可点击分类卡片 [epf_type_cards]
   ========================================================= */
.epf-type-cards {
	display: grid;
	grid-template-columns: repeat(var(--epf-card-cols, 4), 1fr);
	gap: 20px;
	margin: 0 auto 30px;
	max-width: 900px;
}
.epf-type-card {
	background: #f26522;
	border: 2px solid #f26522;
	border-radius: 4px;
	padding: 14px 10px;
	margin: 0;
	cursor: pointer;
	text-align: center;
	transition: background 0.2s ease, border-color 0.2s ease;
	overflow: hidden;
	font-family: inherit;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 48px;
}
.epf-type-card:hover {
	background: #d4551a;
	border-color: #d4551a;
}
.epf-type-card.active {
	background: #b34515;
	border-color: #b34515;
}
.epf-type-card.active::after {
	display: none;
}
.epf-type-card-img {
	display: none;
}
.epf-type-card-name {
	padding: 0;
	font-size: 14px;
	font-weight: 700;
	color: #ffffff;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}
.epf-type-card-count {
	display: none;
}
.epf-cards-empty {
	padding: 20px;
	text-align: center;
	color: #999999;
	background: #fafafa;
	border-radius: 8px;
}

/* 分类卡片响应式 */
@media (max-width: 768px) {
	.epf-type-cards {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}
}
@media (max-width: 480px) {
	.epf-type-cards {
		grid-template-columns: repeat(1, 1fr);
	}
}

/* ---- Filter panel title (4 dimensions) ---- */
.epf-filter-title {
	margin: 0 0 14px;
	font-size: 17px;
	font-weight: 700;
	color: #1a1a1a;
	padding-bottom: 8px;
	border-bottom: 2px solid #e4e4e4;
}

/* ---- Apply Filters 按钮 ---- */
.epf-filter-actions {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid #eee;
}
.epf-apply-btn {
	display: block;
	width: 100%;
	padding: 10px 16px;
	background: #f26522;
	color: #ffffff;
	border: 2px solid #f26522;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
	margin-bottom: 8px;
}
.epf-apply-btn:hover {
	background: #d4551a;
	border-color: #d4551a;
}

/* ---- 手机端 Filter 按钮（仅手机显示） ---- */
.epf-mobile-filter-btn {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	padding: 10px 16px;
	margin-bottom: 14px;
	background: #ffffff;
	color: #1a1a1a;
	border: 2px solid #ddd;
	border-radius: 4px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}
.epf-mobile-filter-btn .epf-filter-icon {
	font-size: 18px;
}

/* ---- 抽屉关闭按钮（仅手机显示） ---- */
.epf-drawer-close {
	display: none;
	position: absolute;
	top: 10px;
	right: 12px;
	width: 32px;
	height: 32px;
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	color: #999;
	cursor: pointer;
	z-index: 10;
}
.epf-drawer-close:hover {
	color: #1a1a1a;
}

/* ---- 遮罩层 ---- */
.epf-drawer-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9998;
}

/* ---- 手机端：筛选栏变抽屉 ---- */
@media (max-width: 768px) {
	.epf-mobile-filter-btn {
		display: flex;
	}
	.epf-drawer-close {
		display: block;
	}
	#epf-filter {
		position: fixed;
		top: 0;
		left: 0;
		width: 85%;
		max-width: 340px;
		height: 100vh;
		height: 100dvh;
		background: #ffffff;
		padding: 50px 20px 20px;
		overflow-y: auto;
		z-index: 9999;
		transform: translateX(-100%);
		transition: transform 0.3s ease;
		box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
	}
	#epf-filter.epf-drawer-open {
		transform: translateX(0);
	}
	.epf-filter-title {
		padding-right: 40px;
	}
}

/* ---- Results 计数移到左侧栏底部 ---- */
.epf-result-slot {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #eee;
	text-align: center;
}
.epf-result-slot .epf-result-meta {
	font-size: 13px;
	font-weight: 600;
	color: #666;
	margin: 0;
}
