/* ==========================================================================
   SHOP FILTERS: "Filter" button + slide-up panel. Added 2026-11-26.
   inc/shop-filters.php + assets/shop-filters.js. Loaded only on the shop,
   product category/tag pages and product search (ShopBuilder template 1388).
   Standing rules: fluid (Rule 1), spacious (Rule 2), glass (Rule 3).
   ========================================================================== */

:root {
	--rr-fp-green: #01ba60;
	--rr-fp-green-deep: #05924d;
	--rr-fp-ink: #13241b;
	--rr-fp-muted: #4d5f55;
	--rr-fp-hair: rgba(19, 36, 27, 0.09);
	--rr-fp-pad: clamp(1.125rem, 0.75rem + 1.6vw, 1.5rem);
	--rr-fp-t: 250ms;
}

/* 1. Products first: the inline filter column never renders (CSS, in <head>). */
.elementor-1388 .elementor-element.elementor-element-7f5c73f {
	display: none !important;
}

.elementor-1388 .elementor-element.elementor-element-c25cc7f {
	--width: 100% !important;
	width: 100% !important;
	max-width: 100% !important;
	flex-basis: 100% !important;
}

/* 2. Toolbar: [Filter] … [Sort] (+ result count, grid/list as before). */
.elementor-1388 .elementor-element.elementor-element-d85db4b {
	flex-direction: row !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	justify-content: flex-start !important;
	gap: 0.625rem 1rem !important;
}

.elementor-1388 .elementor-element-d85db4b > .elementor-widget-shortcode {
	order: 1;
	width: auto !important;
	flex: 0 0 auto;
	margin: 0 !important;
}

.elementor-1388 .elementor-element-d85db4b > .elementor-widget-rtsb-products-ordering {
	order: 2;
	width: auto !important;
	flex: 0 1 auto;
	margin: 0 0 0 auto !important;
}

.elementor-1388 .elementor-element-d85db4b > .elementor-widget-rtsb-archive-result-count {
	order: 3;
	flex: 1 1 100%;
	width: 100% !important;
	margin: 0 !important;
}

.elementor-1388 .elementor-element-d85db4b > .elementor-widget-rtsb-archive-product-mode {
	order: 4;
	width: auto !important;
}

@media (min-width: 1025px) {
	/* Desktop: Filter · result count ……… Sort · grid/list */
	.elementor-1388 .elementor-element-d85db4b > .elementor-widget-rtsb-archive-result-count {
		order: 2;
		flex: 0 1 auto;
		width: auto !important;
	}

	.elementor-1388 .elementor-element-d85db4b > .elementor-widget-rtsb-products-ordering {
		order: 3;
	}
}

.rr-fbtn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	margin: 0;
	padding: 0 1.125rem 0 0.9375rem;
	border: 1px solid rgba(19, 36, 27, 0.16);
	border-radius: 999px;
	background: #fff;
	color: var(--rr-fp-ink);
	font-family: inherit;
	font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
	font-weight: 600;
	line-height: 1;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.rr-fbtn:hover {
	border-color: var(--rr-fp-green);
	background: #fff;
	color: var(--rr-fp-ink);
}

.rr-fbtn:focus-visible {
	outline: 2px solid var(--rr-fp-green);
	outline-offset: 2px;
}

.rr-fbtn.has-active {
	border-color: var(--rr-fp-green);
}

.rr-fbtn .rr-ico {
	width: 1.125rem;
	height: auto;
	max-width: none;
	flex: 0 0 auto;
}

.rr-fbtn__badge {
	display: inline-grid;
	place-items: center;
	min-width: 1.375rem;
	height: 1.375rem;
	padding: 0 0.375rem;
	border-radius: 999px;
	background: var(--rr-fp-green);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
}

/* 3. Panel (glass). Bottom sheet ≤1024px, left drawer above. Above the
      bottom nav, the header and the WP toolbar. */
.rr-fp-ov[hidden],
.rr-fp[hidden] {
	display: none !important;
}

.rr-fp-ov {
	position: fixed;
	inset: 0;
	z-index: 100005;
	background: rgba(8, 26, 17, 0.42);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity var(--rr-fp-t) ease-out;
}

html.rr-fp-open .rr-fp-ov {
	opacity: 1;
}

html.rr-fp-open,
html.rr-fp-open body {
	overflow: hidden !important;
}

.rr-fp {
	position: fixed;
	z-index: 100006;
	display: flex;
	flex-direction: column;
	color: var(--rr-fp-ink);
	background: rgba(255, 255, 255, 0.9);
	-webkit-backdrop-filter: blur(16px) saturate(160%);
	backdrop-filter: blur(16px) saturate(160%);
	border: 1px solid rgba(255, 255, 255, 0.7);
	box-shadow: 0 -24px 60px -24px rgba(0, 40, 20, 0.35);
	transition: transform var(--rr-fp-t) ease-out;
	will-change: transform;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	.rr-fp {
		background: #fff;
	}
}

