/**
 * Portadas promocionales — solo modifica el hero cuando el plugin está activo.
 */

/* Imagen a la derecha (escritorio ancho: 3 columnas del theme) */
@media (min-width: 1101px) {
	.jjpp-hero--image_right .jjpp-hero__wrap {
		grid-template-areas: "copy media gift";
		grid-template-columns: minmax(0, 1fr) minmax(200px, 30%) minmax(260px, 32%);
	}

	.jjpp-hero--image_right .jjpp-hero__copy {
		grid-area: copy;
	}

	.jjpp-hero--image_right .jjpp-hero__media {
		grid-area: media;
	}

	.jjpp-hero--image_right .hero__wrap > .gift {
		grid-area: gift;
	}

	.jjpp-hero--image_right .jjpp-hero__media img {
		border-radius: 14px 0 0 14px;
	}
}

/* Tablet: 2 columnas como el theme — texto | imagen, regalo abajo */
@media (min-width: 821px) and (max-width: 1100px) {
	.jjpp-hero--image_right .jjpp-hero__wrap {
		grid-template-areas: none;
		grid-template-columns: minmax(0, 1fr) minmax(160px, 34%);
	}

	.jjpp-hero--image_right .jjpp-hero__copy {
		grid-column: 1;
		grid-row: 1;
	}

	.jjpp-hero--image_right .jjpp-hero__media {
		grid-column: 2;
		grid-row: 1;
		order: 0;
	}

	.jjpp-hero--image_right .hero__wrap > .gift {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.jjpp-hero--image_right .jjpp-hero__media img {
		border-radius: 14px;
	}
}

/* Móvil: una columna, orden natural del HTML (imagen → texto → regalo) */
@media (max-width: 820px) {
	.jjpp-hero--image_right .jjpp-hero__wrap {
		display: grid;
		grid-template-areas: none;
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.jjpp-hero--image_right .jjpp-hero__copy,
	.jjpp-hero--image_right .jjpp-hero__media,
	.jjpp-hero--image_right .hero__wrap > .gift {
		grid-area: auto;
		grid-column: auto;
		grid-row: auto;
		order: unset;
		max-width: none;
		width: 100%;
	}

	.jjpp-hero--image_right .jjpp-hero__media img {
		border-radius: 14px;
		max-height: none;
		min-height: 0;
		object-fit: contain;
	}
}

/* Apilado arriba / abajo */
.jjpp-hero--image_top .jjpp-hero__wrap,
.jjpp-hero--image_bottom .jjpp-hero__wrap {
	grid-template-columns: 1fr;
	grid-template-areas: none;
}

.jjpp-hero--image_top .jjpp-hero__media,
.jjpp-hero--image_bottom .jjpp-hero__media {
	max-width: min(100%, 42rem);
	margin: 0 auto;
	width: 100%;
}

.jjpp-hero--image_top .jjpp-hero__copy,
.jjpp-hero--image_bottom .jjpp-hero__copy {
	max-width: 42rem;
	margin: 0 auto;
	text-align: center;
}

.jjpp-hero--image_top .jjpp-hero__copy h1,
.jjpp-hero--image_bottom .jjpp-hero__copy h1,
.jjpp-hero--image_top .jjpp-hero__copy p,
.jjpp-hero--image_bottom .jjpp-hero__copy p {
	text-align: center;
}

.jjpp-hero--image_top .jjpp-hero-cta,
.jjpp-hero--image_bottom .jjpp-hero-cta {
	justify-content: center;
}

.jjpp-hero--image_bottom .jjpp-hero__media {
	order: 2;
}

@media (max-width: 820px) {
	.jjpp-hero--image_top .jjpp-hero__wrap,
	.jjpp-hero--image_bottom .jjpp-hero__wrap {
		grid-template-columns: 1fr;
	}

	.jjpp-hero--image_bottom .jjpp-hero__media {
		order: unset;
	}
}

/* Fondo horizontal */
.jjpp-hero--bg_horizontal {
	position: relative;
	padding-top: 0;
}

.jjpp-hero--bg_horizontal::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--jjpp-bg);
	background-size: cover;
	background-position: center;
	z-index: 0;
}

.jjpp-hero--bg_horizontal::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(105deg, rgba(255, 252, 248, 0.94) 0%, rgba(255, 252, 248, 0.78) 45%, rgba(255, 252, 248, 0.35) 100%);
	z-index: 1;
}

.jjpp-hero--bg_horizontal .jjpp-hero__wrap {
	position: relative;
	z-index: 2;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 32%);
}

.jjpp-hero--bg_horizontal .jjpp-hero__copy {
	max-width: 32rem;
}

@media (max-width: 1100px) {
	.jjpp-hero--bg_horizontal .jjpp-hero__wrap {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 780px) {
	.jjpp-hero--bg_horizontal::after {
		background: linear-gradient(180deg, rgba(255, 252, 248, 0.92) 0%, rgba(255, 252, 248, 0.88) 70%);
	}
}