/* Catalog home */

.aimeos.catalog-home {
	margin-top: calc(-1rem - 80px);
}

.catalog-home .stage-item {
	background-color: var(--ai-bg);
	color: var(--ai-bg);
	margin: 0;
}

.catalog-home .stage-image {
	min-height: 600px;
	object-fit: cover;
	padding: 0;
}

.catalog-home .stage-text {
	position: absolute;
	font-size: 200%;
	margin: 0 5%;
	top: 33%;
	text-align: start;
	color: var(--ai-bg);
}

.catalog-home .stage-text .btn {
	background-color: transparent;
	border-color: var(--ai-bg);
	color: var(--ai-bg);
	border-width: 2px;
	font-weight: normal;
	margin-top: 1rem;
	font-size: 50%;
	width: 12rem;
}

@media (min-width:576px) {
	.catalog-home .stage-text {
		max-width: 66%;
	}
}

@media (min-width:768px) {
	.catalog-home .stage-text {
		max-width: 50%;
		font-size: 225%;
	}
}

@media (min-width:992px) {
	.aimeos.catalog-home {
		margin-top: calc(-7rem - 50px);
	}
	.catalog-home .stage-text {
		max-width: 40%;
	}
}

@media (min-width:1200px) {
	.catalog-home .stage-text {
		max-width: 35%;
		font-size: 250%;
	}
}

