/* Ecofair — styles theme.json can't express. Keep this file small. */

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

/* Small uppercase label above headings */
.is-style-eyebrow,
.ecofair-eyebrow {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}

/* Sticky header */
.ecofair-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.ecofair-header .wp-block-site-title {
	white-space: nowrap;
	line-height: 1;
}

.ecofair-tagline {
	margin: 0;
	font-size: 0.6875rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--contrast-2);
	white-space: nowrap;
}

.ecofair-brand .custom-logo {
	width: 34px;
	height: auto;
}

.ecofair-header .wp-block-navigation {
	flex-wrap: nowrap;
}

.ecofair-header .wp-block-navigation__container {
	flex-wrap: nowrap;
	gap: 1.5rem;
}

/* Thin vertical rule beside section headings, as in the brand deck */
.is-style-ruled {
	border-left: 1px solid var(--wp--preset--color--primary);
	padding-left: var(--wp--preset--spacing--30);
}

.ecofair-brand .wp-block-site-logo {
	flex-shrink: 0;
}

@media (max-width: 1100px) {
	.ecofair-header .wp-block-woocommerce-product-search {
		display: none;
	}
}

@media (max-width: 600px) {
	.ecofair-brand {
		min-width: 0;
	}

	.ecofair-brand .custom-logo {
		width: 26px;
	}

	.ecofair-header .wp-block-site-title {
		font-size: 0.95rem;
		letter-spacing: 0.04em;
	}

	.ecofair-tagline {
		display: none;
	}

	.ecofair-header .alignwide > .wp-block-group:last-child {
		gap: 0.25rem;
	}
}

/* Footer link lists */
footer .wp-block-list {
	list-style: none;
}

footer a {
	text-decoration: none;
}

footer a:hover {
	text-decoration: underline;
}

/* Hero photo: arch top, applies to whatever image is chosen */
.ecofair-hero-image img {
	width: 100%;
	border-radius: 240px 240px 18px 18px;
	background: var(--wp--preset--color--primary-2);
}

/* FAQ open/close rows */
.ecofair-faq {
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding: 1.1rem 0;
	margin-block-start: 0 !important;
}

.ecofair-faq summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	cursor: pointer;
	list-style: none;
	font-weight: 500;
	color: var(--wp--preset--color--contrast);
}

.ecofair-faq summary::-webkit-details-marker {
	display: none;
}

.ecofair-faq summary::after {
	content: "+";
	flex-shrink: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.5rem;
	line-height: 1;
	color: var(--wp--preset--color--primary);
}

.ecofair-faq[open] summary::after {
	content: "–";
}

.ecofair-faq > :not(summary) {
	color: var(--wp--preset--color--contrast-2);
}

/* Category tiles block */
.ecofair-category-tiles {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--30);
}

@media (max-width: 900px) {
	.ecofair-category-tiles {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.ecofair-category-tiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.ecofair-category-tiles__tile {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	text-decoration: none;
	color: var(--wp--preset--color--accent);
}

.ecofair-category-tiles__media {
	display: block;
	aspect-ratio: 1;
	border-radius: 18px;
	overflow: hidden;
	background: var(--wp--preset--color--primary-2);
}

.ecofair-category-tiles__tile:nth-child(3n + 2) .ecofair-category-tiles__media {
	background: var(--wp--preset--color--base-2);
}

.ecofair-category-tiles__tile:nth-child(3n + 3) .ecofair-category-tiles__media {
	background: #E2DCD0;
}

.ecofair-category-tiles__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.ecofair-category-tiles__tile:hover .ecofair-category-tiles__image {
	transform: scale(1.04);
}

.ecofair-category-tiles__label {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-align: center;
}

@media (prefers-reduced-motion: reduce) {
	.ecofair-category-tiles__image {
		transition: none;
	}
}

/* Product cards in collections */
.wc-block-product-template .wc-block-components-product-image img,
.wp-block-woocommerce-product-image img {
	border-radius: 14px;
	background: var(--wp--preset--color--base-2);
}

.wc-block-product-template .wp-block-post-title a {
	text-decoration: none;
}

/* Value icons */
.ecofair-value-icon {
	display: inline-grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	background: var(--wp--preset--color--primary-2);
	color: var(--wp--preset--color--primary);
	font-size: 1.25rem;
}

/* Secondary (outline) button */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1.5px solid currentColor;
	background: transparent;
	color: var(--wp--preset--color--primary);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}
