/* Homegrown Woodworks — lightweight front-end styles */

:root {
	--hgw-hero-min: 420px;
	--hgw-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

body {
	-webkit-font-smoothing: antialiased;
}

.hgw-header {
	background: #fff;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	position: sticky;
	top: 0;
	z-index: 100;
}

.hgw-header__inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0.85rem 1.25rem;
}

.hgw-nav .wp-block-navigation-item__content {
	color: var(--wp--preset--color--text);
}

.hgw-hero {
	position: relative;
	min-height: var(--hgw-hero-min);
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: #fff;
	background-size: cover;
	background-position: center;
	margin: 0 calc(50% - 50vw) 2rem;
	width: 100vw;
	max-width: 100vw;
}

.hgw-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(92, 107, 74, 0.55) 0%, rgba(43, 43, 43, 0.45) 100%);
}

.hgw-hero__content {
	position: relative;
	z-index: 1;
	max-width: 900px;
	padding: 3rem 1.5rem;
}

.hgw-hero__content h1 {
	color: #fff;
	font-size: clamp(2rem, 5vw, 3.2rem);
	margin: 0 0 0.5rem;
	text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.hgw-hero__content h2,
.hgw-hero__content h3 {
	color: #f7f4ef;
	font-weight: 600;
	margin: 0.35rem 0;
}

.hgw-hero__content p {
	font-size: 1.1rem;
	max-width: 720px;
	margin: 1rem auto 0;
}

.hgw-features {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	margin: 2rem 0 3rem;
}

.hgw-feature-card {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 8px;
	padding: 1.5rem;
	box-shadow: var(--hgw-shadow);
}

.hgw-feature-card h3 {
	margin-top: 0;
	color: var(--wp--preset--color--primary-dark);
}

.hgw-categories {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 1rem;
	margin: 2rem 0 3rem;
}

.hgw-category-card {
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	min-height: 180px;
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: flex-end;
	text-decoration: none;
	box-shadow: var(--hgw-shadow);
}

.hgw-category-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.65) 100%);
}

.hgw-category-card span {
	position: relative;
	z-index: 1;
	color: #fff;
	font-weight: 700;
	font-size: 1.05rem;
	padding: 1rem;
	width: 100%;
	text-align: center;
}

.hgw-wood-types {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
	margin: 2rem 0;
}

.hgw-wood-type {
	text-align: center;
	background: #fff;
	border-radius: 8px;
	padding: 0.75rem;
	box-shadow: var(--hgw-shadow);
}

.hgw-wood-type img {
	width: 100%;
	height: 140px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}

.hgw-wood-type figcaption {
	margin-top: 0.5rem;
	font-weight: 600;
	color: var(--wp--preset--color--primary-dark);
}

.hgw-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 0.75rem;
	margin: 2rem 0;
}

.hgw-gallery__item {
	margin: 0;
	border-radius: 6px;
	overflow: hidden;
	background: #ddd;
	aspect-ratio: 4 / 3;
}

.hgw-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.25s ease;
}

.hgw-gallery__item:hover img {
	transform: scale(1.03);
}

.hgw-hero a.hgw-button {
	color: #fff;
	text-decoration: none;
	margin-top: 1rem;
}

.hgw-hero a:not(.hgw-button) {
	color: #fff;
}

.hgw-button,
.hgw-contact-form button {
	display: inline-block;
	background: var(--wp--preset--color--primary);
	color: #fff;
	border: 0;
	border-radius: 4px;
	padding: 0.75rem 1.5rem;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
}

.hgw-button:hover,
.hgw-contact-form button:hover {
	background: var(--wp--preset--color--primary-dark);
	color: #fff;
}

.hgw-contact-form-wrap {
	max-width: 640px;
}

.hgw-contact-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25rem;
}

.hgw-contact-form input,
.hgw-contact-form textarea {
	width: 100%;
	padding: 0.65rem 0.75rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	margin-bottom: 0.75rem;
	font: inherit;
}

.hgw-notice {
	padding: 0.75rem 1rem;
	border-radius: 4px;
}

.hgw-notice--success {
	background: #e8f3e5;
	color: #2f4a22;
}

.hgw-notice--error {
	background: #fdecea;
	color: #7a1f1f;
}

.hgw-footer {
	padding: 2.5rem 1.25rem 1.5rem;
	margin-top: 3rem;
	background: #ffffff;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.hgw-footer a {
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}

.hgw-footer a:hover {
	color: var(--wp--preset--color--primary-dark);
}

.hgw-footer__cols {
	max-width: 1180px;
	margin: 0 auto 1rem;
	gap: 2rem;
}

/* Classic primary menu rendered via theme location */
.hgw-nav--classic .hgw-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.hgw-nav--classic a {
	color: var(--wp--preset--color--text);
	font-weight: 600;
	text-decoration: none;
}

.hgw-nav--classic a:hover,
.hgw-nav--classic .current-menu-item > a {
	color: var(--wp--preset--color--primary);
}

@media (max-width: 781px) {
	.hgw-header__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}

	.hgw-nav--classic .hgw-nav__list {
		flex-direction: column;
		gap: 0.5rem;
	}
}

/* Legacy block nav fallback — desktop */
@media (min-width: 782px) {
	.hgw-nav .wp-block-navigation__responsive-container-open {
		display: none !important;
	}

	.hgw-nav .wp-block-navigation__responsive-container {
		display: block !important;
		position: static !important;
		width: auto !important;
		height: auto !important;
		padding: 0 !important;
		background: transparent !important;
	}

	.hgw-nav .wp-block-navigation__responsive-container-close {
		display: none !important;
	}

	.hgw-nav .wp-block-navigation__container {
		display: flex !important;
		flex-wrap: wrap;
		gap: 1.25rem;
	}
}

.hgw-wood-types--page .hgw-sample-card,
.hgw-stain-colours .hgw-sample-card {
	text-align: left;
}

.hgw-sample-card {
	background: #fff;
	border-radius: 8px;
	padding: 0.75rem;
	box-shadow: var(--hgw-shadow);
}

.hgw-sample-card img {
	width: 100%;
	height: 160px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}

.hgw-sample-card figcaption {
	margin-top: 0.5rem;
	font-weight: 700;
	color: var(--wp--preset--color--primary-dark);
}

.hgw-sample-card p {
	margin: 0.35rem 0 0;
	font-size: 0.95rem;
	color: var(--wp--preset--color--muted);
}

.hgw-stain-colours,
.hgw-wood-types--page {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1rem;
	margin: 2rem 0;
}

.hgw-page-intro {
	max-width: 760px;
	margin: 0 auto 2rem;
}

.hgw-two-col-list {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
}

@media (max-width: 960px) {
	.hgw-features,
	.hgw-categories {
		grid-template-columns: 1fr 1fr;
	}

	.hgw-wood-types {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 640px) {
	.hgw-features,
	.hgw-categories,
	.hgw-wood-types,
	.hgw-two-col-list {
		grid-template-columns: 1fr;
	}

	.hgw-hero {
		min-height: 360px;
	}
}
