/*
 * FC Hestia Child presentation layer.
 * Hestia supplies the native Hero, containers, typography and button base;
 * these rules add stable FC section classes and the reusable content page.
 */

:root {
	--fc-bg: #f6f2eb;
	--fc-surface: #fffdf9;
	--fc-text: #222320;
	--fc-muted: #6b6b64;
	--fc-primary: #25352f;
	--fc-accent: #8a6849;
	--fc-border: #ded8cf;
	--fc-radius: 4px;
	--fc-content: 1200px;
}

html {
	scroll-behavior: smooth;
}

body {
	background: var(--fc-bg);
	color: var(--fc-text);
	font-size: 16px;
	line-height: 1.65;
	overflow-x: hidden;
}

img,
svg,
video,
iframe {
	max-width: 100%;
}

img {
	height: auto;
}

*:focus-visible {
	outline: 2px solid var(--fc-accent);
	outline-offset: 3px;
}

.fc-homepage-section {
	overflow: hidden;
	position: relative;
}

.fc-homepage-section .container {
	position: relative;
	z-index: 1;
}

.fc-section__heading {
	margin: 0 auto 2.25rem;
	max-width: 760px;
	text-align: center;
}

.fc-section__title {
	margin-bottom: 0;
}

.fc-section__inner {
	align-items: stretch;
	display: grid;
	gap: clamp(1.5rem, 4vw, 3.5rem);
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.fc-homepage-section--layout-centered .fc-section__inner {
	grid-template-columns: minmax(0, 760px);
	justify-content: center;
}

.fc-homepage-section--layout-centered .fc-section__content {
	text-align: center;
}

.fc-section__media,
.fc-section__content {
	min-width: 0;
}

.fc-section__media {
	display: flex;
}

.fc-section__media-card,
.fc-section__content,
.fc-product-card,
.fc-homepage-empty-state {
	background: var(--fc-surface);
	border-radius: var(--fc-radius);
	box-shadow: 0 12px 32px rgba(36, 36, 33, 0.08);
	height: 100%;
	overflow: hidden;
}

.fc-section__media-card {
	align-items: stretch;
	display: flex;
	margin-bottom: 0;
	width: 100%;
}

.fc-section__image,
.fc-product-card__image {
	aspect-ratio: 4 / 3;
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.fc-section__image-placeholder {
	align-items: center;
	aspect-ratio: 4 / 3;
	background: var(--fc-bg);
	color: var(--fc-muted);
	display: flex;
	justify-content: center;
	min-height: 12rem;
	padding: 1.5rem;
	text-align: center;
	width: 100%;
}

.fc-section__content .content,
.fc-product-card .content,
.fc-homepage-empty-state .content {
	padding: clamp(1.5rem, 3vw, 2.5rem);
}

.fc-section__kicker {
	color: var(--fc-accent);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	margin: 0 0 0.75rem;
}

.fc-section__summary,
.fc-product-card__summary,
.fc-homepage-empty-state p {
	color: var(--fc-muted);
}

.fc-section__actions {
	margin-top: 1.5rem;
}

.fc-section__actions--centered {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

.fc-homepage-section--customization,
.fc-homepage-section--factory {
	background: var(--fc-surface);
}

.fc-homepage-section--applications,
.fc-homepage-section--certifications,
.fc-homepage-section--products {
	background: var(--fc-bg);
}

.fc-products__grid {
	display: grid;
	gap: 2rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fc-product-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.fc-product-card__media {
	background: var(--fc-bg);
	display: block;
	line-height: 0;
	overflow: hidden;
}

.fc-product-card .content {
	display: flex;
	flex: 1;
	flex-direction: column;
}

.fc-product-card .fc-section__actions {
	margin-top: auto;
}

.fc-homepage-empty-state {
	margin-left: auto;
	margin-right: auto;
	max-width: 760px;
}

/* Reusable FC Hestia Content Page. */
.fc-hestia-content-page__main {
	min-height: 1px;
}

.fc-hestia-content-page__wrapper {
	padding-bottom: 4rem;
	padding-top: 1rem;
}

.fc-hestia-content-page__surface {
	margin: -3rem auto 0;
	max-width: var(--fc-content);
	position: relative;
	z-index: 2;
}

.fc-hestia-content-page__surface > .content {
	padding: clamp(1.5rem, 5vw, 4rem);
}

.fc-hestia-content-page__surface .entry-content {
	overflow-wrap: anywhere;
}

.fc-hestia-content-page__surface .entry-content > * {
	margin-left: auto;
	margin-right: auto;
	max-width: 760px;
}

.fc-hestia-content-page__surface .entry-content > .alignwide {
	max-width: 1050px;
	width: 100%;
}

.fc-hestia-content-page__surface .entry-content > .alignfull {
	max-width: none;
	width: 100%;
}

.fc-hestia-content-page__surface .entry-content > :first-child {
	margin-top: 0;
}

.fc-hestia-content-page__surface .entry-content > :last-child {
	margin-bottom: 0;
}

.fc-hestia-content-page__surface .wp-block-image,
.fc-hestia-content-page__surface .wp-block-gallery,
.fc-hestia-content-page__surface .wp-block-media-text,
.fc-hestia-content-page__surface .wp-block-cover,
.fc-hestia-content-page__surface .wp-block-table {
	margin-top: 2rem;
	margin-bottom: 2rem;
}

.fc-hestia-content-page__surface .wp-block-image img,
.fc-hestia-content-page__surface .wp-block-gallery img,
.fc-hestia-content-page__surface .wp-block-cover {
	border-radius: var(--fc-radius);
}

.fc-hestia-content-page__header-filter {
	background: var(--fc-primary);
}

@media (max-width: 991px) {
	.fc-products__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.fc-homepage-section {
		padding-bottom: 3.5rem;
		padding-top: 3.5rem;
	}

	.fc-section__inner,
	.fc-homepage-section--layout-centered .fc-section__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.fc-homepage-section--layout-image-right .fc-section__media,
	.fc-homepage-section--layout-image-left .fc-section__media {
		grid-row: auto;
	}

	.fc-products__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.fc-hestia-content-page__surface {
		margin-top: -1.5rem;
	}

	.fc-hestia-content-page__wrapper {
		padding-bottom: 2.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
/* Homepage layout shared by the Hestia front end and the FC Homepage pattern. */
.fc-homepage {
	--fc-bg: #f6f2eb;
	--fc-surface: #fffdf9;
	--fc-text: #222320;
	--fc-muted: #6b6b64;
	--fc-primary: #25352f;
	--fc-accent: #8a6849;
	--fc-border: #ded8cf;
	--fc-radius: 4px;
	--fc-content: 1200px;
	color: var(--fc-text);
	overflow-wrap: anywhere;
}

.fc-homepage > .alignfull {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	max-width: 100vw;
	width: 100vw;
}

.fc-home-section {
	box-sizing: border-box;
	padding-block: clamp(3rem, 7vw, 6rem);
}

.fc-home-section + .fc-home-section {
	border-top: 1px solid var(--fc-border);
}

.fc-home-section--surface,
.fc-home-hero {
	background: var(--fc-surface);
}

.fc-home-section__header {
	margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.fc-home-section__header > :first-child,
.fc-home-card > :first-child,
.fc-home-hero__content > :first-child {
	margin-top: 0;
}

.fc-home-section__header > :last-child,
.fc-home-card > :last-child,
.fc-home-hero__content > :last-child {
	margin-bottom: 0;
}

.fc-home-hero {
	padding-block: clamp(3rem, 8vw, 7rem);
}

.fc-home-hero__columns,
.fc-home-factory__columns {
	align-items: center;
}

.fc-home-hero__content {
	padding-right: clamp(0rem, 4vw, 3rem);
}

.fc-home-actions {
	align-items: center;
	gap: 0.75rem;
}

.fc-home-actions .wp-block-button {
	margin: 0;
}

.fc-home-button--outline .wp-block-button__link {
	background: transparent;
	border: 1px solid var(--fc-primary);
	color: var(--fc-primary);
}

.fc-home-button--outline .wp-block-button__link:hover,
.fc-home-button--outline .wp-block-button__link:focus-visible {
	background: var(--fc-primary);
	border-color: var(--fc-primary);
	color: var(--fc-surface);
}

.fc-home-image,
.fc-home-image img {
	display: block;
	width: 100%;
}

.fc-home-image {
	aspect-ratio: 4 / 3;
	background: var(--fc-bg);
	margin: 0;
	min-height: 12rem;
	overflow: hidden;
}

.fc-home-image:empty {
	align-items: center;
	display: flex;
	justify-content: center;
}

.fc-home-image:empty::before {
	color: var(--fc-muted);
	content: "TODO_CONTENT: select an image";
	font-size: 0.875rem;
	padding: 1rem;
	text-align: center;
}

.fc-home-image img {
	height: 100%;
	object-fit: cover;
}

.fc-home-hero__media,
.fc-home-hero__media img,
.fc-home-factory__main,
.fc-home-factory__main img {
	aspect-ratio: 4 / 3;
}

.fc-home-card__image,
.fc-home-card__image img,
.fc-home-factory__gallery .fc-home-image,
.fc-home-factory__gallery img {
	aspect-ratio: 4 / 3;
}

.fc-home-certification__image,
.fc-home-certification__image img {
	aspect-ratio: 3 / 2;
}

.fc-home-card {
	background: var(--fc-surface);
	border: 1px solid var(--fc-border);
	border-radius: var(--fc-radius);
	box-shadow: 0 12px 32px rgba(36, 36, 33, 0.06);
	height: 100%;
	min-width: 0;
	overflow: hidden;
	padding: clamp(1.25rem, 3vw, 2rem);
}

.fc-home-card .fc-home-card__image {
	margin: calc(clamp(1.25rem, 3vw, 2rem) * -1);
	margin-bottom: 1.5rem;
	width: auto;
}

.fc-home-capabilities,
.fc-home-applications,
.fc-home-certifications,
.fc-home-factory__gallery {
	align-items: stretch;
}

.fc-featured-products__grid {
	display: grid;
	gap: clamp(1rem, 3vw, 2rem);
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fc-featured-products__card {
	background: var(--fc-surface);
	border: 1px solid var(--fc-border);
	border-radius: var(--fc-radius);
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
}

.fc-featured-products__media {
	background: var(--fc-bg);
	display: block;
	overflow: hidden;
	text-decoration: none;
}

.fc-featured-products__media img,
.fc-featured-products__image-placeholder {
	aspect-ratio: 4 / 3;
	display: flex;
	height: auto;
	width: 100%;
}

.fc-featured-products__media img {
	object-fit: cover;
}

.fc-featured-products__image-placeholder {
	align-items: center;
	color: var(--fc-muted);
	justify-content: center;
	padding: 1rem;
	text-align: center;
}

.fc-featured-products__content {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: clamp(1.25rem, 3vw, 2rem);
}

.fc-featured-products__content h3 {
	margin-block: 0 0.75rem;
}

.fc-featured-products__content p {
	color: var(--fc-muted);
	margin-block: 0 1rem;
}

.fc-featured-products__link {
	font-weight: 650;
	margin-top: auto;
}

.fc-featured-products__empty {
	background: var(--fc-surface);
	border: 1px dashed var(--fc-border);
	color: var(--fc-muted);
	padding: clamp(1.25rem, 3vw, 2rem);
}

.fc-featured-products__empty > :first-child {
	margin-top: 0;
}

.fc-featured-products__empty > :last-child {
	margin-bottom: 0;
}

.fc-featured-products__all {
	margin-bottom: 0;
	margin-top: 2rem;
	text-align: center;
}

@media (max-width: 781px) {
	.fc-home-hero__content {
		padding-right: 0;
	}

	.fc-home-hero__columns > .wp-block-column,
	.fc-home-factory__columns > .wp-block-column {
		flex-basis: 100% !important;
		width: 100%;
	}

	.fc-featured-products__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 479px) {
	.fc-home-actions > * {
		flex: 1 1 100%;
	}

	.fc-home-actions .wp-block-button,
	.fc-home-actions .wp-element-button {
		width: 100%;
	}

	.fc-featured-products__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
