/* NJ Filtros WooCommerce */
.njfiltros {
	--nj-red: #e30613;
	--nj-text: #292929;
	--nj-muted: #707070;
	--nj-border: #dedede;
	--nj-bg: #f6f6f6;
	--nj-radius: 16px;
	--nj-panel-width: 380px;
	color: var(--nj-text);
	font-family: inherit;
}

.njfiltros *,
.njfiltros *::before,
.njfiltros *::after {
	box-sizing: border-box;
}

.njfiltros__mobile-trigger {
	display: none;
	width: 100%;
	min-height: 50px;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 12px 18px;
	border: 0;
	border-radius: 8px;
	background: var(--nj-red);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.njfiltros__filter-icon {
	width: 19px;
	height: 16px;
	display: inline-block;
	background:
		linear-gradient(currentColor, currentColor) 0 2px / 100% 2px no-repeat,
		linear-gradient(currentColor, currentColor) 0 7px / 100% 2px no-repeat,
		linear-gradient(currentColor, currentColor) 0 12px / 100% 2px no-repeat;
	position: relative;
}

.njfiltros__filter-icon::before,
.njfiltros__filter-icon::after {
	content: "";
	position: absolute;
	width: 5px;
	height: 5px;
	border: 2px solid currentColor;
	border-radius: 50%;
	background: var(--nj-red);
}

.njfiltros__filter-icon::before {
	left: 4px;
	top: 0;
}

.njfiltros__filter-icon::after {
	right: 3px;
	bottom: 0;
}

.njfiltros__badge {
	min-width: 23px;
	height: 23px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 6px;
	border-radius: 999px;
	background: #fff;
	color: var(--nj-red);
	font-size: 12px;
	font-weight: 800;
}

.njfiltros__panel {
	width: 100%;
	border-radius: var(--nj-radius);
	background: var(--nj-bg);
	overflow: hidden;
}

.njfiltros__panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 24px 22px 14px;
}

.njfiltros__title {
	margin: 0;
	font-size: clamp(24px, 2vw, 34px);
	line-height: 1.1;
	font-weight: 800;
	text-transform: uppercase;
	color: var(--nj-text);
}

.njfiltros__close {
	display: none;
	width: 42px;
	height: 42px;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: #eee;
	color: var(--nj-text);
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
}

.njfiltros__form {
	padding: 0 22px 26px;
}

.njfiltros__section {
	padding: 20px 0;
	border-top: 1px solid var(--nj-border);
}

.njfiltros__section:first-of-type {
	border-top: 0;
}

.njfiltros__section-title {
	margin: 0 0 14px;
	color: var(--nj-text);
	font-size: 21px;
	line-height: 1.2;
	font-weight: 800;
	text-transform: uppercase;
}

.njfiltros__tree,
.njfiltros__tree ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.njfiltros__tree-item + .njfiltros__tree-item {
	margin-top: 4px;
}

.njfiltros__tree-row {
	display: flex;
	align-items: flex-start;
	min-height: 35px;
}

.njfiltros__toggle,
.njfiltros__toggle-spacer {
	flex: 0 0 28px;
	width: 28px;
	height: 32px;
}

.njfiltros__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.njfiltros__toggle:focus,.njfiltros__toggle[type=button]:focus, .njfiltros__toggle[type=submit]:focus, button.njfiltros__toggle:focus,.njfiltros__toggle:hover,.njfiltros__toggle[type=button]:hover, .njfiltros__toggle[type=submit]:hover, button.njfiltros__toggle:hover{
	border-color: transparent!important;
	background-color: transparent!important;
}

.njfiltros__toggle span {
	width: 8px;
	height: 8px;
	border-right: 2px solid var(--nj-red);
	border-bottom: 2px solid var(--nj-red);
	transform: rotate(-45deg);
	transition: transform .2s ease;
}

.njfiltros__toggle[aria-expanded="true"] span {
	transform: rotate(45deg) translate(-2px, -2px);
}

.njfiltros__children {
	padding-left: 23px;
}

.njfiltros__option {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	width: 100%;
	padding: 7px 0;
	font-size: 16px;
	line-height: 1.35;
	cursor: pointer;
}

.njfiltros__option input {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--nj-red);
}

