/* Homegrown Woodworks — v1.2 layout & virtual showroom */

:root {
	--hgw-hero-min: 520px;
	--hgw-shadow: 0 16px 48px rgba(43, 43, 43, 0.08);
	--hgw-shadow-soft: 0 8px 24px rgba(43, 43, 43, 0.06);
	--hgw-radius: 12px;
	--hgw-section-y: clamp(3rem, 6vw, 5rem);
	--hgw-content: 1180px;
	--hgw-narrow: 760px;
}

/* ── Page sections ── */
.hgw-section {
	padding: var(--hgw-section-y) 1.25rem;
}

.hgw-section--alt {
	background: linear-gradient(180deg, #fff 0%, #f3efe8 100%);
}

.hgw-section--dark {
	background: linear-gradient(135deg, #3f4a33 0%, #2b3324 100%);
	color: #f7f4ef;
}

.hgw-section__inner {
	max-width: var(--hgw-content);
	margin: 0 auto;
}

.hgw-section__header {
	text-align: center;
	max-width: var(--hgw-narrow);
	margin: 0 auto 2.5rem;
}

.hgw-section__eyebrow {
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
	margin: 0 0 0.5rem;
}

.hgw-section--dark .hgw-section__eyebrow {
	color: #c8d4b8;
}

.hgw-section__title {
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(1.75rem, 3.5vw, 2.5rem);
	margin: 0 0 0.75rem;
	color: var(--wp--preset--color--primary-dark);
}

.hgw-section--dark .hgw-section__title {
	color: #fff;
}

.hgw-section__lede {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: 1.05rem;
	line-height: 1.7;
}

.hgw-section--dark .hgw-section__lede {
	color: rgba(247, 244, 239, 0.85);
}

.hgw-section--dark .hgw-showroom__title,
.hgw-section--dark .hgw-showroom__lede {
	color: #f7f4ef;
}

.hgw-section--dark .hgw-showroom__eyebrow {
	color: #c8d4b8;
}

.hgw-section--dark .hgw-showroom__home-cta .hgw-button {
	background: #fff;
	color: var(--wp--preset--color--primary-dark);
}

.hgw-section--dark .hgw-showroom__home-cta .hgw-button:hover {
	background: #eef2e8;
}

.hgw-section__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
	margin-top: 1.75rem;
}

/* ── Hero ── */
.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) 0;
	width: 100vw;
	max-width: 100vw;
}

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

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

.hgw-hero__eyebrow {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #dce6d0;
	margin-bottom: 0.75rem;
}

.hgw-hero__content h1 {
	color: #fff;
	font-size: clamp(2.1rem, 5.5vw, 3.4rem);
	margin: 0 0 0.65rem;
	line-height: 1.15;
	text-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
}

.hgw-hero__content h2 {
	color: #eef2e8;
	font-size: clamp(1.15rem, 2.5vw, 1.5rem);
	font-weight: 600;
	margin: 0 0 0.35rem;
}

.hgw-hero__content h3 {
	color: #dce6d0;
	font-size: clamp(1rem, 2vw, 1.2rem);
	font-weight: 600;
	margin: 0 0 1rem;
}

.hgw-hero__content p {
	font-size: 1.08rem;
	max-width: 640px;
	margin: 0 auto 1.5rem;
	line-height: 1.75;
	color: rgba(255, 255, 255, 0.92);
}

.hgw-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
}

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

.hgw-button--outline {
	background: transparent !important;
	border: 2px solid rgba(255, 255, 255, 0.85) !important;
}

.hgw-button--outline:hover {
	background: rgba(255, 255, 255, 0.12) !important;
}

.hgw-button--large {
	padding: 0.95rem 1.75rem;
	font-size: 1.05rem;
}

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

.hgw-feature-card {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.05);
	border-radius: var(--hgw-radius);
	padding: 2rem 1.5rem 1.75rem;
	box-shadow: var(--hgw-shadow-soft);
	text-align: center;
	position: relative;
	overflow: hidden;
}

.hgw-feature-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--wp--preset--color--primary), var(--wp--preset--color--accent));
}

