.cop-filters-wrap {
	font-size: 15px;
}

.cop-filter-section {
	margin-bottom: 24px;
}

.cop-filter-section-title {
	font-weight: 700;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 10px;
	padding-bottom: 6px;
	border-bottom: 1px solid #e0e0e0;
}

.cop-filter-options {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.cop-filter-btn[style*="display: none"] {
	display: none !important;
}

.cop-filter-btn {
	background: #f5f5f5;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 5px 10px;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s;
	line-height: 1.4;
}

.cop-filter-btn:hover {
	border-color: #999;
	background: #eee;
}

.cop-filter-btn.active {
	background-color: #d3521f;
	border-color: #d3521f;
	color: #fff;
}

.cop-filter-btn .cop-count {
	opacity: 0.7;
	font-size: 11px;
}

/* Albero categorie */
.cop-cat-tree {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cop-cat-item {
	display: flex;
	flex-direction: column;
}

.cop-cat-row {
	padding-left: calc(var(--depth, 0) * 16px);
}

/* Box grigio che contiene link + freccia */
.cop-cat-box {
	display: flex;
	align-items: center;
	gap: 0;
	padding: 5px 6px 5px 10px;
	cursor: default;
}

.cop-cat-link {
	flex: 1;
	text-decoration: none;
	color: inherit;
	line-height: 1.4;
}

.cop-cat-box.active .cop-cat-link {
	color: #fff;
}

/* Bottone freccia dentro il box */
.cop-cat-toggle {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.6;
	border-radius: 3px;
	transition: opacity 0.15s, background 0.15s;
}

.cop-cat-toggle:hover {
	opacity: 1;
	background: rgba(0,0,0,0.08);
}

.cop-cat-box.active .cop-cat-toggle {
	opacity: 0.8;
}

.cop-cat-box.active .cop-cat-toggle:hover {
	background: rgba(255,255,255,0.15);
}

.cop-cat-arrow {
	display: inline-block;
	width: 0;
	height: 0;
	border-top: 5px solid transparent;
	border-bottom: 5px solid transparent;
	border-left: 6px solid currentColor;
	transition: transform 0.2s;
}

.cop-cat-toggle.open .cop-cat-arrow {
	transform: rotate(90deg);
}

.cop-cat-children {
	display: none;
	flex-direction: column;
	gap: 4px;
	margin-top: 4px;
}

.cop-cat-children.open {
	display: flex;
}

/* Ordinamento */
.cop-orderby {
	width: 100%;
	padding: 7px 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 13px;
	background: #fff;
}

/* Range prezzo */
.cop-price-range {
	padding: 4px 0;
}

.cop-price-labels {
	display: flex;
	justify-content: space-between;
	margin-bottom: 10px;
	font-size: 13px;
	font-weight: 600;
}

/* Dual slider: due input sovrapposti sullo stesso segmento */
.cop-dual-slider {
	position: relative;
	height: 20px;
}

.cop-dual-slider .cop-price-slider {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	pointer-events: none;
	background: transparent;
	-webkit-appearance: none;
	appearance: none;
}

/* Nasconde la track nativa — disegnata via JS o lasciata al browser */
.cop-dual-slider .cop-price-slider::-webkit-slider-runnable-track {
	background: transparent;
	height: 4px;
}

.cop-dual-slider .cop-price-slider::-moz-range-track {
	background: transparent;
	height: 4px;
}

/* Thumb cliccabile */
.cop-dual-slider .cop-price-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #d3521f;
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(0,0,0,0.3);
	pointer-events: all;
	cursor: pointer;
	position: relative;
	z-index: 2;
}

.cop-dual-slider .cop-price-slider::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #d3521f;
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(0,0,0,0.3);
	pointer-events: all;
	cursor: pointer;
}

/* Track visiva con segmento attivo colorato */
.cop-dual-slider::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 4px;
	background: var(--track-gradient, #ddd);
	border-radius: 2px;
	transform: translateY(-50%);
	z-index: 0;
}

/* Reset */
.cop-filter-actions {
	margin-top: 16px;
}

.cop-reset-btn {
	background: none;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 6px 14px;
	font-size: 12px;
	cursor: pointer;
	color: #666;
	transition: all 0.2s;
}

.cop-reset-btn:hover {
	border-color: #999;
	color: #333;
}

/* Loader */
.cop-loader {
	text-align: center;
	padding: 20px;
	color: #999;
	font-size: 13px;
}

/* Nessun prodotto */
.cop-no-products {
	padding: 20px;
	color: #666;
	font-style: italic;
}

/* ── Mobile ── */
@media (max-width: 767px) {

	/* Bottone toggle filtri */
	.cop-filters-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 10px;
		width: 100%;
		padding: 13px 20px;
		background: #1a1a2e;
		color: #fff;
		border: none;
		border-radius: 50px;
		font-size: 15px;
		font-weight: 700;
		letter-spacing: 0.04em;
		cursor: pointer;
		box-shadow: 0 4px 14px rgba(0,0,0,0.18);
		transition: background 0.2s, box-shadow 0.2s;
	}

	.cop-filters-toggle:active {
		background: #16213e;
		box-shadow: 0 2px 6px rgba(0,0,0,0.2);
	}

	.cop-filters-toggle .cop-toggle-icon {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 22px;
		height: 22px;
		background: rgba(255,255,255,0.15);
		border-radius: 50%;
		font-size: 10px;
		transition: transform 0.25s;
	}

	.cop-filters-toggle .cop-toggle-icon::before {
		content: '▼';
		display: inline-block;
		transition: transform 0.25s;
	}

	.cop-filters-toggle.open .cop-toggle-icon::before {
		transform: rotate(180deg);
	}

	/* Container Elementor: rimuove sfondo, bordo e ombra su mobile */
	.elementor-element-b99506d {
		background: transparent !important;
		background-color: transparent !important;
		background-image: none !important;
		border: none !important;
		box-shadow: none !important;
		padding: 8px 0 !important;
	}

	.elementor-element-b99506d:has(.cop-filters-body.open) {
		padding: 8px 0 16px !important;
	}

	/* Filtri nascosti di default su mobile */
	.cop-filters-wrap .cop-filters-body {
		display: none !important;
		padding-top: 16px;
	}

	.cop-filters-wrap .cop-filters-body.open {
		display: block !important;
	}

	/* Card prodotti a colonna singola */
	ul.products,
	ul.products.elementor-grid,
	ul.products.columns-2,
	ul.products.columns-3,
	ul.products.columns-4 {
		grid-template-columns: 1fr !important;
		--e-wc-products-grid-columns-count: 1 !important;
	}

	ul.products li.product,
	ul.products.elementor-grid li.product {
		width: 100% !important;
		max-width: 100% !important;
		float: none !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
}

@media (min-width: 768px) {
	.cop-filters-toggle {
		display: none;
	}
	.cop-filters-body {
		display: block !important;
	}
}

/* Grid prodotti filtrati — card uniformi */
ul.products.elementor-grid {
	display: grid !important;
	grid-template-columns: repeat(var(--e-wc-products-grid-columns-count, 3), 1fr) !important;
	gap: var(--e-wc-products-grid-row-gap, 20px) var(--e-wc-products-grid-column-gap, 20px) !important;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

ul.products.elementor-grid li.product {
	width: 100% !important;
	margin: 0 !important;
	display: flex !important;
	flex-direction: column !important;
}
