/* ============================================================
   Michigan GGS — Global CSS
   Scrollbar, layout, header, mega menu, hero, category cards,
   utilities, responsive breakpoints.
   ============================================================ */

/* ── Scrollbar ────────────────────────────────────────────── */
:root {
	scrollbar-color: var(--wp--preset--color--border) var(--wp--preset--color--base);
	scrollbar-width: thin;
}
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--wp--preset--color--base); }
::-webkit-scrollbar-thumb {
	background-color: var(--wp--preset--color--border);
	border-radius: 4px;
}

/* ── Selection ────────────────────────────────────────────── */
::selection {
	background-color: var(--wp--preset--color--purple);
	color: #fff;
}

/* ── Base resets ──────────────────────────────────────────── */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

a {
	transition: color 0.15s ease;
}

/* ── Skip to content ──────────────────────────────────────── */
.skip-to-content {
	position: absolute;
	top: -100%;
	left: 1rem;
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--base);
	padding: 0.5rem 1rem;
	border-radius: 0 0 4px 4px;
	font-weight: 700;
	z-index: 10000;
	transition: top 0.2s;
}
.skip-to-content:focus {
	top: 0;
}

/* ── Logo: fade-in + shimmer animation ───────────────────── */
@keyframes ggs-logo-fadein {
	0%   { opacity: 0; transform: translateY(-6px); }
	100% { opacity: 1; transform: translateY(0); }
}

/* Shimmer: moves a bright highlight band left → right.
   background-size: 300% makes the gradient 3× the element width,
   so animating background-position sweeps the bright peak across. */
@keyframes ggs-logo-shimmer {
	0%   { background-position: 150% center; }  /* highlight off-screen right */
	40%  { background-position: -50% center; }  /* highlight swept past left edge */
	100% { background-position: -50% center; }  /* hold — creates a pause between runs */
}

.wp-block-site-title.ggs-logo-text,
.wp-block-site-title.ggs-logo-text a {
	/* Cinzel display font, styled as a wordmark */
	font-family: 'Cinzel', 'Times New Roman', serif !important;
	font-weight: 900 !important;
	font-size: clamp(1.25rem, 2.5vw, 1.75rem) !important;
	letter-spacing: 0.1em !important;
	text-transform: uppercase !important;
	text-decoration: none !important;
	line-height: 1 !important;
	white-space: nowrap !important;

	/* Gold shimmer gradient — bright spike in the middle */
	background: linear-gradient(
		90deg,
		#c9a227 0%,
		#c9a227 20%,
		#ffe28a 38%,
		#fff8d6 50%,  /* peak: near-white bright gold */
		#ffe28a 62%,
		#c9a227 80%,
		#c9a227 100%
	) !important;
	background-size: 300% auto !important;
	-webkit-background-clip: text !important;
	background-clip: text !important;
	-webkit-text-fill-color: transparent !important;
	color: transparent !important;

	/* Keep element in flow with no extra margin */
	display: inline-block;
}

/* Animation scoped to <a> so WordPress styles on the outer <p> cannot
   reset opacity or cancel the animation declaration. */
.wp-block-site-title.ggs-logo-text a {
	/* Phase 1: fade in over 0.7s.
	   Phase 2: shimmer runs every 4s, starting 0.9s after page load. */
	animation:
		ggs-logo-fadein  0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both,
		ggs-logo-shimmer 4s   linear                          0.9s infinite !important;
}

/* Ensure the <a> inside inherits the shimmer rather than being re-coloured
   by WordPress's global link styles */
.wp-block-site-title.ggs-logo-text a:hover {
	-webkit-text-fill-color: transparent !important;
	color: transparent !important;
	text-decoration: none !important;
}

/* ── Site Header ──────────────────────────────────────────── */
.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.site-header__topbar {
	font-size: var(--wp--preset--font-size--xs);
	border-bottom: 1px solid rgba(42, 42, 62, 0.6);
}

.site-header__topbar a {
	color: var(--wp--preset--color--text-muted);
	text-decoration: none;
	transition: color 0.15s ease;
}
.site-header__topbar a:hover {
	color: var(--wp--preset--color--gold);
}

.site-header__main {
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
}

