/* Homepage composition; catalog cards continue to share catalog-04.css. */
.ej-home {
	--ej-home-section-space: clamp(48px, 6vw, 80px);
	--ej-home-card-padding: clamp(22px, 3vw, 38px);
	--ej-home-card-border: 3px;
	--ej-home-card-title: clamp(1.8rem, 3vw, 2.65rem);
	--ej-home-collection-gap: clamp(36px, 5vw, 64px);
	--ej-home-heading-gap: 20px;
	--ej-home-catalog-columns: 6;
}

.ej-home #descubre,
.ej-home .ej-home-shop {
	padding-block: var(--ej-home-section-space);
}

.ej-home .ej-editorial-pair {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: stretch;
}

.ej-home .ej-editorial-feature {
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: auto 1fr;
	align-items: stretch;
	min-width: 0;
	gap: 0;
}

.ej-home .ej-editorial-feature__media,
.ej-home .ej-editorial-feature--reverse .ej-editorial-feature__media {
	order: 0;
	aspect-ratio: 2 / 1;
	width: 100%;
	object-fit: cover;
}

.ej-home .ej-editorial-feature__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: var(--ej-home-card-padding);
}

.ej-home .ej-editorial-feature__content h3 {
	max-width: none;
	font-size: var(--ej-home-card-title);
}

.ej-home .ej-editorial-feature__content .ej-text-link {
	margin-top: auto;
}

.ej-home-shop.ej-catalog {
	--ej-catalog-columns: var(--ej-home-catalog-columns);
}

.ej-home-shop .ej-section-heading h2 {
	font-size: var(--ej-display-section-compact);
}

.ej-home-shop .ej-section-heading > .ej-text-link {
	justify-self: end;
}

.ej-home-shop__collection + .ej-home-shop__collection {
	margin-top: var(--ej-home-collection-gap);
	padding-top: var(--ej-home-collection-gap);
	border-top: var(--ej-home-card-border) solid var(--ej-ink);
}

.ej-home-shop__heading {
	margin-bottom: var(--ej-home-heading-gap);
}

.ej-home-shop__heading h3 {
	margin-bottom: var(--ej-home-heading-gap);
}

.ej-home-shop__heading p {
	margin: 0;
	color: var(--ej-muted);
}

@media (max-width: 1199px) {
	.ej-home { --ej-home-catalog-columns: 4; }
}

@media (max-width: 800px) {
	.ej-home { --ej-home-catalog-columns: 3; }
	.ej-home .ej-editorial-pair { grid-template-columns: minmax(0, 1fr); }
	.ej-home .ej-editorial-feature + .ej-editorial-feature {
		border-left: 0;
		border-top: var(--ej-home-card-border) solid var(--ej-ink);
	}
	.ej-home-shop .ej-section-heading > .ej-text-link { justify-self: start; }
}

@media (max-width: 600px) {
	.ej-home { --ej-home-catalog-columns: 2; }
}

@media (max-width: 359px) {
	.ej-home { --ej-home-catalog-columns: 1; }
}
