/**
 * Derang — shop sidebar price filter
 * Soft sage card + refined noUiSlider + dual inputs
 *
 * IMPORTANT: do not override noUiSlider handle left/right/transform —
 * parent RTL styles position origins via those properties.
 */

.category-sidebar .derang-filter-price,
.category-sidebar-box.filter-price.derang-filter-price {
	--dfp-sage: #95b193;
	--dfp-sage-deep: #7d937a;
	--dfp-forest: #334b31;
	--dfp-ink: #111111;
	--dfp-muted: #6b7268;
	--dfp-line: rgba(51, 75, 49, 0.12);
	--dfp-paper: #f7faf5;
	--dfp-white: #ffffff;
	--dfp-radius: 20px;

	margin-bottom: 22px;
	padding: 0;
	/* visible so handles stay draggable / not clipped */
	overflow: visible;
	border: 1px solid var(--dfp-line);
	border-radius: var(--dfp-radius);
	background:
		linear-gradient(165deg, rgba(149, 177, 147, 0.14), transparent 48%),
		linear-gradient(180deg, var(--dfp-white) 0%, var(--dfp-paper) 100%);
	box-shadow: 0 10px 28px rgba(16, 17, 14, 0.04);
}

.category-sidebar .derang-filter-price .category-sidebar-box-heading,
.category-sidebar .derang-filter-price__heading {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 16px 18px 12px;
	border-radius: var(--dfp-radius) var(--dfp-radius) 0 0;
	background: transparent !important;
	color: var(--dfp-ink) !important;
	border-bottom: 1px solid rgba(51, 75, 49, 0.08);
	font-size: 15px;
	font-weight: 800;
	line-height: 1.4;
}

.category-sidebar .derang-filter-price__heading i,
.category-sidebar .derang-filter-price .category-sidebar-box-heading > i {
	display: none;
}

.category-sidebar .derang-filter-price__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	border-radius: 12px;
	background: rgba(149, 177, 147, 0.18);
	color: var(--dfp-forest);
}

.category-sidebar .derang-filter-price__title {
	color: var(--dfp-ink);
	letter-spacing: -0.01em;
}

.category-sidebar .derang-filter-price .category-sidebar-box-body,
.category-sidebar .derang-filter-price__body {
	padding: 28px 18px 20px;
	overflow: visible !important;
}

.category-sidebar .derang-filter-price__slider-wrap {
	position: relative;
	z-index: 2;
	margin: 4px 10px 10px;
	padding: 14px 8px;
	overflow: visible;
	touch-action: none;
}

.category-sidebar .derang-filter-price #category-price,
.category-sidebar .derang-filter-price__slider {
	position: relative;
	z-index: 2;
	margin-bottom: 0 !important;
	height: 6px;
	border: 0;
	border-radius: 999px;
	box-shadow: none;
	background: rgba(51, 75, 49, 0.1);
	touch-action: none;
}

/* Track */
.category-sidebar .derang-filter-price .noUi-target {
	border: 0;
	box-shadow: none;
	background: rgba(51, 75, 49, 0.1);
	height: 6px;
}

.category-sidebar .derang-filter-price .noUi-base,
.category-sidebar .derang-filter-price .noUi-connects {
	border-radius: 999px;
}

.category-sidebar .derang-filter-price .noUi-connect {
	background: linear-gradient(90deg, var(--dfp-sage), var(--dfp-sage-deep));
	box-shadow: none;
}

/*
 * Handles: keep parent RTL left offsets; only restyle appearance.
 * Never set transform / right — that breaks noUiSlider drag math.
 */
.category-sidebar .derang-filter-price .noUi-handle {
	width: 22px !important;
	height: 22px !important;
	top: -8px !important;
	border: 2px solid var(--dfp-white) !important;
	border-radius: 50% !important;
	background: var(--dfp-sage) !important;
	box-shadow:
		0 0 0 1px rgba(51, 75, 49, 0.12),
		0 6px 14px rgba(125, 147, 122, 0.35) !important;
	cursor: grab !important;
	outline: none !important;
	touch-action: none;
}