/* ── Navigation ───────────────────────────────────────────── */
/* Primary nav link hover */
.site-header__nav .wp-block-navigation__container > .wp-block-navigation-item > a {
	padding: 0.4rem 0.75rem;
	border-radius: 4px;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.site-header__nav .wp-block-navigation__container > .wp-block-navigation-item > a:hover,
.site-header__nav .wp-block-navigation__container > .wp-block-navigation-item.is-active > a {
	color: var(--wp--preset--color--gold) !important;
	background-color: rgba(201, 162, 39, 0.08);
}

/* Submenu arrow color */
.wp-block-navigation-item__content .wp-block-navigation__submenu-icon svg {
	stroke: var(--wp--preset--color--text-muted);
}

/* Standard dropdown */
.wp-block-navigation__submenu-container {
	background-color: var(--wp--preset--color--surface) !important;
	border: 1px solid var(--wp--preset--color--border) !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
	border-radius: 0 0 8px 8px !important;
	min-width: 220px !important;
	padding: 0.5rem 0 !important;
}
.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	color: var(--wp--preset--color--text) !important;
	padding: 0.6rem 1.25rem !important;
	transition: background-color 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
	border-left: 2px solid transparent;
}
.wp-block-navigation__submenu-container .wp-block-navigation-item:hover .wp-block-navigation-item__content,
.wp-block-navigation__submenu-container .wp-block-navigation-item.is-active .wp-block-navigation-item__content {
	background-color: rgba(201, 162, 39, 0.08) !important;
	color: var(--wp--preset--color--gold) !important;
	border-left-color: var(--wp--preset--color--gold);
	padding-left: 1.5rem !important;
}

/* ── Mega Menu ────────────────────────────────────────────── */
/* .has-mega-menu class added to nav-submenu blocks in header.html */
.site-header__nav .has-mega-menu {
	position: static;
}

.site-header__nav .has-mega-menu > .wp-block-navigation__submenu-container {
	position: fixed;
	left: 0;
	right: 0;
	width: 100%;
	max-width: 100%;
	top: auto; /* JS sets this */
	background-color: var(--wp--preset--color--surface) !important;
	border-top: 2px solid var(--wp--preset--color--gold) !important;
	border-left: none !important;
	border-right: none !important;
	border-bottom: 1px solid var(--wp--preset--color--border) !important;
	border-radius: 0 !important;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7) !important;
	display: none;
	padding: 1.75rem 2rem !important;
	gap: 0.5rem;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	z-index: 999;
	min-width: unset !important;
}

.site-header__nav .has-mega-menu.is-open > .wp-block-navigation__submenu-container {
	display: grid;
}

.site-header__nav .has-mega-menu .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	display: block;
	padding: 0.6rem 0.875rem !important;
	border-radius: 4px;
	color: var(--wp--preset--color--text) !important;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
	border-left: 2px solid transparent;
}
.site-header__nav .has-mega-menu .wp-block-navigation__submenu-container .wp-block-navigation-item:hover .wp-block-navigation-item__content {
	color: var(--wp--preset--color--gold) !important;
	background-color: rgba(201, 162, 39, 0.07);
	border-left-color: var(--wp--preset--color--gold);
	padding-left: 1.25rem !important;
}

/* Mobile overlay nav */
.wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--base) !important;
}
.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg {
	fill: var(--wp--preset--color--text);
	stroke: var(--wp--preset--color--text);
}
.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation__responsive-container-content
.wp-block-navigation__container
> .wp-block-navigation-item
> .wp-block-navigation-item__content {
	color: var(--wp--preset--color--text) !important;
	font-size: var(--wp--preset--font-size--md);
	padding: 0.875rem 1rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.wp-block-navigation__responsive-container.is-menu-open a {
	color: var(--wp--preset--color--text) !important;
}

/* ── Header search ────────────────────────────────────────── */
.site-header__search .wp-block-search__input {
	background-color: var(--wp--preset--color--surface) !important;
	border: 1px solid var(--wp--preset--color--border) !important;
	color: var(--wp--preset--color--text) !important;
	border-radius: 4px !important;
	padding: 0.4rem 0.75rem !important;
	font-size: var(--wp--preset--font-size--sm) !important;
	transition: border-color 0.2s ease !important;
	width: 220px;
}
.site-header__search .wp-block-search__input:focus {
	border-color: var(--wp--preset--color--gold) !important;
	outline: none !important;
	box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.2) !important;
}
.site-header__search .wp-block-search__button {
	background-color: var(--wp--preset--color--gold) !important;
	border: none !important;
	border-radius: 4px !important;
	padding: 0.4rem 0.75rem !important;
	cursor: pointer;
}
.site-header__search .wp-block-search__button svg {
	fill: var(--wp--preset--color--base);
}