/* Home hero slider: subtle zoom on active slide + text reveal (Swiffy adds .slide-visible) */
@media (prefers-reduced-motion: no-preference) {
	.aimeos.catalog-home.swiffy-slider .slider-container > .home-item .home-stage {
		overflow: hidden;
	}

	.aimeos.catalog-home.swiffy-slider .slider-container > .home-item .stage-image {
		transform: scale(1);
		transform-origin: 50% 42%;
	}

	.aimeos.catalog-home.swiffy-slider .slider-container > .home-item.slide-visible .stage-image {
		animation: ce-catalog-home-kenburns 3.9s ease-out forwards;
	}

	.aimeos.catalog-home.swiffy-slider .slider-container > .home-item:not(.slide-visible) .stage-image {
		animation: none;
	}

	@keyframes ce-catalog-home-kenburns {
		0% {
			transform: scale(1);
		}
		100% {
			transform: scale(1.08);
		}
	}

	.aimeos.catalog-home.swiffy-slider .slider-container > .home-item .stage-text {
		opacity: 0;
		transform: translateY(0.85rem);
		transition: opacity 0.55s ease 0.12s, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.12s;
	}

	.aimeos.catalog-home.swiffy-slider .slider-container > .home-item.slide-visible .stage-text {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Fallback hero slides when no "stage" media is configured (gradient + category title) */
.catalog-home.ce-home-slider-fallback .ce-home-slide-fallback {
	min-height: 600px;
	width: 100%;
	background: linear-gradient(135deg, #1e3a2f 0%, #2d5a47 40%, #3d7a5c 100%);
}

.catalog-home.ce-home-slider-fallback .ce-home-slide-fallback--root {
	background: linear-gradient(135deg, #2a2520 0%, #4a4035 45%, #6b5c48 100%);
}

.catalog-home.ce-home-slider-fallback .ce-home-slide-fallback--alt {
	background: linear-gradient(135deg, #1a2744 0%, #2c4a6e 50%, #3e5c82 100%);
}

/* Home: products by category (below slider) */
.ce-home-category-blocks {
	padding: 2rem 0 3rem;
	background: var(--ai-bg-alt, #f6f7f8);
}

.ce-home-cat-block {
	padding: 1.75rem 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ce-home-cat-block:last-child {
	border-bottom: none;
}

.ce-home-cat-block__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem 1rem;
	margin-bottom: 1.25rem;
}

.ce-home-cat-block__title {
	margin: 0;
	font-size: clamp(1.15rem, 2.5vw, 1.5rem);
	font-weight: 600;
	letter-spacing: 0.02em;
}

.ce-home-cat-block__more {
	font-size: 0.9rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	border-bottom: 2px solid currentColor;
	padding-bottom: 0.1rem;
}

.ce-home-cat-block__more:hover {
	opacity: 0.85;
}

.ce-home-cat-block__grid.catalog-list-items {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: flex-start;
}

.ce-home-cat-block__grid .product.row {
	width: calc(50% - 0.5rem);
	max-width: 16rem;
	margin: 0;
}

@media (min-width: 576px) {
	.ce-home-cat-block__grid .product.row {
		width: calc(33.333% - 0.67rem);
	}
}

@media (min-width: 992px) {
	.ce-home-cat-block__grid .product.row {
		width: calc(25% - 0.75rem);
	}
}

/* --------------------------------------------------------------------------
   Home category product rows: card UI + motion (CareEarth)
   Respects prefers-reduced-motion
   -------------------------------------------------------------------------- */

.ce-home-cat-block--products .ce-home-cat-block__container {
	position: relative;
}

.ce-home-cat-block--products .ce-home-cat-block__head {
	margin-bottom: 1.5rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid rgba(45, 90, 71, 0.12);
}

.ce-home-cat-block--products .ce-home-cat-block__title {
	position: relative;
	display: inline-block;
}

.ce-home-cat-block--products .ce-home-cat-block__title-text {
	position: relative;
	z-index: 1;
}

.ce-home-cat-block--products .ce-home-cat-block__title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -0.35rem;
	width: 100%;
	max-width: 4rem;
	height: 3px;
	border-radius: 3px;
	background: linear-gradient(90deg, var(--ai-secondary, #b8a050), var(--ai-primary, #2d5a47));
	opacity: 0.85;
	transform: scaleX(0.35);
	transform-origin: left center;
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.ce-home-cat-block--products:hover .ce-home-cat-block__title::after {
	transform: scaleX(1);
}

.ce-home-cat-block--products .ce-home-cat-block__more {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 1rem 0.45rem 1.1rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid rgba(45, 90, 71, 0.15);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
	text-decoration: none;
	border-bottom: none;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--ai-primary, #2d5a47);
	transition:
		transform 0.28s ease,
		box-shadow 0.28s ease,
		background 0.28s ease;
}

.ce-home-cat-block--products .ce-home-cat-block__more-icon {
	display: inline-block;
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.ce-home-cat-block--products .ce-home-cat-block__more:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(45, 90, 71, 0.12);
	background: #fff;
}

.ce-home-cat-block--products .ce-home-cat-block__more:hover .ce-home-cat-block__more-icon {
	transform: translateX(4px);
}

/* Grid: even columns, card-friendly (up to 8 per row on wide viewports) */
.ce-home-cat-block__grid--cards.catalog-list-items {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	align-items: stretch;
}

@media (min-width: 576px) {
	.ce-home-cat-block__grid--cards.catalog-list-items {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 1.1rem;
	}
}

@media (min-width: 992px) {
	.ce-home-cat-block__grid--cards.catalog-list-items {
		grid-template-columns: repeat(6, minmax(0, 1fr));
		gap: 1.2rem;
	}
}

@media (min-width: 1400px) {
	.ce-home-cat-block__grid--cards.catalog-list-items {
		grid-template-columns: repeat(8, minmax(0, 1fr));
		gap: 1rem;
	}
}

.ce-home-cat-block__grid--cards .product.row {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0;
	--bs-gutter-x: 0;
	--bs-gutter-y: 0;
	height: 100%;
	box-sizing: border-box;
}

/* Product card shell */
.ce-home-cat-block__grid--cards .product.ce-pro-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border-radius: 1rem;
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, 0.06);
	box-shadow:
		0 4px 18px rgba(15, 35, 25, 0.06),
		0 1px 3px rgba(0, 0, 0, 0.04);
	transition:
		transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.38s cubic-bezier(0.22, 1, 0.36, 1),
		border-color 0.3s ease;
}

.ce-home-cat-block__grid--cards .product.ce-pro-card:hover {
	transform: translateY(-6px);
	box-shadow:
		0 18px 42px rgba(15, 35, 25, 0.12),
		0 6px 14px rgba(0, 0, 0, 0.06);
	border-color: rgba(45, 90, 71, 0.18);
}

/* Media: consistent frame + zoom */
.ce-home-cat-block__grid--cards .ce-pro-card .list-column:first-child .media-list {
	display: block;
	position: relative;
	aspect-ratio: 1;
	background: linear-gradient(145deg, #eef2ef 0%, #e4ebe6 100%);
	overflow: hidden;
}

.ce-home-cat-block__grid--cards .ce-pro-card .media-item {
	height: 100%;
}

.ce-home-cat-block__grid--cards .ce-pro-card .media-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.ce-home-cat-block__grid--cards .ce-pro-card:hover .media-item img {
	transform: scale(1.07);
}

/* Text block padding */
.ce-home-cat-block__grid--cards .ce-pro-card .list-column:last-child {
	padding: 0.85rem 1rem 1.1rem;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
}

.ce-home-cat-block__grid--cards .ce-pro-card .text-list .name {
	font-size: 0.92rem;
	line-height: 1.35;
	margin-top: 0.25rem;
	transition: color 0.25s ease;
}

.ce-home-cat-block__grid--cards .ce-pro-card:hover .text-list .name {
	color: var(--ai-primary, #2d5a47);
}

.ce-home-cat-block__grid--cards .ce-pro-card .price-list {
	margin-top: auto;
	padding-top: 0.5rem;
}

.ce-home-cat-block__grid--cards .ce-pro-card .price {
	font-weight: 600;
	letter-spacing: 0.02em;
}

/* Staggered entrance (uses --ce-n from products partial) */
@media (prefers-reduced-motion: no-preference) {
	.ce-home-cat-block__grid--cards .product.ce-pro-card {
		animation: ce-home-card-enter 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
		animation-delay: calc(var(--ce-n, 0) * 70ms);
	}

	@keyframes ce-home-card-enter {
		from {
			opacity: 0;
			transform: translateY(22px);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	.ce-home-cat-block__grid--cards .product.ce-pro-card,
	.ce-home-cat-block--products .ce-home-cat-block__more,
	.ce-home-cat-block__grid--cards .ce-pro-card .media-item img {
		animation: none !important;
		transition: none;
	}

	.ce-home-cat-block--products .ce-home-cat-block__title::after {
		transition: none;
		transform: scaleX(1);
	}
}
