/**
 * Shop archive (Figma 85:5783 / 709:1083).
 * Title + shop nav + 3-column image grid.
 */

/* Only top-level groups in the block area — not nested block chrome (e.g. shop-slider header). */
.block-area-before-shop > .wp-block-group {
	padding: 40px 20px !important;
}

.block-area-before-shop > .wp-block-group .wp-block-heading {
	font-size: 40px !important;
}

.shop-archive {
	background-color: #faf8f6;
	box-sizing: border-box;
	color: #3b3b40;
	isolation: isolate;
	overflow-x: clip;
	padding-bottom: clamp(3rem, 6vw, 5rem);
	padding-top: clamp(2rem, 4vw, 3.5rem);
	position: relative;
	width: 100%;
}

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

/* Figma frame 709:1083 — 1241px wide @ 1440. */
.shop-archive__inner {
	display: flex;
	flex-direction: column;
	margin-left: auto;
	margin-right: auto;
	max-width: 77.5625rem; /* 1241px */
	padding-left: 1.25rem;
	padding-right: 1.25rem;
	position: relative;
	width: 100%;
	z-index: 1;
}

@media (min-width: 80rem) {
	.shop-archive__inner {
		padding-left: 0;
		padding-right: 0;
	}
}

/* -------------------------------------------------------------------------
   Header: “shop” + title (Figma 321:801)
   shop @ top 15 / 36px Paso Robles; title @ top 0 / 45px Sainte Colombe Light
   ------------------------------------------------------------------------- */

.shop-archive__header {
	align-items: flex-start;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	/* Figma: shop ends ~67, title starts 69 → ~2px. */
	gap: 0.125rem;
	height: 3.4375rem; /* 55px */
	justify-content: center;
	margin: 0 0 2.625rem; /* title block → nav: 97 − 55 = 42px */
	padding: 0;
	text-align: center;
	width: 100%;
}

.shop-archive__header-script {
	color: #3b3b40;
	flex: 0 0 auto;
	font-family: var(--wp--preset--font-family--paso-robles, "Paso Robles", cursive);
	font-size: 2.25rem; /* 36px */
	font-style: normal;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 2.125rem; /* 34px */
	margin: 0;
	/* Figma top offset vs title. */
	padding-top: 0.9375rem; /* 15px */
	white-space: nowrap;
}

.shop-archive h2.shop-archive__header-title,
.shop-archive__header-title {
	color: #000;
	flex: 0 0 auto;
	font-family: var(--wp--preset--font-family--sainte-colombe, "Sainte Colombe", Georgia, serif);
	font-size: 2.8125rem; /* 45px */
	font-style: normal;
	font-weight: 300;
	letter-spacing: -0.02em; /* −0.9px @ 45 */
	line-height: 3.4375rem; /* 55px */
	margin: 0;
	padding: 0;
	white-space: nowrap;
}

/* -------------------------------------------------------------------------
   Shop navigation (theme_location: shop) — Figma subcategory row
   ------------------------------------------------------------------------- */

.shop-archive__nav {
	margin: 0 0 3.375rem; /* nav bottom 117 → grid 171 = 54px */
	width: 100%;
}

.shop-archive__nav-list {
	display: flex;
	flex-wrap: wrap;
	/* Figma subcategory centers ~226px apart; keep even centered row. */
	gap: 1.25rem 6.5rem;
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0 2.1875rem; /* align with grid inset (35px) */
}

.shop-archive__nav-list li {
	margin: 0;
}

.shop-archive__nav-list a {
	color: #000;
	font-family: var(--wp--preset--font-family--overpass-mono, "Overpass Mono", monospace);
	font-size: 1rem; /* 16px */
	font-weight: 500;
	letter-spacing: 0.1em; /* 1.6px @ 16 */
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	transition: opacity 0.2s ease;
}

.shop-archive__nav-list a:hover,
.shop-archive__nav-list a:focus {
	opacity: 0.75;
	text-decoration: none;
}

.shop-archive__nav-list a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.shop-archive__nav-list .current-menu-item > a,
.shop-archive__nav-list .current_page_item > a {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

/* -------------------------------------------------------------------------
   Product grid — Figma image 58: 1169×1200, 3×3 tiles
   ------------------------------------------------------------------------- */

.shop-archive__grid {
	display: grid;
	column-gap: 1rem; /* ~16px visual gutters in export */
	grid-template-columns: repeat(3, minmax(0, 1fr));
	list-style: none;
	margin: 0 auto;
	max-width: 73.0625rem; /* 1169px */
	padding: 0;
	row-gap: 2.5rem;
	width: 100%;
}

.shop-archive__grid-item {
	margin: 0;
	min-width: 0;
}

.shop-archive__product-link {
	color: inherit;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	text-decoration: none;
	width: 100%;
}

.shop-archive__product-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.shop-archive__product-frame {
	align-items: center;
	aspect-ratio: 1;
	background-color: #e8e8e8;
	display: flex;
	justify-content: center;
	overflow: hidden;
	padding: 1.25rem; /* keep product artwork inset like Figma tiles */
	width: 100%;
}

.shop-archive__product-image {
	display: block;
	height: auto;
	max-height: 100%;
	max-width: 100%;
	object-fit: contain;
	transition: transform 300ms ease;
	width: auto;
}

.shop-archive__product-link:hover .shop-archive__product-image,
.shop-archive__product-link:focus-visible .shop-archive__product-image {
	transform: scale(1.04);
}

.shop-archive__product-name {
	font-family: var(--wp--preset--font-family--overpass-mono, "Overpass Mono", monospace);
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.1em;
	line-height: 1.2;
	margin: 0;
	text-align: center;
	text-transform: uppercase;
}

.shop-archive__empty {
	color: inherit;
	font-family: var(--wp--preset--font-family--proxima-nova, "Proxima Nova", sans-serif);
	font-size: 1rem;
	margin: 0;
	opacity: 0.75;
	padding: 0 2.1875rem;
	text-align: center;
}

@media (prefers-reduced-motion: reduce) {
	.shop-archive__product-image {
		transition: none;
	}

	.shop-archive__product-link:hover .shop-archive__product-image,
	.shop-archive__product-link:focus-visible .shop-archive__product-image {
		transform: none;
	}
}

@media (max-width: 64rem) {
	.shop-archive__nav-list {
		gap: 1rem 2.5rem;
	}
}

@media (max-width: 47.9375rem) {
	.shop-archive__header {
		height: auto;
		margin-bottom: 2rem;
	}

	.shop-archive__header-script {
		font-size: 1.75rem;
		line-height: 1.05;
		padding-top: 0.5rem;
	}

	.shop-archive h2.shop-archive__header-title,
	.shop-archive__header-title {
		font-size: 2.25rem;
		line-height: 1.15;
	}

	.shop-archive__nav {
		margin-bottom: 2rem;
	}

	.shop-archive__nav-list {
		gap: 1rem 1.5rem;
		padding: 0 1.25rem;
	}

	.shop-archive__grid {
		column-gap: 0.75rem;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		padding: 0 1.25rem;
		row-gap: 2rem;
	}

	.shop-archive__product-frame {
		padding: 0.75rem;
	}
}
