/* BD Product Filters
   Theme via CSS variables — override on .bdpf-bar in Breakdance custom CSS. */
.bdpf-bar {
	--bdpf-accent: #111;
	--bdpf-border: #d9d9d9;
	--bdpf-radius: 999px;
	--bdpf-panel-radius: 10px;
	margin: 0 0 24px;
	position: relative;
	z-index: 30;
	font-size: 15px;
}

.bdpf-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.bdpf-facet {
	position: relative;
}

/* Pills */
.bdpf-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	background: #fff;
	border: 1px solid var(--bdpf-border);
	border-radius: var(--bdpf-radius);
	font: inherit;
	line-height: 1;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.bdpf-pill:hover,
.bdpf-pill[aria-expanded="true"] {
	border-color: var(--bdpf-accent);
}
.bdpf-pill.is-active {
	border-color: var(--bdpf-accent);
	background: var(--bdpf-accent);
	color: #fff;
}
.bdpf-badge {
	background: #fff;
	color: var(--bdpf-accent);
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	min-width: 18px;
	height: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 5px;
}
.bdpf-caret {
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	transition: transform .15s;
}
.bdpf-pill[aria-expanded="true"] .bdpf-caret {
	transform: rotate(-135deg) translateY(-2px);
}

/* Dropdown panel */
.bdpf-panel {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	min-width: 240px;
	max-height: 340px;
	overflow: auto;
	background: #fff;
	border: 1px solid var(--bdpf-border);
	border-radius: var(--bdpf-panel-radius);
	box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
	padding: 14px;
}
.bdpf-options {
	list-style: none;
	margin: 0;
	padding: 0;
}
.bdpf-options span {
white-space:nowrap;
}
.bdpf-options li + li {
	margin-top: 2px;
}
.bdpf-options label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 8px;
	border-radius: 6px;
	cursor: pointer;
}
.bdpf-options label:hover {
	background: #f5f5f5;
}
.bdpf-options input[type="checkbox"],
.bdpf-options input[type="radio"] {
	accent-color: var(--bdpf-accent);
	width: 16px;
	height: 16px;
	margin: 0;
}

/* Divider between Sort/Show and the filter pills */
.bdpf-sep {
	width: 1px;
	align-self: stretch;
	background: var(--bdpf-border);
	margin: 4px 4px;
}

/* "Showing X–Y of Z results" — relocated into the pill row by JS */
.bdpf-pills .woocommerce-result-count {
	margin: 0 0 0 auto;
	align-self: center;
	font-size: inherit;
	line-height: 1;
	white-space: nowrap;
}
@media (max-width: 1119px) {
	.bdpf-pills .woocommerce-result-count {
		width: 100%;
		margin: 4px 0 0;
	}
}

/* The native Woo sorting dropdown is redundant once the Sort pill exists.
   Delete this rule if you want to keep both. */
.woocommerce .woocommerce-ordering,
form.woocommerce-ordering {
	display: none !important;
}

/* Price: dual-range slider */
.bdpf-range {
	position: relative;
	height: 28px;
	margin: 6px 4px 12px;
}
.bdpf-range input[type="range"] {
	position: absolute;
	inset: 0;
	width: 100%;
	margin: 0;
	background: none;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
	z-index: 2;
}
.bdpf-range input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	pointer-events: auto;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--bdpf-accent);
	cursor: grab;
}
.bdpf-range input[type="range"]::-moz-range-thumb {
	pointer-events: auto;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--bdpf-accent);
	cursor: grab;
}
.bdpf-range-track {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 4px;
	transform: translateY(-50%);
	background: #e6e6e6;
	border-radius: 2px;
	z-index: 1;
}
.bdpf-range-fill {
	position: absolute;
	top: 0;
	bottom: 0;
	background: var(--bdpf-accent);
	border-radius: 2px;
}
.bdpf-price-inputs {
	display: flex;
	align-items: center;
	gap: 8px;
}
.bdpf-price-inputs input[type="number"] {
	width: 80px;
	padding: 6px 8px;
	border: 1px solid var(--bdpf-border);
	border-radius: 6px;
	font: inherit;
}
.bdpf-apply {
	margin-left: auto;
	padding: 7px 16px;
	background: var(--bdpf-accent);
	color: #fff;
	border: 0;
	border-radius: 6px;
	font: inherit;
	cursor: pointer;
}

/* Active-filter chips */
.bdpf-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}
.bdpf-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	background: #f2f2f2;
	border: 0;
	border-radius: 999px;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}
.bdpf-chip:hover {
	background: #e6e6e6;
}
.bdpf-chip span {
	font-size: 15px;
	line-height: 1;
}
.bdpf-chip-clear {
	background: none;
	text-decoration: underline;
}

/* Loading state on the grid during fetch */
.bdpf-loading {
	opacity: .45;
	pointer-events: none;
	transition: opacity .15s;
}

/* Mobile: panels go full-width */
@media (max-width: 1119px) {
	.bdpf-panel {
		position: fixed;
		left: 12px;
		right: 12px;
		top: auto;
		bottom: 12px;
		min-width: 0;
		max-height: 60vh;
		z-index: 9999;
	}
}
