/* Ćimo filteri proizvoda */

.cpf {
	--cpf-text: #111;
	--cpf-muted: #666;
	--cpf-line: #e6e6e6;
	--cpf-accent: #111;
	--cpf-menu-bg: #fff;
	--cpf-menu-width: 330px;
	--cpf-gap: 36px;
	--cpf-bar-justify: flex-end;
	position: relative;
	font-family: var(--e-global-typography-text-font-family, inherit), sans-serif;
	color: var(--cpf-text);
	font-size: 14px;
	line-height: 1.4;
}

.cpf *,
.cpf *::before,
.cpf *::after {
	box-sizing: border-box;
}

.cpf [hidden] {
	display: none !important;
}

.cpf .cpf-icon {
	flex: 0 0 auto;
	display: block;
}

/* ---------------------------------------------------------------- Traka */

.cpf-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: var(--cpf-bar-justify);
	gap: 12px 16px;
}

.cpf .cpf-count {
	font-size: 14px;
	color: var(--cpf-muted);
	margin-right: 4px;
	transition: opacity .2s;
}

.cpf .cpf-count:empty {
	display: none;
}

.cpf.is-loading .cpf-count {
	opacity: .5;
}

/* Pill dugmad (sortiranje, prikaži filtere) */
.cpf .cpf-btn,
.cpf .cpf-btn:hover,
.cpf .cpf-btn:focus {
	box-shadow: none;
	text-decoration: none;
}

.cpf .cpf-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: var(--cpf-btn-pad, 11px 30px);
	border: 1px solid var(--cpf-btn-border, var(--cpf-text));
	border-radius: var(--cpf-btn-radius, 999px);
	background: var(--cpf-btn-bg, transparent);
	color: var(--cpf-btn-color, var(--cpf-text));
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s;
}

.cpf .cpf-btn:hover,
.cpf .cpf-btn:focus,
.cpf .cpf-btn[aria-expanded="true"] {
	border-color: var(--cpf-btn-border-hover, var(--cpf-btn-border, var(--cpf-text)));
	background: var(--cpf-btn-bg-hover, var(--cpf-btn-bg, transparent));
	color: var(--cpf-btn-color-hover, var(--cpf-btn-color, var(--cpf-text)));
}

.cpf button:focus:not(:focus-visible) {
	outline: none;
}

.cpf button:focus-visible {
	outline: 2px solid var(--cpf-accent);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------- Panel sa filterima */

.cpf-panel {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: var(--cpf-gap);
	row-gap: 6px;
	margin-top: 22px;
	padding: 4px 0 18px;
	border-bottom: 1px solid var(--cpf-line);
}

.cpf--always-open .cpf-panel {
	margin-top: 16px;
}

.cpf .cpf-panel__label {
	font-size: 14px;
	color: var(--cpf-text);
}

.cpf-dd {
	position: relative;
}

.cpf .cpf-panel .cpf-dd__btn,
.cpf .cpf-panel .cpf-dd__btn:hover,
.cpf .cpf-panel .cpf-dd__btn:focus {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 6px 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--cpf-text);
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: normal;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
}

.cpf .cpf-panel .cpf-dd__label {
	border-bottom: 1px solid transparent;
	transition: border-color .2s;
}

.cpf .cpf-panel .cpf-dd__btn:hover .cpf-dd__label,
.cpf .cpf-panel .cpf-dd.is-open .cpf-dd__label {
	border-bottom-color: currentColor;
}

.cpf .cpf-icon--chevron {
	transition: transform .2s;
}

.cpf .cpf-dd.is-open .cpf-icon--chevron {
	transform: rotate(180deg);
}

.cpf .cpf-dd__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: var(--cpf-accent);
	color: #fff;
	font-size: 11px;
	line-height: 1;
}

/* ---------------------------------------------------------------- Padajući meni */

.cpf .cpf-dd__menu {
	position: absolute;
	top: calc(100% + 12px);
	left: 0;
	z-index: 60;
	width: var(--cpf-menu-width);
	max-width: calc(100vw - 32px);
	background: var(--cpf-menu-bg);
	border: 1px solid var(--cpf-line);
	box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
	color: var(--cpf-text);
	font-size: 14px;
	text-align: left;
}

.cpf .cpf-dd__menu--flip,
.cpf .cpf-dd--sort .cpf-dd__menu {
	left: auto;
	right: 0;
}

.cpf .cpf-dd--sort .cpf-dd__menu {
	width: 250px;
}

.cpf .cpf-dd__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--cpf-line);
	font-size: 13px;
}

.cpf .cpf-dd__reset,
.cpf .cpf-dd__reset:hover,
.cpf .cpf-dd__reset:focus {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--cpf-text);
	font-family: inherit;
	font-size: 13px;
	font-weight: 400;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.cpf .cpf-dd__list {
	list-style: none;
	margin: 0;
	padding: 10px 0;
}

.cpf .cpf-opt {
	margin: 0;
	padding: 0;
}

.cpf .cpf-opt label {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 8px 20px;
	font-size: inherit;
	font-weight: 400;
	cursor: pointer;
}

.cpf .cpf-opt label:hover {
	background: rgba(0, 0, 0, .025);
}

.cpf .cpf-opt input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.cpf .cpf-opt__box {
	position: relative;
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	border: 1px solid #757575;
	background: #fff;
	transition: background-color .15s, border-color .15s;
}

.cpf .cpf-opt label:hover .cpf-opt__box {
	border-color: var(--cpf-text);
}

.cpf .cpf-opt input:checked + .cpf-opt__box {
	border-color: var(--cpf-accent);
	background: var(--cpf-accent);
}

