/**
 * Shop filteri — editorial sidebar + mobilni drawer
 */

#qodef-page-sidebar .runnerp-shop-filters-widget {
	margin-bottom: 0;
}

/* Desktop sidebar panel */
@media only screen and (min-width: 1025px) {
	body.runnerp-shop-filters-page #qodef-page-sidebar {
		padding-top: 8px;
	}

	body.runnerp-shop-filters-page #qodef-page-sidebar .runnerp-shop-filters-widget {
		padding: 28px 24px 30px;
		background: transparent;
		border: 1px solid var(--runnerp-beige-200, #E2D5C7);
		box-sizing: border-box;
	}
}

.runnerp-shop-filters {
	display: flex;
	flex-direction: column;
	gap: 0;
	font-family: var(--runnerp-font-ui, "Cormorant Garamond", Georgia, serif);
}

.runnerp-shop-filters__block {
	margin: 0;
	padding: 0 0 18px;
	border: 0;
	border-bottom: 1px solid rgba(74, 52, 40, 0.1);
	min-width: 0;
	min-inline-size: 0;
}

.runnerp-shop-filters__block:last-of-type {
	border-bottom: 0;
	padding-bottom: 8px;
}

.runnerp-shop-filters__title {
	display: block;
	float: none;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin: 0 0 14px;
	padding: 0;
	font-family: var(--runnerp-font-ui, "Cormorant Garamond", Georgia, serif);
	font-size: 0.78rem;
	font-weight: 600;
	font-style: normal;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	line-height: 1.2;
	color: var(--runnerp-taupe-500, #A67C52);
}

/*
 * Legend u fieldsetu ignoriše obični padding-top.
 * Separator ide kao border-top, a naslov se odmiče margin-top-om.
 */
.runnerp-shop-filters__block + .runnerp-shop-filters__block {
	border-top: 1px solid rgba(74, 52, 40, 0.1);
	border-bottom: 1px solid rgba(74, 52, 40, 0.1);
	margin-top: 0;
	padding-top: 0;
}

.runnerp-shop-filters__block + .runnerp-shop-filters__block:last-of-type {
	border-bottom: 0;
}

.runnerp-shop-filters__block + .runnerp-shop-filters__block .runnerp-shop-filters__title {
	margin-top: 28px !important;
	padding-top: 0 !important;
}

/* Ukloni dupli separator: donji border prethodnog bloka */
.runnerp-shop-filters__block:has(+ .runnerp-shop-filters__block) {
	border-bottom: 0;
	padding-bottom: 18px;
}

/* Price slider */
.runnerp-shop-filters__price.widget_price_filter {
	margin: 0;
}

.runnerp-shop-filters__price .price_slider_wrapper {
	padding: 8px 2px 0;
}

.runnerp-shop-filters__price .price_slider_wrapper .ui-widget-content {
	border-radius: 0;
	cursor: pointer;
	height: 2px;
	position: relative;
	background: var(--runnerp-beige-200, #E2D5C7);
}

.runnerp-shop-filters__price .price_slider_wrapper .ui-widget-content .ui-slider-handle {
	background-color: var(--runnerp-sienna-800, #4A3428) !important;
	height: 14px !important;
	width: 14px !important;
	cursor: pointer;
	outline: none;
	position: absolute;
	top: -6px !important;
	border-radius: 50% !important;
	border: 2px solid #FFFCFA !important;
	box-shadow: 0 1px 4px rgba(74, 52, 40, 0.18);
	margin-left: -7px !important;
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.runnerp-shop-filters__price .price_slider_wrapper .ui-widget-content .ui-slider-handle:hover,
.runnerp-shop-filters__price .price_slider_wrapper .ui-widget-content .ui-slider-handle:focus {
	background-color: var(--runnerp-taupe-500, #A67C52) !important;
	transform: scale(1.08);
}

.runnerp-shop-filters__price .price_slider_wrapper .ui-widget-content .ui-slider-handle:last-of-type {
	transform: none;
}

.runnerp-shop-filters__price .price_slider_wrapper .ui-widget-content .ui-slider-range {
	border-radius: 0;
	display: block;
	height: 100%;
	position: absolute;
	z-index: 1;
	background: var(--runnerp-taupe-500, #A67C52) !important;
}

.runnerp-shop-filters__price .price_slider_amount {
	display: block;
	margin: 20px 0 0;
	position: relative;
}

.runnerp-shop-filters__price .price_slider_amount input[type="text"] {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.runnerp-shop-filters__price .price_slider_amount .price_label {
	display: block;
	font-family: var(--runnerp-font-ui, "Cormorant Garamond", Georgia, serif);
	font-size: 1.2rem;
	font-weight: 500;
	font-style: italic;
	color: var(--runnerp-sienna-700, #6E4E3A);
	line-height: 1.35;
	letter-spacing: 0.01em;
}

.runnerp-shop-filters__price .price_slider_amount .clear {
	display: none;
}

.runnerp-shop-filters__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.runnerp-shop-filters__list:not(.is-expanded) .runnerp-shop-filters__item--more {
	display: none;
}

.runnerp-shop-filters__item {
	margin: 0;
	padding: 0;
}

.runnerp-shop-filters__more-toggle {
	display: inline-block;
	margin-top: 12px;
	padding: 0;
	border: 0;
	background: none;
	font-family: var(--runnerp-font-ui, "Cormorant Garamond", Georgia, serif);
	font-size: 0.95rem;
	font-weight: 600;
	font-style: italic;
	letter-spacing: 0.02em;
	text-transform: none;
	color: var(--runnerp-taupe-500, #A67C52);
	text-decoration: underline;
	text-decoration-color: rgba(166, 124, 82, 0.45);
	text-underline-offset: 4px;
	cursor: pointer;
	transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.runnerp-shop-filters__more-toggle:hover {
	color: var(--runnerp-sienna-800, #4A3428);
	text-decoration-color: var(--runnerp-sienna-800, #4A3428);
}

.runnerp-shop-filters__check {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 8px 6px;
	cursor: pointer;
	font-family: var(--runnerp-font-ui, "Cormorant Garamond", Georgia, serif);
	font-size: 1.08rem;
	font-weight: 500;
	line-height: 1.35;
	color: var(--runnerp-sienna-800, #4A3428);
	transition: color 0.2s ease, background-color 0.2s ease;
}

.runnerp-shop-filters__check:hover {
	color: var(--runnerp-taupe-500, #A67C52);
	background: rgba(243, 235, 227, 0.45);
}

.runnerp-shop-filters__check input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	min-width: 18px;
	min-height: 18px;
	margin: 0;
	flex-shrink: 0;
	border: 1.5px solid rgba(74, 52, 40, 0.28);
	border-radius: 0;
	background: #fff;
	cursor: pointer;
	position: relative;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.runnerp-shop-filters__check input[type="checkbox"]:hover {
	border-color: var(--runnerp-taupe-500, #A67C52);
}

.runnerp-shop-filters__check input[type="checkbox"]:checked {
	background: var(--runnerp-sienna-800, #4A3428);
	border-color: var(--runnerp-sienna-800, #4A3428);
}

.runnerp-shop-filters__check input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 5px;
	height: 9px;
	border: solid #FBF7F2;
	border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg);
}

.runnerp-shop-filters__actions {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-top: 22px;
	padding-top: 22px;
	border-top: 1px solid rgba(74, 52, 40, 0.1);
}

.runnerp-shop-filters__apply.button {
	width: 100%;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 48px;
	padding: 14px 20px !important;
	border: 1px solid var(--runnerp-sienna-800, #4A3428) !important;
	border-radius: 0 !important;
	background: var(--runnerp-sienna-800, #4A3428) !important;
	color: #FBF7F2 !important;
	font-family: var(--runnerp-font-ui, "Cormorant Garamond", Georgia, serif) !important;
	font-size: 1.08rem !important;
	font-weight: 600 !important;
	font-style: normal !important;
	letter-spacing: 0.04em !important;
	text-transform: none !important;
	cursor: pointer;
	box-shadow: none !important;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.runnerp-shop-filters__apply.button:hover {
	background: var(--runnerp-taupe-500, #A67C52) !important;
	border-color: var(--runnerp-taupe-500, #A67C52) !important;
	color: #FFFCFA !important;
}

.runnerp-shop-filters__reset {
	text-align: center;
	font-family: var(--runnerp-font-ui, "Cormorant Garamond", Georgia, serif);
	font-size: 1rem;
	font-weight: 500;
	font-style: italic;
	color: var(--runnerp-sienna-600, #8B6348);
	text-decoration: underline;
	text-decoration-color: rgba(139, 99, 72, 0.4);
	text-underline-offset: 4px;
	transition: color 0.2s ease;
}

.runnerp-shop-filters__reset:hover {
	color: var(--runnerp-sienna-800, #4A3428);
	text-decoration-color: var(--runnerp-sienna-800, #4A3428);
}

/* Mobil — toolbar + drawer */
.runnerp-shop-filters-toolbar,
.runnerp-shop-filters-toggle,
.runnerp-shop-filters-backdrop,
.runnerp-shop-filters-drawer__head {
	display: none;
}

@media only screen and (max-width: 1024px) {
	body.runnerp-shop-filters-page #qodef-page-sidebar.qodef-grid-item {
		flex: 0 0 0 !important;
		width: 0 !important;
		min-width: 0 !important;
		max-width: 0 !important;
		padding: 0 !important;
		overflow: visible;
	}

	body.runnerp-shop-filters-page #qodef-page-sidebar {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		z-index: 100002;
		width: min(340px, 90vw);
		max-width: 90vw;
		margin: 0;
		padding: 22px 20px 32px;
		background:
			linear-gradient(180deg, #FFFCFA 0%, var(--runnerp-beige-50, #FBF7F2) 100%);
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		box-shadow: 8px 0 40px rgba(74, 52, 40, 0.14);
		transform: translateX(-105%);
		transition: transform 0.32s ease;
		visibility: hidden;
		border-right: 1px solid var(--runnerp-beige-200, #E2D5C7);
	}

	body.runnerp-shop-filters-page.runnerp-shop-filters-open #qodef-page-sidebar {
		transform: translateX(0);
		visibility: visible;
	}

	body.runnerp-shop-filters-page #qodef-page-sidebar .runnerp-shop-filters-widget {
		margin-bottom: 0;
		padding: 0;
		background: transparent;
		border: 0;
	}

	body.runnerp-shop-filters-page #qodef-woo-page.qodef-col--9,
	body.runnerp-shop-filters-page #qodef-woo-page {
		width: 100% !important;
		max-width: 100% !important;
		flex: 0 0 100% !important;
	}

	.runnerp-shop-filters-drawer__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		margin-bottom: 24px;
		padding-bottom: 16px;
		border-bottom: 1px solid rgba(74, 52, 40, 0.1);
	}

	.runnerp-shop-filters-drawer__title {
		font-family: var(--runnerp-font-ui, "Cormorant Garamond", Georgia, serif);
		font-size: 1.35rem;
		font-weight: 600;
		font-style: italic;
		letter-spacing: 0.02em;
		text-transform: none;
		color: var(--runnerp-sienna-800, #4A3428);
	}

	.runnerp-shop-filters-drawer__close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		margin: 0;
		padding: 0;
		border: 1px solid rgba(74, 52, 40, 0.14);
		border-radius: 0;
		background: #fff;
		font-family: Georgia, serif;
		font-size: 1.5rem;
		line-height: 1;
		color: var(--runnerp-sienna-800, #4A3428);
		cursor: pointer;
		transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
	}

	.runnerp-shop-filters-drawer__close:hover {
		background: var(--runnerp-sienna-800, #4A3428);
		border-color: var(--runnerp-sienna-800, #4A3428);
		color: #FBF7F2;
	}

	body.runnerp-shop-filters-page .qodef-page-title {
		margin-bottom: 0 !important;
	}

	body.runnerp-shop-filters-page #qodef-page-inner {
		padding: 25px 0 40px 0 !important;
	}

	body.runnerp-shop-filters-page #qodef-woo-page {
		margin-top: 0 !important;
	}

	.runnerp-shop-filters-toolbar {
		display: flex;
		align-items: center;
		justify-content: flex-start;
		margin: 0 0 18px;
		padding: 0;
		background: transparent !important;
	}

	.runnerp-shop-filters-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 10px;
		position: relative;
		width: auto;
		min-height: 46px;
		margin: 0;
		padding: 11px 18px 11px 14px;
		border: 1px solid rgba(74, 52, 40, 0.18);
		border-radius: 0;
		background: #FFFCFA;
		color: var(--runnerp-sienna-800, #4A3428);
		cursor: pointer;
		flex-shrink: 0;
		box-shadow: none;
		transition:
			transform 0.2s ease,
			border-color 0.2s ease,
			background-color 0.2s ease,
			color 0.2s ease;
		-webkit-tap-highlight-color: transparent;
	}

	.runnerp-shop-filters-toggle__label {
		font-family: var(--runnerp-font-ui, "Cormorant Garamond", Georgia, serif);
		font-size: 1.05rem;
		font-weight: 600;
		letter-spacing: 0.04em;
		text-transform: none;
		line-height: 1;
		white-space: nowrap;
	}

	.runnerp-shop-filters-toggle:active {
		transform: scale(0.97);
	}

	.runnerp-shop-filters-toggle:hover,
	.runnerp-shop-filters-toggle:focus-visible {
		border-color: var(--runnerp-taupe-500, #A67C52);
		color: var(--runnerp-taupe-500, #A67C52);
		outline: none;
	}

	body.runnerp-shop-filters-open .runnerp-shop-filters-toggle {
		border-color: var(--runnerp-sienna-800, #4A3428);
		background: var(--runnerp-sienna-800, #4A3428);
		color: #FBF7F2;
	}

	body.runnerp-shop-filters-open .runnerp-shop-filters-toggle:hover,
	body.runnerp-shop-filters-open .runnerp-shop-filters-toggle:focus-visible {
		border-color: var(--runnerp-taupe-500, #A67C52);
		background: var(--runnerp-taupe-500, #A67C52);
		color: #FFFCFA;
	}

	.runnerp-shop-filters-toggle__icon-box {
		display: grid;
		place-items: center;
		width: 20px;
		height: 20px;
		flex-shrink: 0;
	}

	.runnerp-shop-filters-toggle__icon {
		display: block;
		grid-area: 1 / 1;
		transition: opacity 0.18s ease, transform 0.2s ease;
	}

	.runnerp-shop-filters-toggle__icon--close {
		opacity: 0;
		transform: scale(0.75);
	}

	.runnerp-shop-filters-toggle__icon--filter {
		opacity: 1;
		transform: scale(1);
	}

	body.runnerp-shop-filters-open .runnerp-shop-filters-toggle__icon--filter {
		opacity: 0;
		transform: scale(0.75);
	}

	body.runnerp-shop-filters-open .runnerp-shop-filters-toggle__icon--close {
		opacity: 1;
		transform: scale(1);
	}

	.runnerp-shop-filters-toggle__badge {
		position: absolute;
		top: 7px;
		right: 8px;
		width: 9px;
		height: 9px;
		border-radius: 50%;
		background: var(--runnerp-taupe-500, #A67C52);
		border: 2px solid #FFFCFA;
		pointer-events: none;
	}

	body.runnerp-shop-filters-open .runnerp-shop-filters-toggle__badge {
		border-color: var(--runnerp-sienna-800, #4A3428);
		background: #FBF7F2;
	}

	.runnerp-shop-filters-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 100001;
		background: rgba(74, 52, 40, 0.38);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.32s ease, visibility 0.32s ease;
	}

	.runnerp-shop-filters-backdrop:not([hidden]) {
		opacity: 1;
		visibility: visible;
	}

	body.runnerp-shop-filters-open {
		overflow: hidden;
	}
}