.hgw-feature-card__icon {
	width: 3rem;
	height: 3rem;
	margin: 0 auto 1rem;
	border-radius: 50%;
	background: #eef2e8;
	color: var(--wp--preset--color--primary-dark);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.35rem;
	font-weight: 700;
}

.hgw-feature-card h3 {
	margin: 0 0 0.65rem;
	color: var(--wp--preset--color--primary-dark);
	font-size: 1.2rem;
}

.hgw-feature-card p {
	margin: 0;
	color: var(--wp--preset--color--muted);
	line-height: 1.65;
}

.hgw-feature-card a {
	color: var(--wp--preset--color--accent);
	font-weight: 600;
}

/* ── Wood preview strip ── */
.hgw-wood-preview {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
	margin: 0 0 0.5rem;
}

.hgw-wood-preview__item {
	display: block;
	text-decoration: none;
	background: #fff;
	border-radius: var(--hgw-radius);
	overflow: hidden;
	box-shadow: var(--hgw-shadow-soft);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hgw-wood-preview__item:hover {
	transform: translateY(-4px);
	box-shadow: var(--hgw-shadow);
}

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

.hgw-wood-preview__item span {
	display: block;
	padding: 0.75rem;
	text-align: center;
	font-weight: 700;
	color: var(--wp--preset--color--primary-dark);
}

/* ── Virtual Showroom ── */
.hgw-showroom {
	max-width: var(--hgw-content);
	margin: 0 auto;
}

.hgw-showroom__intro {
	text-align: center;
	max-width: var(--hgw-narrow);
	margin: 0 auto 2rem;
}

.hgw-showroom__intro--full {
	max-width: 820px;
	margin-bottom: 2.5rem;
}

.hgw-showroom__eyebrow {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
	margin: 0 0 0.5rem;
}

.hgw-showroom__title {
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(1.6rem, 3vw, 2.35rem);
	margin: 0 0 0.75rem;
	color: var(--wp--preset--color--primary-dark);
}

.hgw-showroom__lede {
	margin: 0;
	color: var(--wp--preset--color--muted);
	line-height: 1.7;
}

.hgw-showroom__rooms {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 0.75rem;
	margin-bottom: 1.75rem;
}

.hgw-showroom__room {
	appearance: none;
	border: 2px solid transparent;
	border-radius: var(--hgw-radius);
	padding: 0;
	cursor: pointer;
	text-align: left;
	background: #fff var(--room-image, none) center / cover no-repeat;
	min-height: 140px;
	position: relative;
	overflow: hidden;
	box-shadow: var(--hgw-shadow-soft);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
	color: #fff;
}

.hgw-showroom__room:first-child {
	background: linear-gradient(145deg, #5c6b4a, #3f4a33);
	grid-column: span 1;
}

.hgw-showroom__room::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.72) 100%);
	transition: opacity 0.2s ease;
}

.hgw-showroom__room:hover,
.hgw-showroom__room.is-active {
	transform: translateY(-3px);
	box-shadow: var(--hgw-shadow);
	border-color: var(--wp--preset--color--accent);
}

.hgw-showroom__room.is-active::after {
	background: linear-gradient(180deg, rgba(92, 107, 74, 0.15) 0%, rgba(43, 43, 43, 0.78) 100%);
}

.hgw-showroom__room-label,
.hgw-showroom__room-tagline,
.hgw-showroom__room-count {
	position: relative;
	z-index: 1;
	display: block;
}

.hgw-showroom__room-label {
	font-weight: 700;
	font-size: 0.95rem;
	padding: 0.85rem 0.75rem 0.15rem;
}

.hgw-showroom__room-tagline {
	font-size: 0.72rem;
	opacity: 0.9;
	padding: 0 0.75rem;
	line-height: 1.3;
}

.hgw-showroom__room-count {
	position: absolute;
	top: 0.55rem;
	right: 0.55rem;
	z-index: 2;
	background: rgba(255, 255, 255, 0.92);
	color: var(--wp--preset--color--primary-dark);
	font-size: 0.72rem;
	font-weight: 700;
	padding: 0.2rem 0.45rem;
	border-radius: 999px;
}