.cpf .cpf-opt input:checked + .cpf-opt__box::after {
	content: "";
	position: absolute;
	left: 4.5px;
	top: 1.5px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg);
}

.cpf .cpf-opt--radio .cpf-opt__box {
	border-radius: 50%;
}

.cpf .cpf-opt--radio input:checked + .cpf-opt__box {
	background: #fff;
}

.cpf .cpf-opt--radio input:checked + .cpf-opt__box::after {
	left: 3px;
	top: 3px;
	width: 8px;
	height: 8px;
	border: 0;
	border-radius: 50%;
	background: var(--cpf-accent);
	transform: none;
}

.cpf .cpf-opt input:focus-visible + .cpf-opt__box {
	outline: 2px solid var(--cpf-accent);
	outline-offset: 2px;
}

.cpf .cpf-opt__count {
	color: var(--cpf-muted);
	margin-left: -6px;
}

.cpf--no-option-counts .cpf-opt__count,
.cpf--no-facets .cpf-opt__count {
	display: none;
}

.cpf .cpf-opt.is-disabled label {
	opacity: .4;
	cursor: default;
}

.cpf .cpf-opt.is-disabled label:hover {
	background: none;
}

/* ---------------------------------------------------------------- Cena */

.cpf .cpf-price {
	padding: 22px 20px 20px;
}

.cpf .cpf-price__slider {
	position: relative;
	height: 16px;
	margin: 0 8px 20px;
}

.cpf .cpf-price__track {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 2px;
	margin-top: -1px;
	background: var(--cpf-line);
}

.cpf .cpf-price__fill {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--cpf-accent);
}

.cpf .cpf-price__range {
	position: absolute;
	top: 0;
	left: -8px;
	width: calc(100% + 16px);
	height: 16px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

.cpf .cpf-price__range:focus {
	outline: none;
}

.cpf .cpf-price__range::-webkit-slider-runnable-track {
	height: 16px;
	background: none;
	border: 0;
}

.cpf .cpf-price__range::-moz-range-track {
	height: 16px;
	background: none;
	border: 0;
}

.cpf .cpf-price__range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 16px;
	height: 16px;
	border: 2px solid var(--cpf-accent);
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
	pointer-events: auto;
}

.cpf .cpf-price__range::-moz-range-thumb {
	width: 12px;
	height: 12px;
	border: 2px solid var(--cpf-accent);
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
	pointer-events: auto;
}

.cpf .cpf-price__range:focus-visible::-webkit-slider-thumb {
	box-shadow: 0 0 0 3px rgba(0, 0, 0, .15);
}

.cpf .cpf-price__inputs {
	display: flex;
	align-items: flex-end;
	gap: 10px;
}

.cpf .cpf-price__field {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	font-size: 12px;
	color: var(--cpf-muted);
}

.cpf .cpf-price__input {
	width: 100%;
	margin: 0;
	padding: 8px 10px;
	border: 1px solid var(--cpf-line);
	border-radius: 0;
	background: #fff;
	color: var(--cpf-text);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.3;
	-moz-appearance: textfield;
	appearance: textfield;
}

.cpf .cpf-price__input:focus {
	border-color: var(--cpf-text);
	outline: none;
}

.cpf .cpf-price__input::-webkit-outer-spin-button,
.cpf .cpf-price__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.cpf .cpf-price__dash {
	padding-bottom: 8px;
	color: var(--cpf-muted);
}

/* ---------------------------------------------------------------- Izabrani filteri */

.cpf-active {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
}

.cpf .cpf-chip,
.cpf .cpf-chip:hover,
.cpf .cpf-chip:focus {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 6px 12px;
	border: 1px solid var(--cpf-line);
	border-radius: 999px;
	background: #f3f3f1;
	box-shadow: none;
	color: var(--cpf-text);
	font-family: inherit;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.3;
	text-transform: none;
	cursor: pointer;
}

.cpf .cpf-chip:hover {
	border-color: var(--cpf-text);
}

.cpf .cpf-clear,
.cpf .cpf-clear:hover,
.cpf .cpf-clear:focus {
	margin: 0 0 0 4px;
	padding: 6px 2px;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--cpf-text);
	font-family: inherit;
	font-size: 13px;
	font-weight: 400;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* ---------------------------------------------------------------- Loop Grid */

.cpf-grid-loading {
	opacity: .45;
	pointer-events: none;
	transition: opacity .2s;
}

.cpf-empty {
	padding: 48px 0;
	text-align: center;
	color: #666;
}

.cpf-empty p {
	margin: 0;
}

/* ---------------------------------------------------------------- Mobilni */

@media (max-width: 767px) {
	.cpf .cpf-bar {
		justify-content: stretch;
	}

	.cpf .cpf-count {
		flex: 1 0 100%;
		margin: 0;
	}

	.cpf .cpf-bar > .cpf-btn,
	.cpf .cpf-bar > .cpf-dd {
		flex: 1 1 0;
	}

	.cpf .cpf-bar .cpf-btn {
		width: 100%;
		justify-content: center;
		padding: var(--cpf-btn-pad, 11px 16px);
	}

	.cpf .cpf-panel {
		position: relative;
		column-gap: 22px;
	}

	.cpf .cpf-panel__label {
		flex: 1 0 100%;
	}

	.cpf .cpf-panel .cpf-dd {
		position: static;
	}

	.cpf .cpf-panel .cpf-dd__menu {
		top: auto;
		left: 0;
		right: 0;
		width: auto;
		max-width: none;
		margin-top: 8px;
	}

	.cpf .cpf-dd--sort .cpf-dd__menu {
		width: 100%;
		min-width: 220px;
	}
}
