/* =========================================================
   La Nuit — Filtros de tienda (lanuit-funciones)
   Replica el estilo que tenían los filtros de JetSmartFilters.
   ========================================================= */

.ln-filtro {
	--ln-txt: #333333;
	--ln-borde: #cccccc;
	--ln-check: #A3A3A3;      /* global 40b2ec6 */
	--ln-pill: #F0F0F0;       /* global caa256d */
	--ln-pill-hover: #EAEAEA; /* global d0de71b */
	font-family: "ofelia-text", sans-serif;
	width: 100%;
}

.ln-filtro .ln-row {
	margin: 0 2.5px 2.5px;
	padding-top: 2.5px;
}

.ln-filtro .ln-oculto {
	display: none;
}

.ln-filtro .ln-item {
	display: flex;
	align-items: flex-start;
	margin: 0;
	cursor: pointer;
	color: var(--ln-txt);
	font-size: 0.8rem;
	font-weight: 400;
	line-height: 150%;
}

.ln-filtro .ln-item input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

/* Casilla */
.ln-filtro .ln-deco {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 13px;
	height: 13px;
	margin: 3px 6px 0 0;
	border: 1px solid var(--ln-borde);
	border-radius: 3px;
	background: #fff;
	box-sizing: border-box;
}

.ln-filtro .ln-deco svg {
	width: 9px;
	height: 9px;
	fill: #fff;
	opacity: 0;
}

.ln-filtro .ln-item input:checked + .ln-deco {
	background: var(--ln-check);
	border-color: var(--ln-check);
}

.ln-filtro .ln-item input:checked + .ln-deco svg {
	opacity: 1;
}

.ln-filtro .ln-item input:focus-visible + .ln-deco,
.ln-filtro--pill .ln-item input:focus-visible + .ln-label {
	outline: 2px solid #0085f2;
	outline-offset: 1px;
}

/* Más / menos */
.ln-filtro .ln-mas-wrap {
	margin: 4px 2.5px 0;
}

.ln-filtro button.ln-mas,
.ln-filtro button.ln-mas:hover,
.ln-filtro button.ln-mas:focus {
	display: inline-block;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: var(--ln-txt);
	font-family: "ofelia-text", sans-serif;
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 150%;
	cursor: pointer;
	text-decoration: none;
}

/* Estilo botón (Tamaño) */
.ln-filtro--pill .ln-row {
	display: inline-block;
}

.ln-filtro--pill .ln-label {
	display: block;
	padding: 4.4px;
	background: var(--ln-pill);
	color: var(--ln-txt);
	line-height: 120%;
	transition: background-color .15s, color .15s;
}

.ln-filtro--pill .ln-item:hover .ln-label {
	background: var(--ln-pill-hover);
	color: #000;
}

.ln-filtro--pill .ln-item input:checked + .ln-label {
	background: var(--ln-check);
	color: #fff;
}

/* Botón aplicar (el gradiente viene de la clase .btn-primary del widget) */
.ln-aplicar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
}

.ln-aplicar button.ln-aplicar__btn {
	margin-top: 10px;
	padding: 13px 16px;
	border: 0;
	border-radius: 2px;
	color: #fff;
	font-family: "ofelia-text", sans-serif;
	font-size: 1rem;
	font-weight: 500;
	line-height: 24px;
	cursor: pointer;
}

.ln-aplicar .ln-limpiar {
	margin-top: 10px;
	color: #707070;
	font-family: "ofelia-text", sans-serif;
	font-size: 0.8rem;
	text-decoration: underline;
}

/* Orden */
.ln-orden__select {
	display: block;
	width: 100%;
	padding: 3px 0;
	border: 0;
	border-radius: 3px;
	background-color: #fff;
	color: #707070;
	font-family: "ofelia-text", sans-serif;
	font-size: 1rem;
	font-weight: 400;
	cursor: pointer;
}

/* Tablet y móvil: el panel de filtros es una sola columna con scroll
   (antes los bloques se repartían en columnas fuera de la pantalla) */
@media (max-width: 1023px) {
	#filters-panel {
		flex-direction: column !important;
		flex-wrap: nowrap !important;
		justify-content: flex-start !important;
		gap: 1.25rem !important;
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	#filters-panel > .e-con,
	#filters-panel > .elementor-element {
		flex: 0 0 auto !important;
		width: 100% !important;
		max-width: 100% !important;
	}

	#filters-panel .ln-filtro--pill .ln-label {
		padding: 8px 10px;
	}
}

/* Filtros automáticos (v1.1.3): sin botón «Apply filters»; queda solo «Clear» si hay filtros */
.ln-aplicar button.ln-aplicar__btn {
	display: none !important;
}

.ln-aplicar .ln-limpiar {
	margin-top: 0.5rem;
}

/* Mientras recarga con el filtro nuevo */
body.ln-cargando #products-section,
body.ln-cargando .ln-filtro {
	opacity: 0.5;
	pointer-events: none;
	transition: opacity .2s ease;
}
