/*
 * The front-page pattern uses the same palette and typefaces as the
 * storefront.
 */
.fdm-home {
	--home-gutter: clamp(16px, 3vw, 40px);
	color: var(--wp--preset--color--text);
	font-family: var(--fdm-body);
}

.fdm-home *,
.fdm-home *::before,
.fdm-home *::after {
	box-sizing: border-box;
}

.fdm-home :where(h1, h2, h3, p, figure),
.fdm-home.is-layout-flow > *,
.fdm-home .wp-block-group.is-layout-flow > * {
	margin-block: 0;
}

.fdm-home img {
	display: block;
	max-width: 100%;
}

.fdm-home .home-container {
	width: min(1250px, calc(100% - 2 * var(--home-gutter)));
	margin-inline: auto;
}

.fdm-home a {
	color: inherit;
}

.fdm-home :is(.home-cta, .home-buttons .wp-block-button__link) {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	padding: 8px 16px;
	min-height: 40px;
	width: min(100%, 280px);
	border-radius: 999px;
	color: var(--wp--preset--color--on-brand);
	background: var(--wp--preset--color--brand);
	text-align: center;
	text-decoration: none;
	font: 600 16px/24px var(--fdm-body);
}

.fdm-home :is(.home-cta, .home-buttons .wp-block-button__link):hover {
	background: var(--wp--preset--color--hover);
}

.fdm-home .home-hero {
	position: relative;
	isolation: isolate;
	display: grid;
	align-items: center;
	min-height: clamp(410px, 54.7222vw, 788px);
}

.home-hero picture {
	position: absolute;
	inset: 0;
	z-index: -1;
}

.home-hero img,
.home-category img,
.home-card-media img,
.home-panel-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.home-hero-copy {
	margin-inline: clamp(20px, 2.66vw, 52px);
	max-width: min(42%, 510px);
}

.home-hero h1 {
	font: 600 clamp(36px, 3.62vw, 52px)/1.154 var(--fdm-editorial);
}

.fdm-home :is(.home-cta-light, .home-action-light .wp-block-button__link) {
	background: var(--wp--preset--color--canvas);
	color: var(--wp--preset--color--text);
	width: min(100%, 189px);
	margin-top: 16px;
	min-height: 48px;
	font-size: 18px;
	letter-spacing: 0.76px;
}

.fdm-home :is(.home-cta-light, .home-action-light .wp-block-button__link):hover {
	background: var(--wp--preset--color--surface);
}

.home-products,
.home-categories,
.home-occasions,
.home-faq {
	text-align: center;
}

.home-products h2,
.home-categories h2,
.home-occasions h2 {
	font: 600 clamp(18px, 1.806vw, 26px)/1.2 var(--fdm-editorial);
	letter-spacing: 0.115em;
	text-transform: uppercase;
}

.home-section-heading p {
	margin: 12px auto 0;
	max-width: 42rem;
	font-size: 17px;
	line-height: 26px;
}

.home-featured {
	padding-block: 72px var(--wp--preset--spacing--section);
}

.home-gifts,
.home-categories,
.home-occasions {
	padding-block: var(--wp--preset--spacing--section);
}

.home-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 36px 24px;
	text-align: start;
}

.fdm-home .home-featured .home-grid {
	margin-top: 40px;
}

.fdm-home :is(.home-gifts, .home-categories) .home-grid,
.fdm-home .home-products :is(.home-cta, .home-buttons .wp-block-button__link) {
	margin-top: 32px;
}

.fdm-home .home-featured :is(.home-cta, .home-buttons .wp-block-button__link) {
	width: min(330px, 100%);
}

