/* ACS Product Filters – stil preuzet sa starog Filter Everything CSS-a, zbijeniji vertikalno */
.acsf {
	--acsf-accent: #264796;
	--acsf-heading: #432818;
	--acsf-text: #555;
	--acsf-box: #ddd;
	--acsf-pill-bg: #f0f4ff;
	--acsf-pill-border: #e0e7ff;
	--acsf-danger: #d9534f;
}

/* Kartica oko celog widgeta (naslov + filteri) */
.widget:has(> .acsf) {
	background: #fff;
	padding: 20px;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, .05);
	border: 1px solid #f0f0f0;
}

/* Grupe */
.acsf-group { margin: 0 0 16px; }
.acsf-group-title {
	display: block;
	margin: 0 0 10px;
	padding: 0 0 6px;
	border-bottom: 2px solid var(--acsf-accent);
	color: var(--acsf-heading);
	font-size: 1.1rem;
	font-weight: 800;
	line-height: 1.4;
	letter-spacing: .5px;
	text-transform: uppercase;
}
.widget .acsf-list,
.acsf-list { list-style: none; margin: 0; padding: 0; border: 0; }
.acsf-item { margin: 0 0 6px; padding: 0; transition: all .2s ease; }
.acsf-item:last-child { margin-bottom: 0; }
.acsf-item label {
	display: flex;
	align-items: center;
	width: 100%;
	margin: 0;
	padding: 0;
	color: var(--acsf-text);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.3;
	cursor: pointer;
}
.acsf-name { min-width: 0; transition: color .3s ease; }
.acsf-item:hover .acsf-name { color: var(--acsf-accent); }
.acsf-depth-1 { padding-left: 30px; }
.acsf-depth-2 { padding-left: 60px; }
.acsf-depth-3 { padding-left: 90px; }

/* Checkbox */
.acsf-item input[type="checkbox"] {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	position: relative;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 0 12px 0 0;
	padding: 0;
	border: 2px solid var(--acsf-box);
	border-radius: 3px;
	background: #fff;
	box-shadow: none;
	outline: none;
	vertical-align: middle;
	cursor: pointer;
	transition: all .2s ease;
}
.acsf-item input[type="checkbox"]:hover { border-color: var(--acsf-accent); }
.acsf-item input[type="checkbox"]:checked { background-color: var(--acsf-accent); border-color: var(--acsf-accent); }
.acsf-item input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 4px;
	top: 0;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.acsf-item input[type="checkbox"]:focus-visible { outline: 2px solid var(--acsf-accent); outline-offset: 2px; }

/* Brojač – desno poravnat */
.acsf-count {
	flex: 0 0 auto;
	margin-left: auto;
	padding: 2px 8px;
	border: 1px solid var(--acsf-pill-border);
	border-radius: 20px;
	background: var(--acsf-pill-bg);
	color: var(--acsf-accent);
	font-size: .75rem;
	font-weight: 700;
	line-height: 1.3;
}

/* Čipovi */
.acsf-chips { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; padding: 0; overflow: hidden; }
.acsf-chips li { margin: 0; }
.acsf-chip,
.acsf-reset {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 12px;
	border: 1px solid var(--acsf-pill-border);
	border-radius: 50px;
	background: var(--acsf-pill-bg);
	color: var(--acsf-accent);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: all .2s ease;
}
.acsf-x { font-size: 18px; font-weight: 400; line-height: 1; }
.acsf-chip:hover { background: var(--acsf-accent); border-color: var(--acsf-accent); color: #fff; }
.acsf-reset { background: #fff0f0; border-color: #ffdada; color: var(--acsf-danger); }
.acsf-reset:hover { background: var(--acsf-danger); border-color: var(--acsf-danger); color: #fff; }

/* Dugme „Prikaži proizvode“ – mobilno / bez JS-a */
.acsf-apply-wrap { margin-top: 20px; }
.acsf-apply {
	display: block;
	width: 100%;
	padding: 15px;
	border: 0;
	border-radius: 6px;
	background-color: var(--acsf-accent);
	color: #fff;
	font-weight: 700;
	text-align: center;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .3s ease;
}
.acsf-apply:hover { background-color: var(--acsf-heading); }
.acsf-js .acsf-apply-wrap { display: none; }

.acsf-form.is-loading,
.acsf-loading { opacity: .5; pointer-events: none; transition: opacity .15s; }

/* Drawer elementi – skriveni na desktopu */
.acsf-drawer-head, .acsf-backdrop, .acsf-open { display: none; }

/* ------------------------------------------------------------------ */
/* Mobilno: dugme iznad proizvoda + drawer sa leve strane              */
/* ------------------------------------------------------------------ */
@media (max-width: 767px) {
	.acsf-open {
		display: inline-flex; align-items: center; gap: 10px;
		margin: 0 0 1em; padding: 8px 14px;
		border: 1px solid #2c2d33; border-radius: 2px;
		background: transparent; color: #2c2d33;
		font-size: 15px; line-height: 1.5; cursor: pointer;
	}
	.acsf-open-icon {
		width: 16px; height: 12px;
		background:
			linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
			linear-gradient(currentColor, currentColor) 0 50% / 70% 2px no-repeat,
			linear-gradient(currentColor, currentColor) 0 100% / 40% 2px no-repeat;
	}
	.acsf-open-count {
		padding: 0 7px; border-radius: 20px;
		background: #264796; color: #fff;
		font-size: 12px; font-weight: 700;
	}

	/* Widget u sidebar-u (dno strane) se ne prikazuje – sadržaj je u draweru */
	.acsf-js .widget:has(> .acsf) { padding: 0; border: 0; box-shadow: none; background: none; }
	.acsf-widget > .h-widget, .acsf-widget > .widget-title { display: none; }
	.acsf-js .acsf-panel { display: none; }

	.acsf.is-open .acsf-backdrop {
		display: block; position: fixed; inset: 0; z-index: 99998;
		background: rgba(0, 0, 0, .45);
	}
	.acsf.is-open .acsf-panel {
		display: flex; flex-direction: column;
		position: fixed; top: 0; bottom: 0; left: 0; z-index: 99999;
		width: min(340px, 88vw);
		padding: 0 20px 20px;
		background: #fff;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		box-shadow: 2px 0 16px rgba(0, 0, 0, .15);
	}
	.acsf.is-open .acsf-drawer-head {
		display: flex; align-items: center; justify-content: space-between;
		position: sticky; top: 0; z-index: 1;
		margin: 0 -20px 16px; padding: 12px 20px;
		background: #fff; border-bottom: 1px solid #eee;
		color: var(--acsf-heading); font-size: 16px; font-weight: 700;
	}
	.acsf.is-open .acsf-panel > * { flex-shrink: 0; }
	.acsf-close {
		padding: 0 4px; border: 0; background: none;
		color: var(--acsf-heading); font-size: 28px; line-height: 1; cursor: pointer;
	}
	.acsf.is-open .acsf-apply-wrap {
		display: block;
		position: sticky; bottom: -20px;
		margin: auto -20px -20px; padding: 12px 20px;
		background: #fff; border-top: 1px solid #eee;
	}
	.acsf-item { margin-bottom: 10px; } /* veća površina za prst */
	html.acsf-lock, html.acsf-lock body { overflow: hidden; }
}