.hgw-showroom__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.25rem;
	background: #fff;
	border-radius: var(--hgw-radius);
	box-shadow: var(--hgw-shadow-soft);
	margin-bottom: 1.25rem;
	position: sticky;
	top: 4.5rem;
	z-index: 20;
}

.hgw-showroom__status-room {
	display: block;
	font-weight: 700;
	color: var(--wp--preset--color--primary-dark);
}

.hgw-showroom__status-count {
	font-size: 0.9rem;
	color: var(--wp--preset--color--muted);
}

.hgw-showroom__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.hgw-showroom__btn {
	appearance: none;
	border: 0;
	border-radius: 999px;
	padding: 0.65rem 1.15rem;
	font-weight: 700;
	cursor: pointer;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font: inherit;
}

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

.hgw-showroom__btn--ghost {
	background: #eef2e8;
	color: var(--wp--preset--color--primary-dark);
}

.hgw-showroom__btn--ghost:hover {
	background: #dce6d0;
}

.hgw-showroom__grid {
	columns: 4 220px;
	column-gap: 0.85rem;
	margin: 0;
}

.hgw-showroom__tile {
	appearance: none;
	border: 0;
	padding: 0;
	margin: 0 0 0.85rem;
	width: 100%;
	border-radius: 10px;
	overflow: hidden;
	cursor: zoom-in;
	background: #ddd;
	box-shadow: var(--hgw-shadow-soft);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	break-inside: avoid;
	display: block;
}

.hgw-showroom__tile:hover {
	transform: scale(1.02);
	box-shadow: var(--hgw-shadow);
}

.hgw-showroom__tile img {
	width: 100%;
	height: auto;
	display: block;
	vertical-align: middle;
}

.hgw-showroom__home-cta,
.hgw-showroom__footer-actions {
	text-align: center;
	margin-top: 2rem;
}

.hgw-showroom--home .hgw-showroom__grid {
	columns: 3 180px;
}

.hgw-showroom--home .hgw-showroom__toolbar,
.hgw-showroom--home .hgw-showroom__footer-actions {
	display: none;
}

/* ── Lightbox ── */
body.hgw-lightbox-open {
	overflow: hidden;
}

.hgw-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: rgba(20, 22, 18, 0.94);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.hgw-lightbox[hidden] {
	display: none !important;
}

.hgw-lightbox__figure {
	margin: 0;
	max-width: min(1100px, 92vw);
	max-height: 88vh;
	text-align: center;
}

.hgw-lightbox__img {
	max-width: 100%;
	max-height: 78vh;
	width: auto;
	height: auto;
	border-radius: 8px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.hgw-lightbox__caption {
	color: #eef2e8;
	margin-top: 0.85rem;
	font-size: 0.95rem;
}

.hgw-lightbox__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	appearance: none;
	border: 0;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}

.hgw-lightbox__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	appearance: none;
	border: 0;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	font-size: 1.25rem;
	cursor: pointer;
}

.hgw-lightbox__nav--prev { left: 1rem; }
.hgw-lightbox__nav--next { right: 1rem; }

/* ── Legacy category cards (kept for compatibility) ── */
.hgw-categories {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 1rem;
	margin: 2rem 0 3rem;
}

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

.hgw-category-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.68) 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;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
	.hgw-showroom__rooms {
		grid-template-columns: repeat(3, 1fr);
	}

	.hgw-showroom__room:first-child {
		grid-column: span 1;
	}

	.hgw-showroom__grid {
		columns: 3 200px;
	}

	.hgw-wood-preview {
		grid-template-columns: repeat(2, 1fr);
	}
}

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

	.hgw-showroom__rooms {
		grid-template-columns: repeat(2, 1fr);
	}

	.hgw-showroom__room {
		min-height: 120px;
	}

	.hgw-showroom__grid,
	.hgw-showroom--home .hgw-showroom__grid {
		columns: 2 160px;
	}

	.hgw-showroom__toolbar {
		top: 0.5rem;
		position: relative;
	}

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

@media (max-width: 480px) {
	.hgw-showroom__rooms {
		grid-template-columns: 1fr;
	}

	.hgw-showroom__grid {
		columns: 1;
	}
}