.home-card {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.home-card-link {
	display: grid;
	gap: 11px;
	text-decoration: none;
}

.home-card-media {
	position: relative;
	aspect-ratio: 1;
	display: block;
	overflow: hidden;
	border-radius: 8px;
	outline: 1px solid var(--wp--preset--color--border);
	outline-offset: -1px;
}

.home-card-title {
	font: 600 16px/22px var(--fdm-body);
	overflow-wrap: anywhere;
}

.home-card-actions {
	display: flex;
	margin-top: auto;
	align-items: center;
	justify-content: space-between;
	gap: 4px;
	padding-top: 5px;
}

.home-card-actions .price {
	font: 600 16px/20px var(--fdm-body);
}

.home-add {
	display: grid;
	place-items: center;
	max-width: 55%;
	min-width: min(88px, 48%);
	min-height: 40px;
	border: 1px solid var(--wp--preset--color--field-border);
	border-radius: 99px;
	padding: 4px 8px;
	text-decoration: none;
	font: 600 13px/1.2 var(--fdm-body);
	text-align: center;
}

.home-card::before {
	content: "";
	position: absolute;
	inset: -8px -8px -10px;
	z-index: -1;
	pointer-events: none;
	border-radius: 16px;
	background: var(--wp--preset--color--surface);
	opacity: 0;
}

.home-card-link:is(:hover, :focus-visible) {
	text-decoration: none;
}

.home-card:has(.home-card-link:focus-visible)::before {
	opacity: 1;
}

.home-card .home-add {
	background-color: var(--wp--preset--color--canvas);
}

.home-card-alternate {
	position: absolute;
	inset: 0;
	opacity: 0;
	pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {

	.home-card:hover:not(:has(.home-card-actions a:hover))::before {
		opacity: 1;
	}

	.home-card:hover:not(:has(.home-card-actions a:hover)) .home-card-title {
		color: var(--wp--preset--color--hover);
	}

	.home-card .home-add:hover {
		background-color: color-mix(in srgb, var(--wp--preset--color--brand) 7%, var(--wp--preset--color--canvas));
		text-decoration: none;
	}
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {

	.home-card {
		--card-easing: cubic-bezier(0.2, 0.65, 0.3, 1);
	}

	.home-card::before {
		transition: opacity 140ms var(--card-easing);
	}

	.home-card-media > img {
		transition: transform 220ms var(--card-easing);
	}

	.home-card-media > .home-card-alternate {
		transition: opacity 220ms var(--card-easing);
	}

	.home-card:hover:not(:has(.home-card-actions a:hover)) .home-card-media:not(:has(.home-card-alternate, template)) > img {
		transform: scale(1.025);
	}

	.home-card:hover:not(:has(.home-card-actions a:hover)) .home-card-alternate.is-ready {
		opacity: 1;
	}
}

.home-category {
	display: grid;
	align-content: start;
	gap: 8px;
	text-decoration: none;
	text-align: center;
}

.home-category-media {
	aspect-ratio: 294.5 / 378.4;
	overflow: hidden;
	border-radius: 8px;
}

.home-category-label {
	text-transform: uppercase;
	font: 400 18px/22px var(--fdm-body);
}

.fdm-home .home-panel {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	background: var(--wp--preset--color--surface);
}

.home-panel-image {
	min-width: 0;
	height: 400px;
}

.home-panel-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 32px 40px;
	text-align: center;
}

.home-panel-content h2 {
	font: 600 18px/27px var(--fdm-editorial);
}

.home-panel-content p {
	font: 400 16px/24px var(--fdm-body);
}

.fdm-home .home-panel-content :is(.home-cta, .home-buttons .wp-block-button__link) {
	margin-top: 12px;
	width: min(310px, 100%);
}

.home-panel--studio .home-panel-content {
	grid-column: 1;
	grid-row: 1;
}

.home-panel--studio .home-panel-image {
	grid-column: 2;
	grid-row: 1;
}

.home-panel--arrangements h2 {
	font-family: var(--fdm-body);
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.home-panel--arrangements p {
	font-size: 14px;
}

.fdm-home .home-panel--delivery {
	width: min(1040px, calc(100% - 40px));
	margin: 24px auto 48px;
	grid-template-columns: minmax(0, 680fr) minmax(0, 360fr);
}

.home-panel--delivery .home-panel-image {
	height: 276px;
	grid-column: 2;
	grid-row: 1;
}

.home-panel--delivery .home-panel-content {
	grid-column: 1;
	grid-row: 1;
}

.home-panel--delivery h2 {
	font-size: 36px;
	line-height: 44px;
}

.home-panel--delivery p {
	max-width: 448px;
}

.fdm-home .home-panel--delivery :is(.home-cta, .home-buttons .wp-block-button__link) {
	width: min(224px, 100%);
	font-size: 14px;
}

.fdm-home .home-quick,
.home-occasion-grid,
.home-services > div {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Card, hero and editor scopes share block elements. */
/* stylelint-disable-next-line no-descending-specificity */
.home-quick {
	min-height: 148px;
	padding-block: 20px;
	align-items: center;
}

.home-quick a,
:is(.home-occasion-grid article > a, .home-occasion-grid .home-occasion) {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-decoration: none;
	text-align: center;
}

.home-quick a {
	font: 600 14px/20px var(--fdm-body);
}

.home-quick .home-icon {
	width: 80px;
	height: 80px;
}

.home-occasion-grid {
	margin: 24px 0;
	gap: 24px;
}

:is(.home-occasion-grid article > a, .home-occasion-grid .home-occasion) {
	min-height: 144px;
	justify-content: space-between;
}

.home-occasion-grid h3 {
	font: 600 16px/24px var(--fdm-body);
	text-decoration: underline;
	letter-spacing: 1.6px;
}

.home-occasion-grid p {
	max-width: 38ch;
	font: 400 16px/24px var(--fdm-body);
	letter-spacing: 1.6px;
}

.home-occasion-grid .home-icon {
	width: 32px;
	height: 32px;
}

.home-occasion-next {
	display: none;
}

.fdm-home .home-occasions :is(.home-cta, .home-buttons .wp-block-button__link) {
	width: min(350px, 100%);
}

.home-faq {
	min-height: 202px;
	padding-block: 48px 24px;
}

.home-faq-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.home-faq summary {
	cursor: pointer;
	list-style: none;
	font: 600 14px/20px var(--fdm-body);
}

.home-faq summary::-webkit-details-marker {
	display: none;
}

.home-faq .home-icon {
	display: none;
}

.home-faq p {
	font: 400 12px/20px var(--fdm-body);
	letter-spacing: 1.2px;
	margin-top: 5px;
}

.fdm-home .home-faq > a {
	display: inline-block;
	margin-top: 16px;
	text-decoration: none;
	font: 600 13px/21px var(--fdm-body);
}

.home-services {
	background: var(--wp--preset--color--header);
}

.home-services > div {
	min-height: 76px;
	align-items: center;
}
/* stylelint-disable-next-line no-descending-specificity */
.home-services a {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	text-decoration: none;
	font: 400 14px/20px var(--fdm-body);
}

.home-services img {
	width: 28px;
	height: 28px;
}

.home-category:hover .home-category-label,
.home-quick a:hover,
.home-services a:hover {
	text-decoration: underline;
}

@media (max-width: 767px) {

	.fdm-home {
		--home-gutter: 16px;
	}

	.fdm-home .home-hero {
		min-height: 0;
		aspect-ratio: 4 / 5;
		align-items: start;
	}

	.fdm-home .home-hero .home-hero-copy {
		max-width: calc(100% - 40px);
		margin: 8vw 20px 0;
	}

	.home-hero h1 {
		font-size: 28px;
		line-height: 34px;
	}

	.fdm-home :is(.home-cta, .home-buttons .wp-block-button__link) {
		min-height: 48px;
	}

	.home-featured {
		padding-block: 40px 32px;
	}

	.home-gifts,
	.home-categories,
	.home-occasions {
		padding-block: 32px;
	}

	.home-products h2,
	.home-categories h2,
	.home-occasions h2 {
		font-size: 16px;
		line-height: 22px;
		letter-spacing: 0.1em;
	}

	.home-section-heading p {
		font-size: 14px;
		line-height: 22px;
		max-width: 358px;
	}

	.fdm-home :is(.home-featured, .home-gifts, .home-categories) .home-grid,
	.fdm-home .home-products :is(.home-cta, .home-buttons .wp-block-button__link) {
		margin-top: 24px;
	}
	/* stylelint-disable-next-line no-descending-specificity */
	.home-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 26px 12px;
	}

	.home-card-link {
		gap: 9px;
	}

	.home-card-title {
		font-size: 14px;
		line-height: 19px;
	}

	.home-card-actions .price {
		font-size: 15px;
	}

	.home-add {
		min-width: min(68px, 48%);
		min-height: 44px;
		font-size: 13px;
	}

	.home-gifts .home-card:nth-child(n+3) .home-card-title {
		min-height: 38px;
	}

	.fdm-home .home-featured :is(.home-cta, .home-buttons .wp-block-button__link) {
		width: min(288px, 100%);
	}

	.fdm-home .home-gifts :is(.home-cta, .home-buttons .wp-block-button__link) {
		width: min(250px, 100%);
	}

	.home-category-media {
		aspect-ratio: 173 / 219.4;
	}

	.home-category-label {
		font-size: 16px;
		line-height: 24px;
		min-height: 27px;
		display: grid;
		align-items: center;
	}

	.home-category:nth-child(-n+2) .home-category-label {
		min-height: 54px;
		align-items: start;
	}
	/* stylelint-disable-next-line no-descending-specificity */
	.home-categories .home-grid {
		row-gap: 16px;
	}

	.fdm-home .home-panel {
		grid-template-columns: minmax(0, 1fr);
	}

	.home-panel .home-panel-image {
		grid-column: 1;
		grid-row: 1;
		height: clamp(180px, 51.282vw, 340px);
	}

	.home-panel .home-panel-content {
		grid-column: 1;
		grid-row: 2;
		padding: 32px 16px;
		min-height: 206px;
	}

	.home-panel--studio .home-panel-content {
		min-height: 209px;
	}

	.home-panel-content h2 {
		font-size: 16px;
	}

	.home-panel--studio p {
		font-size: 14px;
	}

	.home-panel--arrangements h2 {
		line-height: 24px;
	}

	.home-panel-content p {
		line-height: 21px;
	}

	.fdm-home .home-panel-content :is(.home-cta, .home-buttons .wp-block-button__link) {
		width: min(280px, 100%);
		margin-top: 4px;
	}

	.home-quick {
		min-height: 111px;
		padding-block: 14px 18px;
		column-gap: 8px;
	}

	.home-quick a {
		gap: 4px;
		font-size: 12px;
		line-height: 17px;
	}

	.home-quick .home-icon {
		width: 58px;
		height: 58px;
	}

	.home-occasion-slider {
		position: relative;
	}

	.home-occasion-grid {
		display: flex;
		margin: 16px 0 24px;
		gap: 0;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	:is(.home-occasion-grid article > a, .home-occasion-grid .home-occasion) {
		padding-inline: 24px;
	}

	.home-occasion-grid p {
		line-height: 24px;
	}

	.home-occasion-next {
		display: grid;
		place-items: center;
		width: 44px;
		height: 48px;
		padding: 0;
		position: absolute;
		right: 0;
		top: 48px;
		border: 0;
		background: transparent;
		cursor: pointer;
	}

	.home-occasion-next img {
		width: 24px;
	}

	.fdm-home .home-occasions :is(.home-cta, .home-buttons .wp-block-button__link) {
		width: min(280px, 100%);
	}

	.home-faq {
		min-height: 232px;
		padding-block: 32px 20px;
	}

	.home-faq-grid,
	.home-services > div {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.home-faq details {
		border-top: 1px solid var(--wp--preset--color--border);
	}

	.home-faq summary {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 18px;
		min-height: 48px;
		align-items: center;
		text-align: center;
		letter-spacing: 0.76px;
	}

	.home-faq .home-icon {
		display: block;
		width: 18px;
		height: 18px;
	}

	.home-faq details[open] .home-icon {
		transform: rotate(90deg);
	}

	.home-faq p {
		text-align: start;
		padding-bottom: 12px;
	}

	.fdm-home .home-panel--delivery {
		margin-block: 16px 32px;
	}

	.home-panel--delivery .home-panel-image {
		height: 170px;
	}

	.home-panel--delivery .home-panel-content {
		min-height: 220px;
	}

	.home-panel--delivery h2 {
		font-size: 28px;
		line-height: 36px;
	}

	.home-panel--delivery p {
		font-size: 14px;
		line-height: 22px;
		max-width: 310px;
	}

	.fdm-home .home-panel--delivery :is(.home-cta, .home-buttons .wp-block-button__link) {
		width: min(240px, 100%);
		font-size: 16px;
	}

	.home-services > div {
		min-height: 162px;
		padding-block: 14px;
	}

	.home-services a {
		justify-content: start;
	}

	.home-services a + a {
		border-top: 1px solid var(--wp--preset--color--border);
	}
}

.fdm-home .home-buttons,
.fdm-home .home-buttons .wp-block-button {
	display: contents;
}

.fdm-home .home-hero-image {
	position: absolute;
	inset: 0;
	height: 100%;
	width: 100%;
	z-index: -1;
	margin: 0;
}

.fdm-home .home-hero-image picture {
	position: static;
}

.fdm-home .home-category,
.fdm-home .home-occasion {
	position: relative;
}
/* stylelint-disable-next-line no-descending-specificity */
.home-category-label a {
	text-decoration: none;
}

.home-category-label a::after,
.home-occasion h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.fdm-home figure.home-icon img {
	width: 100%;
	height: auto;
}

.fdm-home .home-panel-image,
.fdm-home .home-category-media {
	margin-inline: 0;
}

.fdm-home .home-section-heading p {
	margin-block-start: 12px;
}

.fdm-home .home-hero-copy {
	overflow-wrap: anywhere;
}

@media (max-width: 767px) {

	.editor-styles-wrapper .home-hero-image img[src$="/assets/home/hero-desktop.webp"] {
		content: url(../home/hero-mobile.webp);
	}
}

.fdm-home .home-section-heading.wp-block-group > p {
	margin-top: 12px;
}

.fdm-home .home-occasion-slider > .home-occasion-grid {
	margin-block: 24px;
}

.fdm-home .home-panel-content .wp-block-button__link {
	flex: none;
	height: auto;
}

.fdm-home .home-action-light .wp-block-button__link {
	--fdm-rest: var(--wp--preset--color--canvas);
	--fdm-ink: var(--wp--preset--color--brand);
	--fdm-over: var(--wp--preset--color--disabled-surface);
	--fdm-down: var(--wp--preset--color--border);
	--fdm-button-ring: var(--fdm-ring);
}
/* stylelint-disable-next-line no-descending-specificity */
.editor-styles-wrapper .home-hero-image img {
	height: 100% !important;
	object-fit: cover;
}

@media (max-width: 767px) {

	.fdm-home .home-occasion-slider > .home-occasion-grid {
		margin-block: 16px 24px;
	}

	.fdm-home .home-occasion-grid > article {
		flex: 0 0 100%;
	}
}