/* ── WooCommerce mini-cart ────────────────────────────────── */
.wp-block-woocommerce-mini-cart-contents {
	background-color: var(--wp--preset--color--surface) !important;
	border: 1px solid var(--wp--preset--color--border) !important;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6) !important;
}
.wc-block-mini-cart__button {
	color: var(--wp--preset--color--text) !important;
}
.wc-block-mini-cart__amount {
	color: var(--wp--preset--color--gold) !important;
}

/* ── Hero ─────────────────────────────────────────────────── */
.ggs-hero {
	position: relative;
}

.ggs-hero__gradient-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		transparent 40%,
		rgba(10, 10, 15, 0.5) 70%,
		var(--wp--preset--color--base) 100%
	);
	pointer-events: none;
	z-index: 1;
}

.ggs-hero .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
}

.ggs-hero__eyebrow {
	position: relative;
}
.ggs-hero__eyebrow::before,
.ggs-hero__eyebrow::after {
	content: '——';
	margin-inline: 0.6em;
	opacity: 0.4;
	font-weight: 400;
	letter-spacing: 0;
}

.ggs-hero__trust-row p {
	white-space: nowrap;
}

/* ── Category Grid ────────────────────────────────────────── */
.ggs-category-grid__items {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 1.25rem;
}

.ggs-cat-card {
	position: relative;
	overflow: hidden;
	cursor: pointer;
	transition: box-shadow 0.3s ease;
}
.ggs-cat-card:hover {
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 2px var(--wp--preset--color--gold);
}
.ggs-cat-card .wp-block-cover__image-background {
	transition: transform 0.5s ease;
}
.ggs-cat-card:hover .wp-block-cover__image-background {
	transform: scale(1.07);
}
.ggs-cat-card .wp-block-cover__inner-container {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	height: 100%;
	padding: 0;
}
.ggs-cat-card__eyebrow {
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* ── WooCommerce Archive Layout ───────────────────────────── */
.wc-archive__sidebar {
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	padding: 1.25rem;
	align-self: start;
	position: sticky;
	top: calc(var(--header-height, 80px) + 1rem);
}

.wc-archive__toolbar .woocommerce-result-count,
.wc-archive__toolbar .woocommerce-ordering,
.wc-archive__toolbar select {
	background-color: transparent !important;
	color: var(--wp--preset--color--text-muted) !important;
	border: none !important;
	font-size: var(--wp--preset--font-size--sm) !important;
	padding: 0 !important;
}

/* ── Product Cards ────────────────────────────────────────── */
.wc-product-card {
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}
.wc-product-card:hover {
	transform: translateY(-4px) !important;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--wp--preset--color--gold) !important;
	border-color: var(--wp--preset--color--gold) !important;
}
.wc-product-card .wp-block-woocommerce-product-image {
	overflow: hidden;
	border-radius: 8px 8px 0 0;
}
.wc-product-card .wp-block-woocommerce-product-image img {
	transition: transform 0.4s ease;
}
.wc-product-card:hover .wp-block-woocommerce-product-image img {
	transform: scale(1.05);
}

/* Post cards (blog) */
.ggs-post-card {
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.ggs-post-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
	border-color: var(--wp--preset--color--gold) !important;
}

/* ── Pagination ───────────────────────────────────────────── */
.wp-block-query-pagination .page-numbers,
.wp-block-query-pagination a {
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	color: var(--wp--preset--color--text);
	border-radius: 4px;
	padding: 0.4rem 0.875rem;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	font-size: var(--wp--preset--font-size--sm);
}
.wp-block-query-pagination .page-numbers:hover,
.wp-block-query-pagination a:hover {
	background-color: rgba(201, 162, 39, 0.1);
	border-color: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--gold);
}
.wp-block-query-pagination .current {
	background-color: var(--wp--preset--color--gold);
	border-color: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--base);
	font-weight: 700;
}

/* ── Breadcrumbs ──────────────────────────────────────────── */
.woocommerce-breadcrumb {
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--text-muted);
}
.woocommerce-breadcrumb a {
	color: var(--wp--preset--color--text-muted);
	text-decoration: none;
	transition: color 0.15s ease;
}
.woocommerce-breadcrumb a:hover {
	color: var(--wp--preset--color--gold);
}
.breadcrumb-sep {
	margin-inline: 0.3em;
	color: var(--wp--preset--color--border);
}

/* ── WooCommerce filter blocks ────────────────────────────── */
.wc-block-components-price-slider__range-input-wrapper {
	--range-color: var(--wp--preset--color--gold) !important;
}
.wc-block-components-filter-reset-button {
	color: var(--wp--preset--color--gold) !important;
}
.wc-block-active-filters {
	color: var(--wp--preset--color--text) !important;
}
.wc-block-active-filters__list-item-remove {
	color: var(--wp--preset--color--crimson) !important;
}