.njfiltros__option span {
	flex: 1 1 auto;
}

.njfiltros__option small {
	flex: 0 0 auto;
	color: var(--nj-muted);
	font-size: 12px;
}

.njfiltros__range-wrap {
	position: relative;
	height: 38px;
	margin: 0 8px 8px;
}

.njfiltros__range {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 38px;
	margin: 0;
	background: transparent;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

.njfiltros__range::before {
	content: "";
	position: absolute;
	top: 18px;
	left: 0;
	right: 0;
	height: 4px;
	border-radius: 999px;
	background: #d3d3d3;
	z-index: 0;
}

.njfiltros__range::-webkit-slider-thumb {
	width: 22px;
	height: 22px;
	border: 0;
	border-radius: 50%;
	background: var(--nj-red);
	cursor: pointer;
	pointer-events: auto;
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	z-index: 2;
}

.njfiltros__range::-moz-range-thumb {
	width: 22px;
	height: 22px;
	border: 0;
	border-radius: 50%;
	background: var(--nj-red);
	cursor: pointer;
	pointer-events: auto;
	position: relative;
	z-index: 2;
}

.njfiltros__price-values {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.njfiltros__price-values label {
	display: grid;
	gap: 5px;
	color: var(--nj-muted);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
}

.njfiltros__price-values input {
	width: 100%;
	min-height: 42px;
	padding: 8px 10px;
	border: 1px solid var(--nj-border);
	border-radius: 7px;
	background: #fff;
	color: var(--nj-text);
	font: inherit;
}

.njfiltros__price-summary {
	margin: 10px 0 0;
	font-size: 14px;
	color: var(--nj-muted);
}

.njfiltros__actions {
	position: sticky;
	bottom: 0;
	display: grid;
	gap: 10px;
	padding-top: 18px;
	background: linear-gradient(to bottom, rgba(246,246,246,0), var(--nj-bg) 18px);
}

.njfiltros__apply,
.njfiltros__clear {
	min-height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 16px;
	border-radius: 7px;
	font: inherit;
	font-weight: 800;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.njfiltros__apply {
	border: 1px solid var(--nj-red);
	background: var(--nj-red);
	color: #fff;
}
.njfiltros__apply:hover {
	border: 1px solid var(--nj-red);
	background: #ac020c!important;
	color: #fff;
}

.njfiltros__clear {
	border: 1px solid var(--nj-border);
	background: #fff;
	color: var(--nj-text);
}

.njfiltros__empty {
	margin: 0;
	color: var(--nj-muted);
	font-size: 14px;
}

.njfiltros__overlay {
	display: none;
}

body.njfiltros-lock {
	overflow: hidden;
}

@media (min-width: 1025px) {
	.njfiltros__panel {
		position: sticky;
		top: 110px;
		max-height: calc(100vh - 130px);
		overflow-y: auto;
		scrollbar-width: thin;
	}
}

@media (max-width: 1024px) {
	.njfiltros__mobile-trigger {
		display: flex;
	}

	.njfiltros__overlay {
		position: fixed;
		inset: 0;
		z-index: 999998;
		display: block;
		background: rgba(0, 0, 0, .48);
		opacity: 0;
		visibility: hidden;
		transition: opacity .25s ease, visibility .25s ease;
	}

	.njfiltros.is-open .njfiltros__overlay {
		opacity: 1;
		visibility: visible;
	}

	.njfiltros__panel {
		position: fixed;
		z-index: 999999;
		top: 0;
		left: 0;
		width: min(88vw, var(--nj-panel-width));
		max-width: 100%;
		height: 100dvh;
		border-radius: 0 16px 16px 0;
		transform: translateX(-105%);
		transition: transform .28s ease;
		overflow-y: auto;
		overscroll-behavior: contain;
		box-shadow: 10px 0 30px rgba(0, 0, 0, .2);
		padding-bottom: calc(80px + env(safe-area-inset-bottom));
	}

	.njfiltros.is-open .njfiltros__panel {
		transform: translateX(0);
	}

	.njfiltros__panel-header {
		position: sticky;
		top: 0;
		z-index: 3;
		padding: 18px 18px 14px;
		background: var(--nj-bg);
		border-bottom: 1px solid var(--nj-border);
	}

	.njfiltros__title {
		font-size: 25px;
	}

	.njfiltros__close {
		display: inline-flex;
	}

	.njfiltros__form {
		padding: 0 18px 30px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.njfiltros__panel,
	.njfiltros__overlay,
	.njfiltros__toggle span {
		transition: none;
	}
}


/* Listado controlado por [nj_productos_filtrados] */
.njproductos {
	width: 100%;
}

.njproductos__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin: 0 0 24px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--nj-border, #dedede);
}

.njproductos__result {
	margin: 0;
	color: #555;
	font-size: 14px;
}

.njproductos__ordering .woocommerce-ordering {
	float: none;
	margin: 0;
}

.njproductos__ordering select {
	min-height: 42px;
	padding: 8px 38px 8px 12px;
	border: 1px solid #dedede;
	border-radius: 7px;
	background-color: #fff;
	font: inherit;
}

.njproductos ul.products {
	display: grid;
	grid-template-columns: repeat(var(--nj-product-columns, 4), minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
}

.njproductos ul.products::before,
.njproductos ul.products::after {
	display: none;
}

.njproductos ul.products li.product {
	float: none;
	width: auto;
	margin: 0;
	display: flex!important;
    flex-direction: column!important;
    justify-content: space-between!important;
}

.njproductos ul.products li.product h2{
	font-size: 18px!important;
	line-height: 22px;
	font-weight: 500;
	color: #000000;
	margin-bottom: 15px!important;
}

.njproductos ul.products li.product .price{
	font-size: 22px;
	line-height: 26px;
	font-weight: 700;
	color: #e30613;
	margin-bottom: 35px!important;
}

.njproductos ul.products li.product .price > del{
	font-size: 20px;
	line-height: 25px;
	font-weight: 400;
	color: #292929;
}

.njproductos ul.products li.product .add_to_cart_button {
	background: #e30613;
	width: 100%;
	display: block;
	text-align: center;
	color: #fff;
	margin-bottom: 15px!important;
}
.njproductos ul.products li.product .add_to_cart_button:hover {
	background: #ac020c!important;
	color: #fff;
}

.njproductos ul.products li.product .added_to_cart.wc-forward{
	font-size: 18px;
	line-height: 20px;
	font-weight: 400;
	color: #e30613;
	display: block;
	text-align: center;
}

.njproductos ul.products li.product .added_to_cart.wc-forward:hover{
	color: #ac020c;
}

.njproductos__pagination {
	margin-top: 34px;
}

.njproductos__pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

.njproductos__pagination .page-numbers li {
	margin: 0;
	border: 0;
}

.njproductos__pagination a.page-numbers,
.njproductos__pagination span.page-numbers {
	min-width: 42px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px;
	border: 1px solid #dedede;
	border-radius: 7px;
	background: #fff;
	color: #292929;
	text-decoration: none;
}

.njproductos__pagination span.current {
	border-color: #e30613;
	background: #e30613;
	color: #fff;
}

.njproductos__empty {
	padding: 44px 24px;
	border: 1px solid #e1e1e1;
	border-radius: 12px;
	background: #f7f7f7;
	text-align: center;
}

.njproductos__empty p {
	margin: 0 0 16px;
}

.njproductos__empty a {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	padding: 10px 18px;
	border-radius: 7px;
	background: #e30613;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

@media (min-width: 1025px) {
	.njproductos ul.products.columns-1 { --nj-product-columns: 1; }
	.njproductos ul.products.columns-2 { --nj-product-columns: 2; }
	.njproductos ul.products.columns-3 { --nj-product-columns: 3; }
	.njproductos ul.products.columns-4 { --nj-product-columns: 4; }
	.njproductos ul.products.columns-5 { --nj-product-columns: 5; }
	.njproductos ul.products.columns-6 { --nj-product-columns: 6; }
}

@media (max-width: 1024px) {
	.njproductos ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.njproductos ul.products li.product{
		width: 100%!important;
	}
}

@media (max-width: 767px) {
	.njproductos__toolbar {
		align-items: stretch;
		flex-direction: column;
	}

	.njproductos__ordering select {
		width: 100%;
	}

	.njproductos ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px 12px;
	}
}

@media (max-width: 420px) {
	.njproductos ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
