/* HQ Accessories — main stylesheet */

:root {
	--color-bg: #fffafa;
	--color-surface: #ffffff;
	--color-text: #222222;
	--color-muted: #666666;
	--color-primary: #e0cee5;
	--color-primary-hover: #d9b2e4;
	--color-border: #eeeeee;
	--container: 72.5625rem;
	--radius: 0.75rem;
	--shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	overflow-x: clip;
}

body {
	margin: 0;
	font-family: Andika, system-ui, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: var(--color-text);
	background: var(--color-bg);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--color-primary);
	text-decoration: none;
}

a:hover,
a:focus-visible {
	color: var(--color-primary-hover);
	text-decoration: underline;
}

.container {
	width: min(100% - 2rem, var(--container));
	margin-inline: auto;
}

.container--wide {
	max-width: calc(var(--container) + 8rem);
}

.site-content__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2rem;
	padding-block: 2.5rem;
}

@media (min-width: 960px) {
	.site-content__inner:has(.sidebar) {
		grid-template-columns: minmax(0, 1fr) 18rem;
	}
}

.site-main--front {
	margin: 0;
	padding: 0;
}

#content.site-content {
	margin: 0;
	padding: 0;
}

.home-hero {
	position: relative;
	overflow: hidden;
	width: 100%;
	max-width: 100%;
	height: 100vh !important;
	min-height: 100vh !important;
	margin: 0;
	background: #111;
}

body.home #content.site-content {
	padding-top: 0;
}

body.home.hq-header-over-hero {
	background-color: #111;
}

@media (min-width: 993px) {
	/* Pull content (and hero) under masthead + nav; margin on hero alone only reached nav.bottom */
	body.home.hq-header-over-hero #content.site-content {
		margin-top: calc(-1 * var(--hq-home-header-stack, 177px));
	}

	body.home .home-hero {
		margin-top: 0;
	}
}

@media (max-width: 992px) {
	body.home.hq-header-over-hero {
		background-color: #111;
	}

	body.home.hq-header-over-hero #content.site-content {
		margin-top: 0;
		padding-top: 0;
	}

	body.home .home-hero {
		margin-top: 0;
		min-height: 100vh;
		min-height: 100dvh;
		height: 100vh !important;
		height: 100dvh !important;
	}

}

.home-hero__media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.home-hero__video {
	display: block;
	z-index: 1;
	background: #111;
	object-fit: cover;
	object-position: center top;
	/* Reliable full-bleed cover (avoids letterboxing gaps in some browsers) */
	position: absolute;
	top: 50%;
	left: 50%;
	min-width: 100%;
	min-height: 100%;
	width: auto;
	height: auto;
	max-width: none;
	transform: translate(-50%, -50%);
}

/* When both image + video: show image first, then fade image out over 1s. */
.home-hero--delayed-video .home-hero__video {
	opacity: 0;
	z-index: 1;
	transition: opacity 1s ease-in;
}

.home-hero--delayed-video .home-hero__image {
	z-index: 2;
	opacity: 1;
	transition: opacity 1s ease-out;
}

.home-hero--delayed-video.is-video-active .home-hero__video {
	opacity: 1;
}

.home-hero--delayed-video.is-video-active .home-hero__image {
	opacity: 0;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.home-hero--delayed-video .home-hero__video,
	.home-hero--delayed-video .home-hero__image {
		transition: none;
	}
}

.home-hero__image {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	z-index: 0;
}

.home-hero__overlay {
	position: absolute;
	inset: 0;
	background: #000;
	z-index: 2;
	pointer-events: none;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	clip: auto;
	white-space: normal;
}

.footer-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-menu a {
	color: var(--color-text);
	font-weight: 500;
}

/* Content */
.page-header,
.entry-header {
	margin-bottom: 1.5rem;
}

.page-title,
.entry-title {
	margin: 0 0 0.5rem;
	line-height: 1.2;
}

.entry-subtitle,
.entry-meta,
.archive-description {
	color: var(--color-muted);
}

.entry-content > *:first-child {
	margin-top: 0;
}

.posts-grid {
	display: grid;
	gap: 1.5rem;
}

@media (min-width: 640px) {
	.posts-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.post-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
}

.post-card__body {
	padding: 1.25rem;
}

.read-more,
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 1rem;
	border-radius: 999px;
	background: var(--color-primary);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.read-more:hover,
.button:hover,
.read-more:focus-visible,
.button:focus-visible {
	background: var(--color-primary-hover);
	color: #fff;
	text-decoration: none;
}

/* Sidebar & widgets (blog sidebar only — shop archive #secondary is unboxed) */
.widget-area.sidebar,
.footer-widgets {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 1.25rem;
}

.widget-title {
	margin-top: 0;
	font-size: 1rem;
}

/* Footer styles live in assets/css/footer.css */

/* Pagination */
.navigation.pagination {
	margin-top: 2rem;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--color-border);
	border-radius: 0.5rem;
	background: var(--color-surface);
	color: var(--color-text);
}

.page-numbers.current {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: #fff;
}

/* WooCommerce spacing */
.woocommerce-main {
	padding-block: 2.5rem;
}

body.single-product .woocommerce-main {
	padding-block: 0;
}

body.tax-product_cat .woocommerce-main, body.hq-plp-archive .woocommerce-main,
body.tax-product_tag .woocommerce-main,
body.tax-product_brand .woocommerce-main {
	padding-block: 0;
}
