/* ==========================================================================
   Фильтр цены в каталоге (inc/rs-price.php, js/rs-price.js). Одинаковый файл на трёх сайтах.
   Цвета — из css/rs-card.css (--rs-card-*).
   ========================================================================== */

.rs-price {
	--rs-price-accent: var(--rs-card-accent, #111827);
	--rs-price-line: var(--rs-card-border, #e5e7eb);
	--rs-price-muted: var(--rs-card-muted, #9aa1a9);
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
}

/* ---------- Поля «от» и «до» ---------- */
.rs-price__fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}
.rs-price__field {
	display: flex;
	align-items: center;
	gap: 4px;
	min-width: 0;
	height: 44px;
	margin: 0;
	padding: 0 10px;
	border: 1px solid #d6dae0;
	border-radius: 10px;
	background: #fff;
	cursor: text;
	transition: border-color .15s, box-shadow .15s;
}
.rs-price__field:focus-within {
	border-color: var(--rs-price-accent);
	box-shadow: 0 0 0 1px var(--rs-price-accent);
}
.rs-price__pre,
.rs-price__cur {
	flex: none;
	font-size: 13px;
	line-height: 1;
	color: var(--rs-price-muted);
}
.rs-price .rs-price__input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0 !important;
	border-radius: 0;
	background: transparent !important;
	box-shadow: none !important;
	outline: none;
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--rs-card-heading, #111827);
}
.rs-price .rs-price__input::placeholder { color: var(--rs-price-muted); font-weight: 400; opacity: 1; }

/* ---------- Ползунок: два input[type=range] друг на друге ---------- */
.rs-price__slider {
	position: relative;
	height: 20px;
	margin: 0 9px; /* половина ручки — чтобы ручки не вылезали за край */
}
.rs-price__track {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 4px;
	margin-top: -2px;
	border-radius: 2px;
	background: var(--rs-price-line);
}
.rs-price__fill {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	border-radius: 2px;
	background: var(--rs-price-accent);
}
.rs-price .rs-price__range {
	position: absolute;
	top: 0;
	left: -9px;
	width: calc(100% + 18px);
	height: 20px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	-webkit-appearance: none;
	appearance: none;
	pointer-events: none; /* тянуть можно только за ручки */
	outline: none;
}
.rs-price .rs-price__range.is-top { z-index: 2; }
.rs-price .rs-price__range::-webkit-slider-runnable-track { height: 20px; background: none; border: 0; }
.rs-price .rs-price__range::-moz-range-track { height: 20px; background: none; border: 0; }
.rs-price .rs-price__range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	border: 2px solid var(--rs-price-accent);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(17, 24, 39, .2);
	cursor: grab;
	pointer-events: auto;
}
.rs-price .rs-price__range::-moz-range-thumb {
	width: 14px;
	height: 14px;
	border: 2px solid var(--rs-price-accent);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(17, 24, 39, .2);
	cursor: grab;
	pointer-events: auto;
}
.rs-price .rs-price__range:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.1); }
.rs-price .rs-price__range:active::-moz-range-thumb { cursor: grabbing; }

/* ---------- Кнопки ---------- */
.rs-price__actions {
	display: flex;
	align-items: center;
	gap: 16px;
}
.rs-price .rs-price__go {
	flex: 1 1 auto;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0 16px;
	border: 0;
	border-radius: 10px;
	background: var(--rs-price-accent) !important;
	color: #fff !important;
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 44px;
	letter-spacing: 0;
	text-transform: none;
	box-shadow: none;
	transition: opacity .15s;
}
.rs-price .rs-price__go:hover { opacity: .88; }
.rs-price .rs-price__reset {
	flex: none;
	font-size: 14px;
	font-weight: 500;
	color: var(--rs-card-text, #4b5563);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.rs-price .rs-price__reset:hover { color: var(--rs-card-heading, #111827); }

@media (max-width: 1199px) {
	.rs-price .rs-price__input { font-size: 16px; } /* iOS не увеличивает страницу при вводе */
}
