/* =========================
GRID BASE
========================= */
.jlc-wp-products-woo-grid {
	display: grid;
	grid-template-columns: repeat(var(--columns-desktop, 4), 1fr);
	gap: 24px;
}

/* Tablet */
@media (max-width: 1024px) {
	.jlc-wp-products-woo-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Mobile */
@media (max-width: 768px) {
	.jlc-wp-products-woo-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* =========================
CARD BASE
========================= */
.jlc-wp-product-card {
	position: relative;
	background: #fff;
	overflow: hidden;
	border-radius: 16px;
	transition: transform 0.3s ease;
}

.jlc-wp-product-media {
	position: relative;
	overflow: hidden;
}

.jlc-wp-product-link img {
	width: 100%;
	height: auto;
	object-fit: cover;
	display: block;
	transition: transform 0.6s ease;
}

/* =========================
SECOND IMAGE HOVER EFFECT
========================= */

/* Contenedor */
.jlc-wp-product-media {
	position: relative;
	overflow: hidden;
}

/* Ambas imágenes */
.jlc-wp-product-link img {
	width: 100%;
	height: auto;
	display: block;
	transition: opacity 0.45s ease, transform 0.6s ease;
}

/* Imagen principal */
.jlc-wp-product-image-main {
	position: relative;
	z-index: 1;
}

/* Imagen secundaria */
.jlc-wp-product-image-secondary {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;

	opacity: 0;
	transform: scale(1.05);
	z-index: 2;
	pointer-events: none;
}

/* Hover SOLO si existe segunda imagen */
.jlc-wp-product-media.has-second-image:hover .jlc-wp-product-image-secondary {
	opacity: 1;
	transform: scale(1);
}

.jlc-wp-product-media.has-second-image:hover .jlc-wp-product-image-main {
	opacity: 0;
	transform: scale(1.02);
}

/* =========================
DEFAULT CARD DESIGN
========================= */
.jlc-card--default {
	display: flex;
	flex-direction: column;
}

/* Estado inicial: contenido NORMAL (debajo de la imagen) */
.jlc-card--default .jlc-wp-product-content {
	position: static;
	background: #ffffff;
	padding: 16px;
	border-radius: 0 0 16px 16px;

	transform: none;
	opacity: 1;

	box-shadow: none;

	transition: transform 0.35s ease, opacity 0.35s ease, box-shadow 0.35s ease;
}

/* =========================
HOVER – CONTENT OVERLAY
========================= */
.jlc-wp-product-card:hover .jlc-wp-product-content {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 16px;

	border-radius: 14px;
	transform: translateY(-50px);
	opacity: 1;

	box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
	z-index: 2;
}

/* =========================
TEXT CONTENT
========================= */
.jlc-wp-product-link {
	text-decoration: none;
	color: inherit;
}

.jlc-wp-product-title {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	margin: 0 0 6px;
}

/* =========================
PRICE ORDER (INNER ONLY)
========================= */
.jlc-wp-price-inner {
	display: inline-flex;
	gap: 6px;
	align-items: baseline;
}

.jlc-wp-products-woo-grid[data-price-order='sale-regular'] .jlc-wp-price-inner {
	flex-direction: row;
}

.jlc-wp-products-woo-grid[data-price-order='regular-sale'] .jlc-wp-price-inner {
	flex-direction: row-reverse;
}

.jlc-wp-product-price {
	font-size: 15px;
	font-weight: 700;
	color: #111;
	margin-bottom: 12px;
}

/* =========================
CTA
========================= */
.jlc-wp-product-cta {
	display: none;
}

.jlc-wp-product-card:hover .jlc-wp-product-cta {
	display: block;
	margin-top: 8px;

	transform: translateY(10px);
	animation: jlc-cta-up 0.3s ease forwards;
}

@keyframes jlc-cta-up {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* =========================
HOVER IMAGE EFFECT
========================= */
.jlc-wp-product-card:hover .jlc-wp-product-link img {
	transform: scale(1.08);
}

/* =========================
SALE FLASH (FLAG)
========================= */
.jlc-wp-sale-flag {
	position: absolute;
	top: 16px;
	left: -36px;

	padding: 6px 48px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	white-space: nowrap;

	transform: rotate(-45deg);
	transform-origin: center;

	z-index: 5;
	pointer-events: none;
}

.jlc-wp-products-woo-grid[data-sale-position='right'] .jlc-wp-sale-flag {
	left: auto;
	right: -36px;
	transform: rotate(45deg);
}

/* =========================
CARD DESIGN – MINIMAL
========================= */
.jlc-card--minimal {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.jlc-card--minimal:hover {
	box-shadow: 0 14px 35px rgba(0, 0, 0, 0.14);
}

.jlc-card--minimal .jlc-wp-product-media {
	border-radius: inherit;
	overflow: hidden;
}

.jlc-card--minimal .jlc-wp-product-content {
	position: static !important;
	opacity: 1 !important;
	transform: none !important;
	padding: 6px;
	border-radius: inherit;
}

.jlc-card--minimal:hover .jlc-wp-product-content {
	position: static;
	transform: none;
}

.jlc-card--minimal:hover .jlc-wp-product-content {
	box-shadow: none;
}

.jlc-card--minimal .jlc-wp-product-cta {
	display: block;
	margin-top: 8px;
	margin-bottom: 12px;
}

.jlc-card--minimal:hover .jlc-wp-product-link img {
	transform: scale(1.03);
}

.jlc-card--minimal .jlc-wp-product-cta,
.jlc-card--minimal:hover .jlc-wp-product-cta {
	animation: none;
	transform: none;
}

/* =========================
CARD DESIGN – OVERLAY
========================= */
.jlc-card--overlay {
	position: relative;
	overflow: hidden;
	border-radius: inherit;
	background: #000;
}

.jlc-card--overlay .jlc-wp-product-media {
	position: relative;
	z-index: 1;
}

.jlc-card--overlay .jlc-wp-product-media::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 2;
	pointer-events: none;
}

.jlc-card--overlay .jlc-wp-product-content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;

	z-index: 3;

	padding: 16px;
	color: #fff;

	opacity: 0;
	transform: translateY(20px);

	transition: opacity 0.3s ease, transform 0.3s ease;
}

.jlc-card--overlay:hover .jlc-wp-product-content {
	opacity: 1;
	transform: translateY(0);
}

.jlc-card--overlay:hover .jlc-wp-product-media::after {
	opacity: 1;
}

.jlc-card--overlay .jlc-wp-product-title,
.jlc-card--overlay .jlc-wp-product-price,
.jlc-card--overlay .jlc-wp-product-price del,
.jlc-card--overlay .jlc-wp-product-price ins,
.jlc-card--overlay .jlc-wp-product-cta a {
	color: #ffffff;
}

.jlc-card--overlay .jlc-wp-product-cta {
	display: block;
	margin-top: 8px;
}

.jlc-card--overlay:hover .jlc-wp-product-link img {
	transform: scale(1.05);
}

.jlc-wp-load-more-wrapper {
	display: flex;
}

/* =========================
LOAD MORE BUTTON – DEFAULT
========================= */
.jlc-wp-load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100px;
	height: 100px;

	padding: 12px 28px;
	/* border-radius: 999px; */

	background-color: #ffffff;
	border: 2px solid #000000;

	color: #000000;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.3px;
	text-transform: none;

	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease,
		border-color 0.25s ease, transform 0.2s ease;
}

.jlc-wp-load-more:hover {
	background-color: #000000;
	color: #ffffff;
	transform: translateY(-1px);
}

.jlc-wp-load-more.is-loading,
.jlc-wp-load-more:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.jlc-wp-load-more-text {
	white-space: nowrap;
}

.jlc-wp-result-count {
	display: flex;
	width: 100%;
	height: 100%;
}

.jlc-wp-pagination--numbers {
	display: flex;
	width: 100%;
	height: 100%;
}

.jlc-wp-product-rating {
	display: flex;
	align-items: center;
	gap: var(--jlc-rating-gap, 6px);;
}

.jlc-wp-product-rating .star-rating {
	font-size: inherit;
	color: inherit;
}

/* -----===== RESPONSIVE =====----- */
@media (max-width: 1024px) {
	.jlc-wp-product-card:hover .jlc-wp-product-content {
		position: static;
		left: auto;
		right: auto;
		bottom: auto;

		transform: none;
		opacity: 1;
		box-shadow: none;
		border-radius: 0;
	}

	.jlc-wp-product-card:hover .jlc-wp-product-cta {
		display: block;
		margin-top: 0px;
		transform: translateY(00px);
		animation: jlc-cta-up 0s ease forwards;
	}

	.jlc-wp-product-cta {
		display: flex;
	}
}

@media (max-width: 768px) {
	.jlc-card--overlay .jlc-wp-product-content {
		opacity: 1 !important;
		transform: none !important;
		bottom: 0 !important;
	}

	.jlc-card--overlay .jlc-wp-product-media::after {
		opacity: 1 !important;
		display: none;
	}

	.jlc-card--overlay:hover .jlc-wp-product-content {
		opacity: 1 !important;
		transform: none !important;
		display: none !important;
	}

	.jlc-card--overlay .jlc-wp-product-content {
		padding: 2px 4px;
		background: #00000066;
	}
}
