/*
 * Homepage hero slide ([hms_hero_slide]). Two columns inside Woodmart's slide
 * content box: text left, product image right. Colours and fonts come from
 * the Woodmart variables so the slide follows the theme settings.
 */

.hms-hero-slide {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: 40px;
	min-height: 420px;
	padding: 30px 0;
	text-align: start;
}

.hms-hero-slide__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

.hms-hero-slide__eyebrow {
	margin: 0 0 12px;
	color: var(--wd-primary-color);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-transform: uppercase;
}

.hms-hero-slide__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	margin: 0 0 16px;
	font-family: var(--wd-title-font);
	font-size: 30px;
	font-weight: 600;
	line-height: 1.25;
}

.hms-hero-slide__title a {
	color: var(--wd-title-color);
}

.hms-hero-slide__title a:hover {
	color: var(--wd-primary-color);
}

.hms-hero-slide__subtitle {
	margin: -6px 0 16px;
	color: var(--wd-title-color);
	font-size: 17px;
	line-height: 1.4;
}

.hms-hero-slide__benefits {
	margin: 0 0 22px;
	padding: 0;
	list-style: none;
}

.hms-hero-slide__benefits li {
	position: relative;
	margin: 0 0 9px;
	padding-left: 30px;
	color: var(--wd-text-color);
	font-size: 15px;
	line-height: 1.5;
}

.hms-hero-slide__benefits li::before {
	content: "\2713";
	position: absolute;
	top: 1px;
	left: 0;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--wd-primary-color) 14%, #fff);
	color: var(--wd-primary-color);
	font-size: 12px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
}

.hms-hero-slide__summary {
	margin: 0 0 22px;
	color: var(--wd-text-color);
	font-size: 15px;
	line-height: 1.6;
}

.hms-hero-slide__price {
	margin: 0 0 22px;
}

.hms-hero-slide__amount,
.hms-hero-slide__amount .amount {
	color: var(--wd-title-color);
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
}

.hms-hero-slide__amount del,
.hms-hero-slide__amount del .amount {
	margin-right: 8px;
	color: var(--wd-text-color);
	font-size: 18px;
	font-weight: 400;
}

.hms-hero-slide__amount ins {
	text-decoration: none;
}

.hms-hero-slide__legal {
	display: block;
	margin-top: 4px;
	color: var(--wd-text-color);
	font-size: 12px;
	line-height: 1.4;
}

.hms-hero-slide__legal a {
	color: inherit;
	text-decoration: underline;
}

/* Woodmart's accented (green) button, as used by the shop's add-to-cart buttons. */
.hms-hero-slide__cta.button {
	padding-inline: 28px;
	border-radius: var(--btn-accented-brd-radius, 0);
	background-color: var(--btn-accented-bgcolor);
	color: var(--btn-accented-color, #fff);
}

.hms-hero-slide__cta.button:hover {
	background-color: var(--btn-accented-bgcolor-hover, var(--btn-accented-bgcolor));
	color: var(--btn-accented-color-hover, #fff);
}

.hms-hero-slide__media {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 380px;
	border-radius: 20px;
	background: #f4f7ef;
}

.hms-hero-slide__image {
	width: auto;
	max-width: 82%;
	height: auto;
	max-height: 320px;
	object-fit: contain;
	/* Product shots have white backgrounds; let them sit on the panel. */
	mix-blend-mode: multiply;
	transition: transform 0.4s ease;
}

.hms-hero-slide__media:hover .hms-hero-slide__image {
	transform: scale(1.03);
}

@media (max-width: 1024px) {
	.hms-hero-slide {
		gap: 28px;
		min-height: 0;
		padding: 24px 0;
	}

	.hms-hero-slide__title {
		font-size: 26px;
	}

	.hms-hero-slide__media {
		height: 320px;
	}
}

@media (max-width: 767px) {
	.hms-hero-slide {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
		/* Side space: on phones Woodmart's slide content box has none. */
		padding: 16px 16px 40px;
	}

	.hms-hero-slide__content {
		transform: none;
	}

	.hms-hero-slide__media {
		order: -1;
		height: 240px;
	}

	.hms-hero-slide__image {
		max-height: 200px;
	}

	.hms-hero-slide__title {
		font-size: 22px;
	}

	.hms-hero-slide__amount,
	.hms-hero-slide__amount .amount {
		font-size: 24px;
	}
}

/*
 * Entrance animation, replayed whenever Woodmart activates a slide (as the
 * previous per-widget Elementor animations did): image slides in from the
 * right, text lines rise in one after another.
 */
@keyframes hms-hero-rise {
	from {
		opacity: 0;
		transform: translateY(24px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes hms-hero-slide-in {
	from {
		opacity: 0;
		transform: translateX(60px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.wd-carousel.wd-initialized .wd-slide.wd-active .hms-hero-slide__content > * {
	animation: hms-hero-rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.wd-carousel.wd-initialized .wd-slide.wd-active .hms-hero-slide__content > :nth-child(1) { animation-delay: 0.25s; }
.wd-carousel.wd-initialized .wd-slide.wd-active .hms-hero-slide__content > :nth-child(2) { animation-delay: 0.33s; }
.wd-carousel.wd-initialized .wd-slide.wd-active .hms-hero-slide__content > :nth-child(3) { animation-delay: 0.41s; }
.wd-carousel.wd-initialized .wd-slide.wd-active .hms-hero-slide__content > :nth-child(4) { animation-delay: 0.49s; }
.wd-carousel.wd-initialized .wd-slide.wd-active .hms-hero-slide__content > :nth-child(5) { animation-delay: 0.57s; }
.wd-carousel.wd-initialized .wd-slide.wd-active .hms-hero-slide__content > :nth-child(6) { animation-delay: 0.65s; }

.wd-carousel.wd-initialized .wd-slide.wd-active .hms-hero-slide__media {
	animation: hms-hero-slide-in 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both;
}

@media (prefers-reduced-motion: reduce) {
	.wd-carousel.wd-initialized .wd-slide.wd-active .hms-hero-slide__content > *,
	.wd-carousel.wd-initialized .wd-slide.wd-active .hms-hero-slide__media {
		animation: none;
	}
}
