/**
 * MaxFurn content: pages built from blocks and patterns (home, About,
 * Contact, Showrooms, policies), the blog, articles and 404.
 * Loaded on content pages only (and in the block editor). Block-specific
 * styles live in assets/css/blocks/ and load only where the block is used.
 */

/* ---------- Page frame ---------- */

/* The homepage starts with the hero, straight under the header. */
.site-main:has(> .mf-home) {
	padding-top: 0;
}

.mf-home,
.mf-page__content,
.mf-article__content {
	padding-inline: var(--mf-gutter);
}

.mf-home {
	padding-bottom: var(--mf-section-gap);
}

.mf-page__content {
	padding-block: 40px var(--mf-section-gap);
}

/* Full-width sections run edge to edge inside the padded content. */
.mf-home > .alignfull,
.mf-page__content > .alignfull {
	width: auto;
	max-width: none;
	margin-inline: calc(-1 * var(--mf-gutter)) !important;
}

.mf-section,
.mf-home > .alignwide,
.mf-page__content > .alignwide {
	margin-block: var(--mf-section-gap) 0;
}

.mf-home > :first-child,
.mf-page__content > :first-child {
	margin-top: 0;
}

.mf-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	margin-bottom: 24px;
}

.mf-section-title,
.entry-content .mf-section-title {
	margin: 0 0 24px;
	font-size: var(--wp--preset--font-size--x-large);
}

.mf-section-head .mf-section-title {
	margin: 0;
}

.mf-section-title--center {
	text-align: center;
}

.mf-section-link {
	color: var(--mf-ink);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.mf-section-link:hover {
	color: var(--mf-red);
}

.mf-lead {
	color: var(--mf-ink);
	font-size: 1.125rem;
}

/* Prose (policy pages, articles). */
.entry-content > p,
.entry-content > ul,
.entry-content > ol {
	line-height: 1.75;
}

.entry-content > h2 {
	margin-top: 2em;
}

/* Plain links inside text only (not buttons, cards or chips). */
.entry-content :is(p, .wp-block-list li) a:not([class]) {
	color: var(--mf-ink);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* ---------- Buttons (core Buttons block) ---------- */

.wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	min-height: var(--mf-tap);
	text-decoration: none;
}

.wp-block-button__link:hover {
	background: var(--mf-ink);
	color: var(--mf-surface);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border: 2px solid var(--mf-ink);
	background: transparent;
	color: var(--mf-ink);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--mf-ink);
	color: var(--mf-surface);
}

.wp-block-button.is-style-light .wp-block-button__link {
	background: var(--mf-surface);
	color: var(--mf-ink);
}

.wp-block-button.is-style-outline-light .wp-block-button__link {
	border: 2px solid var(--mf-surface);
	background: transparent;
	color: var(--mf-surface);
}

.wp-block-button.is-style-light .wp-block-button__link:hover,
.wp-block-button.is-style-outline-light .wp-block-button__link:hover {
	background: var(--mf-ink);
	border-color: var(--mf-ink);
	color: var(--mf-surface);
}

/* ---------- Service strip ---------- */

.mf-service-strip {
	padding-block: 24px;
	background: var(--mf-surface);
}

.mf-home > .mf-service-strip {
	margin-top: 0;
}

.mf-service-strip > * {
	max-width: var(--wp--style--global--wide-size) !important;
}

.mf-service-strip__list.wp-block-columns {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px 24px;
	margin: 0;
}