/* WC filter headings */
.wc-block-components-filter-element-label {
	font-family: var(--wp--preset--font-family--display);
	color: var(--wp--preset--color--gold);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--xs);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* ── Newsletter form ──────────────────────────────────────── */
.ggs-email-form {
	width: 100%;
}
.ggs-email-form__fields {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
}
.ggs-email-form__input {
	flex: 1 1 280px;
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	color: var(--wp--preset--color--text);
	border-radius: 4px;
	padding: 0.75rem 1rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--base);
	transition: border-color 0.2s ease;
}
.ggs-email-form__input::placeholder {
	color: var(--wp--preset--color--text-muted);
}
.ggs-email-form__input:focus {
	border-color: var(--wp--preset--color--gold);
	outline: none;
	box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.2);
}
.ggs-email-form__submit {
	background-color: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--base);
	border: none;
	border-radius: 4px;
	padding: 0.75rem 1.75rem;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--sm);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.15s ease;
}
.ggs-email-form__submit:hover {
	background-color: var(--wp--preset--color--gold-light);
	transform: translateY(-1px);
}
.ggs-email-form__note {
	text-align: center;
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--text-muted);
	margin: 0.75rem 0 0;
}

/* ── Promo banner gradient text fix ──────────────────────── */
.ggs-promo-banner h2,
.ggs-promo-banner p,
.ggs-promo-banner a {
	text-shadow: none;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
	border-top: 1px solid var(--wp--preset--color--border);
}
.site-footer a {
	color: var(--wp--preset--color--text-muted);
	text-decoration: none;
	transition: color 0.15s ease;
}
.site-footer a:hover {
	color: var(--wp--preset--color--gold);
}
.site-footer__bottom {
	font-size: var(--wp--preset--font-size--xs);
}

/* ── Single product ───────────────────────────────────────── */
.wc-single-product__gallery img {
	border-radius: 8px;
}
.woocommerce div.product .woocommerce-tabs ul.tabs {
	background: transparent;
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding: 0;
	margin: 0 0 -1px;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li {
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-bottom: none;
	border-radius: 4px 4px 0 0;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
	color: var(--wp--preset--color--text-muted);
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
	background-color: var(--wp--preset--color--surface-alt);
	border-bottom-color: var(--wp--preset--color--surface-alt);
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
	color: var(--wp--preset--color--gold);
}
.woocommerce div.product .woocommerce-tabs .panel {
	background-color: var(--wp--preset--color--surface-alt);
	border: 1px solid var(--wp--preset--color--border);
	border-top: none;
	border-radius: 0 0 6px 6px;
	padding: 1.5rem 2rem;
	color: var(--wp--preset--color--text);
}

/* ── Utility classes ──────────────────────────────────────── */
.text-gold    { color: var(--wp--preset--color--gold); }
.text-purple  { color: var(--wp--preset--color--purple); }
.text-crimson { color: var(--wp--preset--color--crimson); }
.text-muted   { color: var(--wp--preset--color--text-muted); }
.bg-surface   { background-color: var(--wp--preset--color--surface); }
.border-gold  { border-color: var(--wp--preset--color--gold) !important; }

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

@media (max-width: 768px) {
	.site-header__topbar {
		display: none;
	}
	.wc-archive__sidebar {
		display: none;
	}
	.ggs-category-grid__items {
		grid-template-columns: repeat(2, 1fr);
	}
	.site-header__main {
		padding-inline: 1rem;
	}
	.site-header__search {
		display: none;
	}
	.wp-block-site-title.ggs-logo-text,
	.wp-block-site-title.ggs-logo-text a {
		font-size: clamp(0.65rem, 4vw, 1.25rem) !important;
		letter-spacing: 0.04em !important;
	}
}

@media (max-width: 480px) {
	.ggs-category-grid__items {
		grid-template-columns: 1fr;
	}
	.ggs-hero__trust-row {
		flex-direction: column;
		gap: 0.5rem;
	}
}

/* ── Logo: reduced-motion fallback ───────────────────────────
   If the OS/browser has animations disabled, skip the fade-in
   so the logo is immediately visible at full opacity.         */
@media (prefers-reduced-motion: reduce) {
	.wp-block-site-title.ggs-logo-text a {
		opacity: 1 !important;
		animation: none !important;
	}
}
