/**
 * Xhenia Product Filter - Frontend Styles
 */

.xpf-filter-container {
	width: 100%;
	margin: 0 0 20px 0;
	position: relative;
	box-sizing: border-box;
}

.xpf-filter-header {
	margin-bottom: 16px;
	text-align: center;
}

.xpf-filter-title {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: #222;
	margin: 0;
}

.xpf-filter-row {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: flex-start;
}

.xpf-filter-col {
	flex: 1 1 200px;
	min-width: 180px;
	display: flex;
	flex-direction: column;
}

.xpf-filter-label {
	font-size: 13.5px;
	font-weight: 700;
	color: #2d3748;
	margin-bottom: 7px;
	display: block;
	letter-spacing: -0.1px;
}

.xpf-select-wrapper {
	position: relative;
	width: 100%;
	display: block;
	margin: 0 !important;
	padding: 0 !important;
	height: 42px;
}

.xpf-select {
	width: 100%;
	height: 42px !important;
	min-height: 42px !important;
	max-height: 42px !important;
	margin: 0 !important;
	background: #ffffff !important;
	background-image: none !important;
	border: 1px solid #d1d5db !important;
	border-radius: 6px !important;
	padding: 0 36px 0 14px !important;
	font-size: 14px;
	font-weight: 400;
	color: #374151;
	line-height: 40px !important;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
	outline: none;
	box-sizing: border-box !important;
	display: block;
}

.xpf-select:hover {
	border-color: #9ca3af !important;
}

.xpf-select:focus {
	border-color: #2563eb !important;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.xpf-select option {
	padding: 8px 12px;
	font-size: 14px;
	color: #1f2937;
}

.xpf-select-arrow {
	position: absolute;
	right: 13px;
	top: 50%;
	transform: translateY(-50%);
	margin: 0 !important;
	pointer-events: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	color: #4b5563;
	z-index: 2;
}

.xpf-select-arrow svg {
	display: block;
	width: 12px;
	height: 8px;
}

.xpf-select:focus ~ .xpf-select-arrow,
.xpf-select:focus + .xpf-select-arrow {
	color: #2563eb;
}

/* Active Bar & Reset Button */
.xpf-active-bar {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	margin-top: 14px;
	gap: 12px;
}

.xpf-reset-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	background: #f3f4f6;
	color: #4b5563;
	border: 1px solid #e5e7eb;
	border-radius: 20px;
	font-size: 12.5px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
}

.xpf-reset-btn:hover {
	background: #fee2e2;
	color: #dc2626;
	border-color: #fca5a5;
}

.xpf-reset-btn svg {
	width: 12px;
	height: 12px;
}

/* Products loading state */
.products_wrapper.xpf-loading,
ul.products.xpf-loading {
	opacity: 0.45 !important;
	pointer-events: none;
	position: relative;
	transition: opacity 0.25s ease;
}

.products_wrapper {
	transition: opacity 0.25s ease;
}

.xpf-loader-overlay {
	position: absolute;
	top: 60px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 50;
	background: rgba(255, 255, 255, 0.95);
	padding: 10px 20px;
	border-radius: 24px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13.5px;
	font-weight: 600;
	color: #1e293b;
}

.xpf-spinner {
	width: 18px;
	height: 18px;
	border: 2.5px solid #e2e8f0;
	border-top-color: #2563eb;
	border-radius: 50%;
	animation: xpf-spin 0.7s linear infinite;
}

@keyframes xpf-spin {
	to { transform: rotate(360deg); }
}

.xpf-no-products {
	grid-column: 1 / -1;
	width: 100%;
	margin: 20px 0;
}

/* Responsive */
@media (max-width: 767px) {
	.xpf-filter-row {
		flex-direction: column;
		gap: 14px;
	}

	.xpf-filter-col {
		width: 100%;
		min-width: 100%;
	}
}