.rr-fp.is-dragging {
	transition: none;
}

@media (max-width: 1024px) {
	.rr-fp {
		left: 0;
		right: 0;
		bottom: 0;
		max-height: 85vh;
		max-height: 85dvh;
		border-bottom: 0;
		border-radius: 20px 20px 0 0;
		transform: translate3d(0, 100%, 0);
	}
}

@media (min-width: 1025px) {
	.rr-fp {
		top: 0;
		bottom: 0;
		left: 0;
		width: 360px;
		max-width: 92vw;
		border-left: 0;
		border-radius: 0 20px 20px 0;
		box-shadow: 24px 0 60px -24px rgba(0, 40, 20, 0.35);
		transform: translate3d(-100%, 0, 0);
	}

	body.admin-bar .rr-fp {
		top: var(--rr-adminbar-h, 32px);
	}

	.rr-fp__grab {
		display: none !important;
	}
}

html.rr-fp-open .rr-fp {
	transform: none;
}

.rr-fp__grab {
	display: flex;
	justify-content: center;
	padding: 0.625rem 0 0.25rem;
	touch-action: none;
	cursor: grab;
}

.rr-fp__handle {
	width: 2.5rem;
	height: 0.25rem;
	border-radius: 999px;
	background: rgba(19, 36, 27, 0.2);
}

.rr-fp__head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.25rem calc(var(--rr-fp-pad) - 0.625rem) 0.5rem var(--rr-fp-pad);
	border-bottom: 1px solid var(--rr-fp-hair);
	touch-action: none;
}

@media (min-width: 1025px) {
	.rr-fp__head {
		padding-top: 1.25rem;
		padding-bottom: 0.75rem;
	}
}

html body .rr-fp .rr-fp__title {
	flex: 1 1 auto;
	margin: 0;
	font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
	font-weight: 700;
	line-height: 1.3;
	color: var(--rr-fp-ink);
	outline: none;
}

.rr-fp__clear {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 0.5rem;
	color: var(--rr-fp-green-deep);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
}

.rr-fp__clear.is-idle {
	color: var(--rr-fp-muted);
	opacity: 0.6;
}

html body .rr-fp button.rr-fp__close {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--rr-fp-ink);
	cursor: pointer;
}

html body .rr-fp button.rr-fp__close:active {
	background: rgba(19, 36, 27, 0.06);
}

.rr-fp__close .rr-ico {
	width: 1.375rem;
	height: auto;
	max-width: none;
}

.rr-fp__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding: 0 var(--rr-fp-pad);
}

/* 4. The moved ShopBuilder widget, restyled. */
.rr-fp .elementor-widget-rtsb-product-filters,
.rr-fp .elementor-widget-rtsb-product-filters > .elementor-widget-container,
.rr-fp .rtsb-default-archive-filters,
.rr-fp .rtsb-archive-default-filters-wrapper,
.rr-fp #rtsb-product-default-filter-form {
	/* flex chain: lets the Apply bar sit at the panel bottom when content is short */
	display: flex !important;
	flex-direction: column;
	flex: 1 0 auto;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
}

.rr-fp .rtsb-filter-mobile-toggle {
	display: none !important;
}

.rr-fp .rtsb-product-default-filters.rr-fp-sec {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-bottom: 1px solid var(--rr-fp-hair) !important;
	background: none !important;
}

.rr-fp .default-filter-title-wrapper {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

html body .rr-fp .default-filter-title-wrapper h3 {
	display: block;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	font-size: inherit;
}

html body .rr-fp .default-filter-title-wrapper h3::before,
html body .rr-fp .default-filter-title-wrapper h3::after {
	display: none !important;
}

html body .rr-fp button.rr-fp-acc {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	min-height: 3.5rem;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--rr-fp-ink);
	font-family: inherit;
	font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
	font-weight: 600;
	line-height: 1.3;
	text-align: left;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
}

html body .rr-fp button.rr-fp-acc:focus-visible {
	outline: 2px solid var(--rr-fp-green);
	outline-offset: 2px;
}

.rr-fp-acc .rr-ico {
	width: 1.125rem;
	height: auto;
	max-width: none;
	color: var(--rr-fp-muted);
	transition: transform 0.2s ease;
}

.rr-fp-acc[aria-expanded="true"] .rr-ico {
	transform: rotate(180deg);
}

