/*
 * NJ WooCommerce Catalog
 * Las variables se pueden sobrescribir desde Apariencia > Personalizar > CSS adicional.
 */
.nj-catalog-section {
	--nj-primary: #e30613;
	--nj-text: #171717;
	--nj-muted: #6b6b6b;
	--nj-border: #c7c7c7;
	--nj-background: #ffffff;
	--nj-card-radius: 7px;
	--nj-button-radius: 999px;
	--nj-gap: 10px;
	--nj-image-height: 210px;
	--nj-card-padding: 30px;
	--nj-title-size: 20px;
	--nj-price-size: 24px;
	--nj-columns: 4;

	position: relative;
	width: 100%;
	margin: 0 0 48px;
	color: var(--nj-text);
	font-family: inherit;
}

.nj-catalog-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 18px;
}

.nj-catalog-heading {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 24px;
	width: 100%;
}

.nj-catalog-title {
	margin: 0;
	color: var(--nj-text);
	font-size: clamp(26px, 3vw, 38px);
	font-weight: 800;
	line-height: 1.15;
}

.nj-catalog-view-all {
	flex: 0 0 auto;
	color: var(--nj-primary);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
}

.nj-catalog-view-all:hover,
.nj-catalog-view-all:focus-visible {
	color: var(--nj-text);
	text-decoration: underline;
}

.nj-catalog-controls {
	display: flex;
	flex: 0 0 auto;
	gap: 8px;
}

.nj-catalog-arrow {
	display: inline-grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	color: var(--nj-primary);
	background: var(--nj-background);
	border: 2px solid var(--nj-primary);
	border-radius: 50%;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}

.nj-catalog-arrow span {
	font-size: 30px;
	line-height: 1;
	transform: translateY(-1px);
}

.nj-catalog-arrow:hover,
.nj-catalog-arrow:focus-visible {
	color: #fff;
	background: var(--nj-primary);
}

.nj-catalog-arrow:disabled {
	opacity: .3;
	cursor: not-allowed;
}

.nj-product-track {
	display: grid;
	grid-template-columns: repeat(var(--nj-columns), minmax(0, 1fr));
	gap: var(--nj-gap);
	width: 100%;
	outline: none;
}

.nj-layout-carousel .nj-product-track {
	display: flex;
	overflow-x: auto;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-inline: contain;
}

.nj-layout-carousel .nj-product-track::-webkit-scrollbar {
	display: none;
}

.nj-layout-carousel .nj-product-card {
	flex: 0 0 calc((100% - ((var(--nj-columns) - 1) * var(--nj-gap))) / var(--nj-columns));
	scroll-snap-align: start;
}

.nj-product-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	height: auto;
	overflow: hidden;
	background: var(--nj-background);
	border: 2px solid var(--nj-border);
	border-radius: var(--nj-card-radius);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}

.nj-product-image-wrap {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: var(--nj-image-height);
	padding: 22px var(--nj-card-padding) 0;
	background: var(--nj-background);
	text-decoration: none;
}

.nj-product-image {
	display: block;
	width: 100%;
	height: var(--nj-image-height) !important;
	margin: 0 !important;
	object-fit: contain;
	transition: transform .25s ease;
}

.nj-product-image-wrap:hover .nj-product-image {
	transform: scale(1.035);
}

.nj-sale-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 2;
	padding: 6px 10px;
	color: #fff;
	background: var(--nj-primary);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
}

.nj-product-content {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 18px var(--nj-card-padding) 30px;
}

.nj-product-title {
	margin: 0 0 14px;
	color: var(--nj-text);
	font-size: var(--nj-title-size);
	font-weight: 800;
	line-height: 1.25;
}

.nj-product-title a {
	color: inherit;
	text-decoration: none;
}

.nj-product-title a:hover,
.nj-product-title a:focus-visible {
	color: var(--nj-primary);
}

.nj-product-price {
	margin: 0 0 28px;
	color: var(--nj-primary);
	font-size: var(--nj-price-size);
	font-weight: 800;
	line-height: 1.2;
}

.nj-product-price del {
	margin-right: 6px;
	color: var(--nj-muted);
	font-size: .72em;
	font-weight: 600;
	opacity: .75;
}

.nj-product-price ins {
	color: var(--nj-primary);
	text-decoration: none;
}

.nj-product-card .nj-add-to-cart {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	margin-top: auto;
	padding: 9px 18px;
	color: var(--nj-primary) !important;
	background: transparent !important;
	border: 3px solid var(--nj-primary) !important;
	border-radius: var(--nj-button-radius) !important;
	box-shadow: none !important;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.1;
	text-align: center;
	text-decoration: none !important;
	text-transform: uppercase;
	transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.nj-product-card .nj-add-to-cart:hover,
.nj-product-card .nj-add-to-cart:focus-visible {
	color: #fff !important;
	background: var(--nj-primary) !important;
	transform: translateY(-1px);
}

.nj-product-card .added_to_cart {
	display: block;
	margin-top: 10px;
	color: var(--nj-primary);
	font-weight: 700;
	text-align: center;
}

.nj-catalog-empty {
	padding: 16px;
	background: #fff8e5;
	border-left: 4px solid #dba617;
}

.nj-category-rows .nj-catalog-section:last-child {
	margin-bottom: 0;
}

@media (max-width: 1024px) {
	.nj-catalog-section {
		--nj-columns: 3 !important;
		--nj-card-padding: 22px;
		--nj-image-height: 190px;
	}
}

@media (max-width: 767px) {
	.nj-catalog-section {
		--nj-columns: 1.2 !important;
		--nj-card-padding: 18px;
		--nj-image-height: 170px;
		--nj-title-size: 17px;
		--nj-price-size: 21px;
		margin-bottom: 36px;
	}

	.nj-catalog-header {
		align-items: center;
	}

	.nj-catalog-heading {
		display: block;
	}

	.nj-catalog-title {
		font-size: 25px;
	}

	.nj-catalog-view-all {
		display: inline-block;
		margin-top: 7px;
	}

	.nj-catalog-controls {
		display: none;
	}

	.nj-layout-grid .nj-product-track {
		grid-template-columns: 1fr;
	}

	.nj-layout-carousel .nj-product-card {
		flex-basis: 82%;
	}

	.nj-product-content {
		padding-bottom: 20px;
	}

	.nj-product-card .nj-add-to-cart {
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nj-product-track {
		scroll-behavior: auto !important;
	}

	.nj-product-image,
	.nj-product-card .nj-add-to-cart {
		transition: none;
	}
}


.nj-brand-button-wrap {
	display: flex;
	justify-content: center;
	margin-top: 12px;
}

.nj-brand-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 220px;
	padding: 13px 28px;
	color: #fff !important;
	background: var(--nj-primary, #e30613);
	border: 3px solid var(--nj-primary, #e30613);
	border-radius: 999px;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.1;
	text-align: center;
	text-decoration: none !important;
	text-transform: uppercase;
	transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.nj-brand-button:hover,
.nj-brand-button:focus-visible {
	color: var(--nj-primary, #e30613) !important;
	background: transparent;
	transform: translateY(-1px);
}
