/* Amity Product Filters — front-end styles.
   Tweak the variables below to match the theme. */
.apf-wrap {
	--apf-blue: #2f6fb0;
	--apf-blue-dark: #275f97;
	--apf-text: #1a1a1a;
	--apf-border: #d8d8d8;
	--apf-track: #1a1a1a;
	--apf-handle: #ddd;
	--apf-handle-border: #ddd;

	margin: 0 0 28px;
}

.apf-bar {
	display: flex;
	flex-wrap: nowrap;
	gap: 28px;
	align-items: flex-start;
	/* Raise above the product loop so dropdown panels overlay the cards. */
	position: relative;
	z-index: 999;
}

/* Six equal columns. */
.apf-filter {
	flex: 1 1 0;
	min-width: 0;
	position: relative;
}

.apf-filter__label {
	display: block;
	font-weight: 700;
	font-size: 17px;
	line-height: 1.3;
	color: var(--apf-text);
	margin: 0;
}

/* ---------- dropdowns ----------
   Scoped + !important on key props so the theme's aggressive button styles
   (rounded corners, colours) can't override them. */
.apf-bar .apf-dropdown__toggle {
	width: 100% !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--apf-blue) !important;
	color: #fff !important;
	border: 1px solid var(--apf-blue) !important;
	border-radius: 0 !important;
	padding: 15px 16px 12px 14px !important;
	font-size: 23px !important;
	font-weight: 100 !important;
	cursor: pointer;
	line-height: 1 !important;
	text-align: center;
	text-transform: none !important;
	letter-spacing: normal !important;
	box-shadow: none !important;
	height: auto !important;
	margin: 0 !important;
}
.apf-dropdown__panel {
	position: absolute;
	z-index: 1000;
	top: 100%;
	left: 0;
	width: 300px;
	max-width: 90vw;
	background: #fff;
	border: 1px solid var(--apf-border);
	border-top: none;
	max-height: 360px;
	overflow-y: auto;
	box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
	padding: 6px 0;
	display: none;
}
/* Show on hover (not click). */
.apf-filter--dropdown:hover .apf-dropdown__panel,
.apf-filter--dropdown:focus-within .apf-dropdown__panel {
	display: block;
}
.apf-dropdown__option {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 8px 16px;
	font-size: 15px;
	line-height: 20px;
	color: var(--apf-text);
	cursor: pointer;
}
.apf-dropdown__option:hover {
	background: #f3f6fa;
}
.apf-dropdown__option input {
	margin: 2px 0 0;
	flex: 0 0 auto;
}

/* ---------- sliders ---------- */
.apf-slider {
	padding-top: 4px;
}
.apf-slider__values {
	display: flex;
	justify-content: space-between;
	font-size: 16px;
	color: var(--apf-text);
	margin-bottom: 14px;
}
.apf-slider__track {
	position: relative;
	height: 4px;
	background: var(--apf-track);
	margin: -10px 7px 8px;
}
.apf-slider__range {
	position: absolute;
	top: 0;
	height: 4px;
	background: var(--apf-blue);
}
/* Small sliding circles at each end — override theme button styling. */
.apf-bar .apf-slider__handle {
	-webkit-appearance: none;
	appearance: none;
	position: absolute !important;
	top: 50% !important;
	width: 14px !important;
	height: 14px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: none !important;
	margin: 0 0 0 -7px !important;
	padding: 0 !important;
	transform: translateY(-50%);
	background: var(--apf-handle) !important;
	border: 1px solid var(--apf-handle-border) !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	line-height: 1 !important;
	display: block !important;
	cursor: pointer;
	touch-action: none;
}
.apf-bar .apf-slider__handle:focus {
	outline: 2px solid var(--apf-blue);
	outline-offset: 2px;
}

/* ---------- selected tags row ---------- */
.apf-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	margin-top: 16px;
	min-height: 1px;
}
.apf-tags:empty {
	margin-top: 0;
}
.apf-clear {
	color: var(--apf-text);
	text-decoration: underline;
	font-size: 15px;
	cursor: pointer;
}
.apf-tags__group {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.apf-tags__label {
	color: var(--apf-text);
	font-size: 15px;
}
.apf-tags .apf-tag {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	background: #e3e3e3 !important;
	border: none !important;
	border-radius: 3px !important;
	padding: 5px 8px 5px 12px !important;
	font-size: 15px !important;
	font-weight: 400 !important;
	color: var(--apf-text) !important;
	cursor: pointer;
	line-height: 1.2 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	box-shadow: none !important;
	height: auto !important;
	width: auto !important;
}
.apf-tag__x {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #555;
	font-size: 18px;
	line-height: 1;
}
.apf-tag:hover .apf-tag__x {
	border-color: var(--apf-blue);
	color: var(--apf-blue);
}

/* ---------- loading ---------- */
.apf-loading {
	opacity: .55;
	pointer-events: none;
	transition: opacity .2s ease;
}

/* ---------- mobile filters toggle ---------- */
.apf-toggle {
	display: none;
}

@media (max-width: 900px) {
	.apf-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		width: 100%;
		background: var(--apf-blue) !important;
		color: #fff !important;
		border: 1px solid var(--apf-blue) !important;
		border-radius: 0 !important;
		padding: 12px 16px !important;
		font-size: 17px !important;
		font-weight: 500 !important;
		line-height: 1.2 !important;
		text-transform: none !important;
		box-shadow: none !important;
		height: auto !important;
		margin: 0 !important;
		cursor: pointer;
	}
	.apf-bar {
		display: none;
		flex-wrap: wrap;
		gap: 14px;
		margin-top: 12px;
	}
	.apf-wrap.apf-open .apf-bar {
		display: flex;
	}
	.apf-filter {
		flex: 1 1 100%;
	}
	.apf-filter__label {
		font-size: 15px;
		margin: 0 0 4px;
	}
	.apf-bar .apf-dropdown__toggle {
		padding: 10px 12px !important;
		font-size: 19px !important;
	}
	.apf-slider__track {
		margin-top: 4px;
	}
	.apf-dropdown__panel {
		width: 100%;
	}
}