@media (min-width: 960px) {
	.mf-service-strip__list.wp-block-columns {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.mf-service {
	position: relative;
	min-height: 48px;
	padding-left: 60px;
}

.mf-service p {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--mf-muted);
}

.mf-service .mf-service__title {
	color: var(--mf-ink);
	font-family: var(--mf-font-heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 500;
}

.mf-service::before {
	position: absolute;
	top: 0;
	left: 0;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--mf-tint);
	content: "";
}

.mf-service::after {
	position: absolute;
	top: 12px;
	left: 12px;
	width: 24px;
	height: 24px;
	background: var(--mf-red);
	-webkit-mask: var(--mf-icon) center / contain no-repeat;
	mask: var(--mf-icon) center / contain no-repeat;
	content: "";
}

/* Lucide icons (ISC licence, assets/icons/), as CSS masks. */
.mf-service--delivery {
	--mf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2'/%3E%3Cpath d='M15 18H9'/%3E%3Cpath d='M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14'/%3E%3Ccircle cx='17' cy='18' r='2'/%3E%3Ccircle cx='7' cy='18' r='2'/%3E%3C/svg%3E");
}

.mf-service--install {
	--mf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E");
}

.mf-service--store {
	--mf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7'/%3E%3Cpath d='M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8'/%3E%3Cpath d='M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4'/%3E%3Cpath d='M2 7h20'/%3E%3C/svg%3E");
}

.mf-service--expert {
	--mf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.9 20A9 9 0 1 0 4 16.1L2 22Z'/%3E%3C/svg%3E");
}

.mf-service a {
	color: inherit;
}

/* ---------- Room tiles ---------- */

.mf-rooms__grid {
	display: grid;
	grid-auto-columns: minmax(150px, 1fr);
	grid-auto-flow: column;
	gap: 16px;
	overflow-x: auto;
	padding-bottom: 8px;
	scroll-snap-type: x mandatory;
}

@media (min-width: 960px) {
	.mf-rooms__grid {
		grid-auto-flow: row;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		overflow: visible;
	}
}

.mf-room-tile.wp-block-image {
	position: relative;
	margin: 0;
	overflow: hidden;
	border-radius: var(--mf-radius-card);
	scroll-snap-align: start;
}

.mf-room-tile img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.mf-room-tile a:hover img,
.mf-room-tile a:focus-visible img {
	transform: scale(1.04);
}

.mf-room-tile .wp-element-caption {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	margin: 0;
	padding: 48px 16px 16px;
	background: linear-gradient(to top, rgb(0 0 0 / 70%), transparent);
	color: var(--mf-surface);
	font-family: var(--mf-font-heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 500;
	pointer-events: none;
}

.mf-room-tile .wp-element-caption::after {
	display: block;
	width: 32px;
	height: 2px;
	margin-top: 8px;
	background: var(--mf-red);
	content: "";
}

/* ---------- Collections (masonry) ---------- */

.mf-collections__grid {
	columns: 2;
	column-gap: 16px;
}

@media (min-width: 960px) {
	.mf-collections__grid {
		columns: 3;
		column-gap: 24px;
	}
}

.mf-collection-tile.wp-block-image {
	margin: 0 0 16px;
	overflow: hidden;
	border-radius: var(--mf-radius-card);
	break-inside: avoid;
}

@media (min-width: 960px) {
	.mf-collection-tile.wp-block-image {
		margin-bottom: 24px;
	}
}

.mf-collection-tile img {
	display: block;
	width: 100%;
	height: auto;
}

.mf-collection-tile:nth-child(3n + 1) img {
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

/* ---------- Collection of the week ---------- */

.mf-week__columns.wp-block-columns {
	gap: 24px;
}

@media (max-width: 781px) {
	.mf-week__image {
		display: none;
	}
}

.mf-week__photo.wp-block-image {
	height: 100%;
	margin: 0;
	overflow: hidden;
	border-radius: var(--mf-radius-card);
}

.mf-week__photo a {
	display: block;
	height: 100%;
}

.mf-week__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---------- SEO text ---------- */

.mf-seo {
	color: var(--mf-muted);
}

.mf-seo .mf-section-title {
	font-size: var(--wp--preset--font-size--x-large);
}

.mf-seo__more summary {
	display: inline-flex;
	align-items: center;
	min-height: var(--mf-tap);
	color: var(--mf-ink);
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

/* ---------- Call-to-action banner ---------- */

.mf-cta {
	padding: 48px 24px;
	border-radius: var(--mf-radius-panel);
	background: var(--mf-red);
	color: var(--mf-surface);
	text-align: center;
}

.mf-cta .mf-cta__title,
.mf-cta .mf-cta__text {
	color: var(--mf-surface);
}

.mf-cta .mf-cta__title {
	margin: 0 0 8px;
}

.mf-cta__buttons {
	justify-content: center;
	margin-top: 20px;
}

/* ---------- About ---------- */

.mf-about-intro__columns.wp-block-columns {
	gap: 32px;
	align-items: center;
}

.mf-about-intro__photos {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.mf-about-photo.wp-block-image {
	margin: 0;
	overflow: hidden;
	border-radius: var(--mf-radius-card);
}

.mf-about-photo img {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}

.mf-about-photo:nth-child(2) {
	margin-top: 48px;
}

.mf-values__list.wp-block-columns {
	gap: 24px;
}

.mf-value-card {
	padding: 28px;
	border-radius: var(--mf-radius-card);
	background: var(--mf-surface);
}

.mf-value-card h3 {
	margin-top: 0;
}

/* ---------- Contact ---------- */

.mf-contact__columns.wp-block-columns {
	gap: 24px;
	align-items: flex-start;
}

.mf-contact__form,
.mf-faq {
	padding: 28px;
	border-radius: var(--mf-radius-card);
	background: var(--mf-surface);
}

@media (max-width: 639px) {
	.mf-contact__form,
	.mf-faq {
		padding: 20px 16px;
	}
}

.mf-faq > h2 {
	margin-top: 0;
	font-size: var(--wp--preset--font-size--x-large);
}

.mf-faq__item {
	border-bottom: 1px solid var(--mf-border);
}

.mf-faq__item summary {
	position: relative;
	display: flex;
	align-items: center;
	min-height: var(--mf-tap);
	padding: 14px 32px 14px 0;
	color: var(--mf-ink);
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}

.mf-faq__item summary::-webkit-details-marker {
	display: none;
}

.mf-faq__item summary::after {
	position: absolute;
	right: 4px;
	color: var(--mf-red);
	font-size: 1.5rem;
	font-weight: 400;
	content: "+";
}

.mf-faq__item[open] summary::after {
	content: "−";
}

.mf-faq__item p {
	margin: 0 0 16px;
}

/* ---------- Blog ---------- */

.mf-blog {
	padding-block: 40px var(--mf-section-gap);
}

.mf-blog__intro {
	max-width: 800px;
	margin: 0 auto 32px;
	text-align: center;
}

.mf-post-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
}

@media (min-width: 640px) {
	.mf-post-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.mf-post-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.mf-post-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border-radius: var(--mf-radius-card);
	background: var(--mf-surface);
}

.mf-post-card__media {
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--mf-topbar);
}

.mf-post-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mf-post-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 8px;
	padding: 20px;
}

.mf-post-card__meta,
.mf-post-card__excerpt {
	margin: 0;
	color: var(--mf-muted);
	font-size: var(--wp--preset--font-size--small);
}

.mf-post-card__title {
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.35;
}

.mf-post-card__title a {
	color: var(--mf-ink);
	text-decoration: none;
}

.mf-post-card__title a:hover {
	color: var(--mf-red);
	text-decoration: underline;
}

/* ---------- Article ---------- */

.mf-article__header {
	max-width: 880px;
	padding-top: 24px;
}

.mf-article__title {
	margin: 16px 0 12px;
	font-size: var(--wp--preset--font-size--xx-large);
}

.mf-article__meta {
	margin: 0 0 24px;
	color: var(--mf-muted);
	font-size: var(--wp--preset--font-size--small);
}

.mf-article__meta a {
	color: inherit;
}

.mf-article__image {
	max-width: 1008px;
	margin: 0 auto 32px;
}

.mf-article__image img {
	width: 100%;
	height: auto;
	border-radius: var(--mf-radius-card);
}

.mf-article__content {
	padding-bottom: 32px;
}

.mf-article__shop {
	max-width: 880px;
	margin-bottom: 32px;
	padding-top: 24px;
	border-top: 1px solid var(--mf-border);
}

.mf-article__shop-title {
	margin: 0 0 12px;
	font-size: var(--wp--preset--font-size--large);
}

.post-navigation {
	max-width: 880px;
	margin: 0 auto var(--mf-section-gap);
}

.post-navigation .nav-links {
	display: grid;
	gap: 16px;
}

@media (min-width: 640px) {
	.post-navigation .nav-links {
		grid-template-columns: 1fr 1fr;
	}

	.post-navigation .nav-next {
		text-align: right;
	}
}

.post-navigation a {
	display: block;
	padding: 16px;
	border-radius: var(--mf-radius-card);
	background: var(--mf-surface);
	color: var(--mf-ink);
	text-decoration: none;
}

.post-navigation__label {
	display: block;
	color: var(--mf-muted);
	font-size: var(--wp--preset--font-size--small);
}

/* ---------- 404 ---------- */

.mf-404 {
	padding-block: 40px var(--mf-section-gap);
}

.mf-404__card {
	max-width: 720px;
	margin: 0 auto;
	padding: 32px;
	border-radius: var(--mf-radius-card);
	background: var(--mf-surface);
}

@media (max-width: 639px) {
	.mf-404__card {
		padding: 20px 16px;
	}
}

.mf-404__title {
	margin-top: 0;
}

.mf-404__subtitle {
	margin: 28px 0 12px;
	font-size: var(--wp--preset--font-size--large);
}

.mf-404__search .mf-search {
	max-width: 520px;
}

.mf-404__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.mf-404__links a {
	display: inline-flex;
	align-items: center;
	min-height: var(--mf-tap);
	color: var(--mf-ink);
	font-weight: 600;
}

/* Wide sections: their content uses the full wide width, not the 800px text width. */
.mf-rooms > *,
.mf-collections > *,
.mf-week > *,
.mf-video-section > *,
.mf-about-intro > *,
.mf-values > *,
.mf-contact > *,
.mf-cta > * {
	max-width: var(--wp--style--global--wide-size) !important;
}