.category-sidebar .derang-filter-price .noUi-txt-dir-rtl.noUi-horizontal .noUi-handle,
.category-sidebar .derang-filter-price .noUi-txt-dir-rtl.noUi-horizontal .noUi-handle-lower,
.category-sidebar .derang-filter-price .noUi-txt-dir-rtl.noUi-horizontal .noUi-handle-upper {
	/* Center circular handle on origin (22px → -11px) */
	left: -11px !important;
	right: auto !important;
	top: -8px !important;
	background-color: var(--dfp-sage) !important;
	background: var(--dfp-sage) !important;
}

.category-sidebar .derang-filter-price .noUi-handle:focus,
.category-sidebar .derang-filter-price .noUi-handle:active {
	cursor: grabbing !important;
	background: var(--dfp-sage-deep) !important;
	/* no transform — conflicts with slider positioning */
}

.category-sidebar .derang-filter-price .noUi-handle::before,
.category-sidebar .derang-filter-price .noUi-handle::after {
	display: none !important;
	content: none !important;
	border: 0 !important;
	background: none !important;
	transform: none !important;
	-webkit-transform: none !important;
}

.category-sidebar .derang-filter-price .noUi-tooltip {
	display: none;
}

.category-sidebar .derang-filter-price__fields {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
	align-items: end;
	column-gap: 10px;
	width: 100%;
	direction: rtl;
}

.category-sidebar .derang-filter-price__field {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-end;
	gap: 8px;
	margin: 0;
	width: 100%;
	min-width: 0;
}

.category-sidebar .derang-filter-price__label,
.category-sidebar .derang-filter-price .filter-price-value span.derang-filter-price__label,
.category-sidebar .derang-filter-price .filter-price-value > span:first-child {
	display: block;
	width: 100%;
	margin: 0 !important;
	padding: 0 2px;
	color: var(--dfp-muted);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	text-align: right;
}

.category-sidebar .derang-filter-price__input,
.category-sidebar .derang-filter-price .filter-price-value .form-control,
.category-sidebar .derang-filter-price #category-price-min,
.category-sidebar .derang-filter-price #category-price-max {
	display: block;
	width: 100%;
	height: 48px !important;
	margin: 0;
	padding: 0 14px !important;
	border: 1px solid rgba(51, 75, 49, 0.14) !important;
	border-radius: 14px !important;
	background: var(--dfp-white) !important;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
	color: var(--dfp-ink) !important;
	font-size: 13.5px !important;
	font-weight: 700;
	line-height: 48px;
	letter-spacing: 0.01em;
	direction: ltr;
	text-align: left;
	box-sizing: border-box;
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		background-color 0.2s ease;
}

.category-sidebar .derang-filter-price__input:hover,
.category-sidebar .derang-filter-price #category-price-min:hover,
.category-sidebar .derang-filter-price #category-price-max:hover {
	border-color: rgba(149, 177, 147, 0.55) !important;
}

.category-sidebar .derang-filter-price__input:focus,
.category-sidebar .derang-filter-price #category-price-min:focus,
.category-sidebar .derang-filter-price #category-price-max:focus {
	outline: none !important;
	border-color: var(--dfp-sage) !important;
	box-shadow:
		0 0 0 3px rgba(149, 177, 147, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
	background: #fcfdfb !important;
}

.category-sidebar .derang-filter-price__sep {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 48px;
	margin: 0;
	padding: 0;
	color: rgba(51, 75, 49, 0.4);
	font-size: 16px;
	font-weight: 700;
	line-height: 48px;
	align-self: end;
	pointer-events: none;
	user-select: none;
}

.category-sidebar .derang-filter-price .filter-price-value {
	margin-bottom: 0 !important;
}

.category-sidebar .derang-filter-price .filter-price-value:not(:last-child) {
	margin-bottom: 0 !important;
}

@media (max-width: 991.98px) {
	.category-sidebar .derang-filter-price,
	.category-sidebar-box.filter-price.derang-filter-price {
		border-radius: 18px;
	}

	.category-sidebar .derang-filter-price__body {
		padding: 22px 16px 16px;
	}

	.category-sidebar .derang-filter-price__slider-wrap {
		margin-bottom: 28px;
		padding-block: 16px;
	}

	.category-sidebar .derang-filter-price__input,
	.category-sidebar .derang-filter-price #category-price-min,
	.category-sidebar .derang-filter-price #category-price-max {
		height: 46px !important;
		line-height: 46px;
	}
}