.rr-fp .rr-fp-sec.is-closed .default-filter-content {
	display: none !important;
}

.rr-fp .default-filter-content {
	margin: 0 !important;
	padding: 0 0 1rem !important;
	max-height: none !important;
	overflow: visible !important;
}

.rr-fp ul.product-default-filters {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.rr-fp ul.product-default-filters > li {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

.rr-fp .rtsb-default-filter-group {
	display: flex !important;
	align-items: center;
	gap: 0.75rem;
	min-height: 44px;
	margin: 0 !important;
	padding: 0 !important;
}

.rr-fp .rtsb-default-filter-group input[type="checkbox"],
.rr-fp .rtsb-default-filter-group input[type="radio"] {
	display: block !important;
	visibility: visible !important;
	position: static !important;
	flex: 0 0 auto;
	width: 1.25rem !important;
	height: 1.25rem !important;
	margin: 0 !important;
	opacity: 1 !important;
	accent-color: var(--rr-fp-green);
	-webkit-appearance: auto !important;
	appearance: auto !important;
	cursor: pointer;
}

.rr-fp .rtsb-default-filter-group label {
	display: flex !important;
	align-items: center;
	flex: 1 1 auto;
	min-height: 44px;
	margin: 0 !important;
	padding: 0 !important;
	color: var(--rr-fp-ink);
	font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
	font-weight: 500;
	cursor: pointer;
}

.rr-fp .rtsb-default-filter-group label::before,
.rr-fp .rtsb-default-filter-group label::after {
	display: none !important;
}

.rr-fp .rtsb-product-count {
	margin: 0 !important;
	color: var(--rr-fp-muted);
	font-size: 0.875rem;
}

/* Ratings: stars */
.rr-fp .rtsb-default-rating-star-wrapper {
	display: inline-flex;
	gap: 0.125rem;
}

.rr-fp .rtsb-default-rating-star {
	color: #d4dbd6;
	font-size: 0.875rem;
}

.rr-fp .rtsb-default-rating-star.active {
	color: #f2a91c;
}

/* Price: two fields side by side */
.rr-fp .price-inputs {
	display: grid !important;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
	margin: 0 !important;
}

.rr-fp .price-inputs > div {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	margin: 0 !important;
	width: auto !important;
}

.rr-fp .price-inputs label,
.rr-fp .price-inputs span {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--rr-fp-muted);
}

html body .rr-fp .price-inputs input {
	width: 100% !important;
	height: 3rem !important;
	margin: 0 !important;
	padding: 0 0.875rem !important;
	border: 1px solid rgba(19, 36, 27, 0.16) !important;
	border-radius: 0.75rem !important;
	background: #fff !important;
	color: var(--rr-fp-ink);
	font-size: max(16px, 1rem) !important;
	box-shadow: none !important;
}

html body .rr-fp .price-inputs input:focus {
	outline: none;
	border-color: var(--rr-fp-green) !important;
	box-shadow: none !important; /* border colour only */
}

/* 5. Sticky footer: the widget's own Apply button (its wrapper is the bar). */
.rr-fp .default-filter-btn-wrapper {
	position: sticky;
	bottom: 0;
	z-index: 2;
	display: block !important;
	margin: auto calc(-1 * var(--rr-fp-pad)) 0 !important;
	padding: 0.875rem var(--rr-fp-pad) max(0.875rem, env(safe-area-inset-bottom)) !important;
	background: rgba(255, 255, 255, 0.97) !important;
	border: 0 !important;
	border-top: 1px solid var(--rr-fp-hair) !important;
}

.rr-fp .rtsb-product-default-filters.rtsb-apply-filters-btn {
	display: block !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
}

.rr-fp .rtsb-apply-filters-btn .reset-btn-item {
	margin: 0 !important;
	padding: 0 !important;
}

html body .rr-fp button.rtsb-apply-filters {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100% !important;
	height: 3.125rem !important;
	margin: 0 !important;
	padding: 0 1.25rem !important;
	border: 0 !important;
	border-radius: 0.75rem !important;
	background: var(--rr-fp-green) !important;
	color: #fff !important;
	font-family: inherit;
	font-size: 1rem !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	text-transform: none !important;
	box-shadow: 0 12px 24px -16px rgba(1, 140, 70, 0.8);
	cursor: pointer;
}

html body .rr-fp button.rtsb-apply-filters:hover,
html body .rr-fp button.rtsb-apply-filters:focus-visible {
	background: var(--rr-fp-green-deep) !important;
}

html body .rr-fp button.rtsb-apply-filters .icon {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.rr-fp,
	.rr-fp-ov,
	.rr-fp-acc .rr-ico {
		transition: none !important;
	}
}
