/*
Theme Name: Wrap & Ready
Theme URI: https://wrapandready.local/
Author: Wrap & Ready
Description: Storefront theme for the Wrap & Ready gift listings. Product post type, five-axis taxonomy nav, and Pinterest-destined single pages.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wrap-and-ready
Tags: e-commerce, one-column, custom-menu
*/

/* -------------------------------------------------------------------------
   The whole storefront design system. Cards, taxonomy pages, and the single
   listing page all read from these tokens.
   ---------------------------------------------------------------------- */

:root {
	/* Paper + ink */
	--paper: #f2f0ea;
	--card: #fffdf8;
	--ink: #1c1a17;
	--ink-soft: #5d564d;
	--rule: #d9d3c6;

	/* Category inks — the scanning device */
	--c-tech: #2b58d6;
	--c-desk: #1d7a44;
	--c-kitchen: #d96a1f;
	--c-home: #7c4db8;
	--c-outdoors: #0f7d84;
	--c-games: #b03050;

	/* Type */
	--font-display: "Archivo Black", "Arial Black", system-ui, sans-serif;
	--font-body: "Public Sans", -apple-system, "Segoe UI", sans-serif;
	--font-mono: "Space Mono", ui-monospace, "Cascadia Mono", monospace;

	--maxw: 1900px;
	--maxw-read: 1280px;
	--pad: clamp(1.25rem, 4vw, 5rem);
	--radius: 10px;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
}

:focus-visible {
	outline: 3px solid var(--ink);
	outline-offset: 2px;
}

.skip-link {
	position: absolute;
	left: -999px;
	top: 0;
	background: var(--ink);
	color: var(--paper);
	padding: 0.6rem 1rem;
	z-index: 10;
}

.skip-link:focus {
	left: 0;
}

.wrap {
	width: 100%;
	max-width: calc(var(--maxw) + var(--pad) * 2);
	margin: 0 auto;
	padding-inline: var(--pad);
}

/*
 * Reading blocks hold narrower than the catalog grid. Only the grid of cards
 * earns 1900px: at that width a listing's sticky image column is 900px across
 * and a guide headline sits alone in the left third of the screen.
 */
.wrap--read {
	max-width: calc(var(--maxw-read) + var(--pad) * 2);
}

/* Header — wordmark row + category menu bar */
.site-header {
	border-bottom: 3px solid var(--ink);
	background: var(--paper);
}

.header-top {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 1.1rem;
	padding-bottom: 0.6rem;
}

.wordmark {
	font-family: var(--font-display);
	font-size: 1.5rem;
	letter-spacing: -0.02em;
	text-decoration: none;
	text-transform: uppercase;
}

.wordmark em {
	font-style: normal;
	color: var(--c-tech);
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 0.9rem;
}

.menu-toggle {
	display: none;
}

.saved-link {
	font-family: var(--font-mono);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	text-decoration: none;
	color: var(--ink-soft);
	white-space: nowrap;
}

.saved-link:hover {
	color: var(--ink);
}

.cat-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.4rem;
	padding-top: 0.35rem;
	padding-bottom: 0.7rem;
	border-top: 1px solid var(--rule);
}

.cat-nav a {
	font-family: var(--font-mono);
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	text-decoration: none;
	color: var(--ink);
	padding: 0.9rem 0 3px;
	border-bottom: 2px solid transparent;
	white-space: nowrap;
}

.cat-nav a:hover {
	border-color: var(--ink);
}

.cat-nav-all {
	background: var(--ink);
	color: var(--paper) !important;
	border-radius: 999px;
	padding: 0.62rem 1.05rem !important;
	align-self: center;
	border-bottom: 2px solid var(--ink) !important;
}

.cat-nav-all:hover {
	background: var(--c-tech);
	border-color: var(--c-tech) !important;
}

/* Header axis dropdowns (mirror the footer directory) */
.nav-drop {
	position: relative;
}

.nav-drop summary {
	font-family: var(--font-mono);
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ink);
	padding: 0.9rem 0 3px;
	border-bottom: 2px solid transparent;
	white-space: nowrap;
	cursor: pointer;
	list-style: none;
}

.nav-drop summary::-webkit-details-marker {
	display: none;
}

.nav-drop summary::after {
	content: ' ▾';
	font-size: 0.7em;
}

.nav-drop summary:hover,
.nav-drop[open] summary {
	color: var(--c-tech);
	border-color: var(--c-tech);
}

.nav-drop-panel {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 60;
	min-width: 260px;
	max-width: min(420px, 88vw);
	margin: 0;
	list-style: none;
	padding: 0.55rem 0 0.7rem;
	columns: 2;
	column-gap: 0;
}

.nav-drop-panel::before {
	content: '';
	position: absolute;
	top: 0.55rem;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--paper);
	border: 2px solid var(--ink);
	box-shadow: 6px 6px 0 rgba(28, 26, 23, 0.14);
}

.nav-drop-panel > li {
	position: relative;
	break-inside: avoid;
	padding: 0 0.9rem;
}

.nav-drop-panel a {
	display: block;
	font-family: var(--font-mono);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ink);
	text-decoration: none;
	padding: 0.45rem 0.5rem;
}

.nav-drop-panel a:hover {
	background: var(--ink);
	color: var(--paper);
}

.nav-drop-all a {
	color: var(--c-tech);
	font-weight: 700;
}

/*
 * On a wide screen the menu is a bar, not a list of words that stops a third of
 * the way across. Each axis grows, so the five segments and the browse pill span
 * the full content width and a hover underline runs the length of its segment.
 * Below 901px the labels need their natural widths to keep the row on one line.
 */
@media (min-width: 901px) {
	.cat-nav {
		column-gap: 1rem;
	}

	.cat-nav > .nav-drop {
		flex: 1 1 auto;
	}

	.cat-nav > .cat-nav-all {
		flex: 0 0 auto;
	}
}

@media (max-width: 640px) {
	.menu-toggle {
		display: inline-flex;
		align-items: center;
		gap: 0.5rem;
		min-height: 44px;
		padding: 0 0.95rem;
		font-family: var(--font-mono);
		font-size: 0.75rem;
		text-transform: uppercase;
		letter-spacing: 0.08em;
		color: var(--ink);
		background: transparent;
		border: 2px solid var(--ink);
		border-radius: 999px;
		cursor: pointer;
	}

	.menu-bars,
	.menu-bars::before,
	.menu-bars::after {
		content: '';
		display: block;
		width: 15px;
		height: 2px;
		background: var(--ink);
	}

	.menu-bars {
		position: relative;
	}

	.menu-bars::before {
		position: absolute;
		top: -5px;
	}

	.menu-bars::after {
		position: absolute;
		top: 5px;
	}

	/* The whole menu collapses behind the button so the bar stays one row tall */
	.site-header {
		position: relative;
	}

	.cat-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		z-index: 70;
		max-height: calc(100vh - 74px);
		overflow-y: auto;
		padding: 0.2rem var(--pad) 1.1rem;
		background: var(--paper);
		border-bottom: 3px solid var(--ink);
		box-shadow: 0 14px 26px rgba(28, 26, 23, 0.14);
	}

	.cat-nav.is-open {
		display: block;
	}

	.nav-drop {
		border-bottom: 1px solid var(--rule);
	}

	.nav-drop summary {
		display: flex;
		align-items: center;
		justify-content: space-between;
		min-height: 48px;
		padding: 0;
		font-size: 0.875rem;
		border-bottom: none;
	}

	.nav-drop summary:hover,
	.nav-drop[open] summary {
		color: var(--c-tech);
		border-color: transparent;
	}

	.nav-drop-panel {
		position: static;
		width: auto;
		min-width: 0;
		max-width: none;
		margin: 0 0 0.5rem;
		padding: 0;
		columns: 1;
	}

	.nav-drop-panel::before {
		display: none;
	}

	.nav-drop-panel > li {
		padding: 0;
	}

	.nav-drop-panel a {
		font-size: 0.8rem;
		padding: 0.72rem 0.25rem;
	}

	.cat-nav-all {
		display: inline-block;
		margin-top: 0.9rem;
		padding: 0.6rem 1.05rem !important;
	}
}

@media (max-width: 400px) {
	.header-top {
		gap: 0.5rem;
	}

	.header-actions {
		gap: 0.45rem;
	}

	.wordmark {
		font-size: 1.05rem;
	}

	.saved-link {
		font-size: 0.62rem;
		letter-spacing: 0.02em;
	}

	.menu-toggle {
		padding: 0 0.6rem;
		gap: 0.35rem;
		font-size: 0.66rem;
		letter-spacing: 0.04em;
	}
}

/* Intro line */
.intro {
	padding-top: 2.5rem;
	padding-bottom: 1.5rem;
}

.intro h1 {
	font-family: var(--font-display);
	font-size: clamp(2rem, 4.6vw, 5.5rem);
	line-height: 1.02;
	letter-spacing: -0.02em;
	margin: 0 0 0.6rem;
	text-transform: uppercase;
}

.intro p {
	margin: 0 0 1rem;
	max-width: clamp(40ch, 52vw, 76ch);
	color: var(--ink-soft);
	font-size: clamp(1.05rem, 1.05vw, 1.35rem);
}

.intro .lead {
	max-width: 68ch;
	margin: 0 0 1rem;
}

.intro h1.tinted {
	color: var(--cat, var(--ink));
}

.crumb {
	margin: 0 0 1rem;
	font-family: var(--font-mono);
	font-size: 0.8rem;
}

.crumb a {
	color: var(--ink-soft);
	text-decoration: none;
}

.crumb a:hover {
	color: var(--ink);
	text-decoration: underline;
}

/* Filter chips */
.filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding-top: 1rem;
	padding-bottom: 2rem;
}

.filter {
	font-family: var(--font-mono);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 0.45rem 0.9rem;
	border-radius: 999px;
	border: 2px solid var(--ink);
	background: transparent;
	color: var(--ink);
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}

.filter:hover {
	background: var(--ink);
	color: var(--paper);
}

/*
 * The chip row is a bar too, and left-packed it stopped a third of the way across a
 * 1440px screen. Only from 1200px: the seven chips need about 1030px, and
 * space-between on a row that has wrapped flings the leftovers to both edges, which
 * is a worse defect than the gap it fills.
 */
@media (min-width: 1200px) {
	.filters {
		justify-content: space-between;
		column-gap: 1rem;
	}
}

.filter.is-active,
.filter[aria-pressed="true"] {
	background: var(--ink);
	color: var(--paper);
}

.count {
	font-family: var(--font-mono);
	font-size: 0.8rem;
	color: var(--ink-soft);
	padding-bottom: 1rem;
}

/* Grid */
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
	gap: 1.25rem;
	padding-bottom: 4rem;
}

/* Product card */
.card-wrap {
	position: relative;
}

.card-wrap[hidden] {
	display: none;
}

.card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--card);
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	overflow: hidden;
	text-decoration: none;
}

.card:hover {
	transform: translateY(-3px);
	box-shadow: 6px 6px 0 var(--ink);
}

/* Save button (heart) */
.save {
	position: absolute;
	top: 0.6rem;
	right: 0.6rem;
	z-index: 2;
	width: 2.3rem;
	height: 2.3rem;
	border-radius: 50%;
	border: 2px solid var(--ink);
	background: var(--card);
	color: var(--ink-soft);
	display: grid;
	place-items: center;
	cursor: pointer;
	padding: 0;
}

.save:hover {
	color: var(--c-games);
}

.save[aria-pressed="true"] {
	background: var(--c-games);
	border-color: var(--ink);
	color: #fff;
}

.thumb {
	aspect-ratio: 1 / 1;
	background: var(--card);
	background: color-mix(in srgb, var(--cat, var(--ink)) 12%, var(--card));
	display: grid;
	place-items: center;
	border-bottom: 2px solid var(--ink);
	color: var(--cat, var(--ink));
	font-family: var(--font-display);
	font-size: 3rem;
	overflow: hidden;
}

.thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card-body {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: 0.9rem 1rem 1rem;
	flex: 1;
}

.cat-label {
	font-family: var(--font-mono);
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--cat, var(--ink));
}

.card-title {
	font-size: 1.06rem;
	font-weight: 700;
	line-height: 1.25;
	margin: 0;
}

.blurb {
	margin: 0 0 0.35rem;
	font-size: 0.88rem;
	color: var(--ink-soft);
	/* Not flex:1 — stretching a -webkit-line-clamp box past its own limit makes
	   the browser paint the ellipsis and then keep leaking lines below it. */
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Signature: punched price tag, rotated slightly like a sticker */
.tag {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	margin-top: auto;
	padding: 0.35rem 0.85rem 0.35rem 1.4rem;
	background: var(--cat, var(--ink));
	color: #fff;
	font-family: var(--font-mono);
	font-weight: 700;
	font-size: 0.95rem;
	border-radius: 4px 6px 6px 4px;
	transform: rotate(-2deg);
	position: relative;
	clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%);
}

.tag::before {
	content: "";
	position: absolute;
	left: 12px;
	top: 50%;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--paper);
	transform: translateY(-50%);
	box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.25);
}

.card:hover .tag {
	transform: rotate(0deg);
}

@media (prefers-reduced-motion: reduce) {
	.card,
	.tag,
	.card:hover,
	.card:hover .tag {
		transition: none;
		transform: none;
	}
	.card:hover {
		box-shadow: none;
	}
}

/* Footer */
.site-footer {
	border-top: 3px solid var(--ink);
	padding: 2rem 0 3rem;
	font-size: 0.9rem;
	color: var(--ink-soft);
}

.site-footer p {
	max-width: 70ch;
}

.footer-dir {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
	gap: 1.5rem 1rem;
	padding-bottom: 2.25rem;
	border-bottom: 1px solid var(--rule);
	margin-bottom: 1.5rem;
}

.footer-col h2 {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--ink);
	margin: 0 0 0.6rem;
	border-bottom: 2px solid var(--ink);
	display: inline-block;
	padding-bottom: 1px;
}

.footer-col ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.footer-col a {
	font-family: var(--font-mono);
	font-size: 0.74rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--ink-soft);
	text-decoration: none;
}

.footer-col a:hover {
	color: var(--ink);
	text-decoration: underline;
}

/*
 * Disclosure line + the four pages a buyer or a review team looks for.
 * Set as a baseline row that wraps to two on a phone: the sentence and the
 * links have to stay adjacent, because the disclosure is what the links page
 * is for.
 */
.footer-legal {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
}

.footer-note {
	margin: 0;
}

.footer-legal-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1rem;
}

.footer-legal-nav a {
	font-family: var(--font-mono);
	font-size: 0.74rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--ink-soft);
	text-decoration: none;
}

.footer-legal-nav a:hover {
	color: var(--ink);
	text-decoration: underline;
}

/* -------------------------------------------------------------------------
   Directory page (/browse/) — capsule links per axis
   ---------------------------------------------------------------------- */

.axis {
	padding-top: 1.5rem;
	padding-bottom: 0.5rem;
}

.axis-title {
	font-family: var(--font-display);
	font-size: 1.1rem;
	text-transform: uppercase;
	letter-spacing: -0.01em;
	margin: 0 0 0.75rem;
	border-bottom: 2px solid var(--ink);
	display: inline-block;
	padding-bottom: 2px;
}

.axis-links {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0;
	margin: 0;
}

.axis-links a {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border: 2px solid var(--ink);
	border-radius: 999px;
	padding: 0.45rem 0.9rem;
	text-decoration: none;
}

.axis-links a:hover {
	background: var(--cat, var(--ink));
	border-color: var(--cat, var(--ink));
	color: #fff;
}

/* -------------------------------------------------------------------------
   Home page cross-link row
   ---------------------------------------------------------------------- */

.axes {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem 1rem;
	padding-top: 0.5rem;
	padding-bottom: 4rem;
}

.axes p {
	margin: 0;
	font-family: var(--font-display);
	font-size: 1rem;
	text-transform: uppercase;
}

.axes ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0;
	margin: 0;
}

.axes a {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border: 2px solid var(--ink);
	border-radius: 999px;
	padding: 0.4rem 0.9rem;
	text-decoration: none;
}

.axes a:hover {
	background: var(--ink);
	color: var(--paper);
}

/* -------------------------------------------------------------------------
   "More finds" / "Keep browsing" bands on list pages
   ---------------------------------------------------------------------- */

.more {
	padding-bottom: 2.5rem;
}

.more:last-of-type {
	padding-bottom: 4rem;
}

.more-grid {
	padding-bottom: 0;
}

.more-title {
	font-family: var(--font-display);
	font-size: 1.1rem;
	text-transform: uppercase;
	margin: 0 0 0.75rem;
}

.more ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0;
	margin: 0;
}

/* Scoped to the link list: a .more section can also hold a card grid, and those
   cards bring their own anchor styling. */
.more li a {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border: 2px solid var(--ink);
	border-radius: 999px;
	padding: 0.45rem 0.9rem;
	text-decoration: none;
}

.more li a:hover {
	background: var(--ink);
	color: var(--paper);
}

/* -------------------------------------------------------------------------
   Curated list pages (Home & Office)
   ---------------------------------------------------------------------- */

.section-title {
	font-family: var(--font-display);
	font-size: 1.4rem;
	text-transform: uppercase;
	letter-spacing: -0.01em;
	border-bottom: 3px solid var(--ink);
	padding-bottom: 0.5rem;
	margin: 1rem 0 1.5rem;
}

.section-title span {
	font-family: var(--font-mono);
	font-size: 0.85rem;
	color: var(--ink-soft);
}

.sourced {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	color: var(--ink-soft);
	padding-bottom: 4rem;
}

.empty {
	font-family: var(--font-mono);
	font-size: 0.9rem;
	color: var(--ink-soft);
	padding-bottom: 4rem;
}

/* -------------------------------------------------------------------------
   Single listing — the destination a Pinterest pin points at
   ---------------------------------------------------------------------- */

.listing {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(1.5rem, 4vw, 4rem);
	padding-top: 1.5rem;
	padding-bottom: 3rem;
	align-items: start;
}

.listing-media {
	position: sticky;
	top: 1rem;
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--card);
}

.listing-media img {
	display: block;
	width: 100%;
	height: auto;
}

.listing-panel h1 {
	font-family: var(--font-display);
	font-size: clamp(1.6rem, 3vw, 2.9rem);
	line-height: 1.06;
	letter-spacing: -0.02em;
	margin: 0 0 0.8rem;
	text-transform: uppercase;
}

.listing-panel .cat-label {
	font-size: 0.72rem;
	display: block;
	margin-bottom: 0.5rem;
}

.listing-blurb {
	font-size: 1.05rem;
	color: var(--ink-soft);
	margin: 0 0 1.5rem;
	max-width: 62ch;
}

.listing-body {
	max-width: 68ch;
	font-size: 1.02rem;
}

.listing-body p {
	margin: 0 0 1rem;
}

.buy-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.9rem;
	margin: 0 0 1.5rem;
}

/* The caption that sits under the buy button, so the funding disclosure is one
 * click from every outbound link rather than only in the footer. */
.buy-note {
	margin: -1.1rem 0 1.5rem;
	font-size: 0.78rem;
	line-height: 1.45;
	color: var(--ink-soft);
}

.buy-note a {
	color: inherit;
}

.buy-note a:hover {
	color: var(--ink);
}

.buy-button {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--font-mono);
	font-size: 0.9rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	background: var(--ink);
	color: var(--paper);
	border: 2px solid var(--ink);
	border-radius: 999px;
	padding: 0.8rem 1.4rem;
	text-decoration: none;
}

.buy-button:hover {
	background: var(--c-tech);
	border-color: var(--c-tech);
	color: #fff;
}

.buy-price {
	font-family: var(--font-mono);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--cat, var(--ink));
}

/* Pinterest save + the rest of the share row */
.share-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	padding-top: 1rem;
	border-top: 1px solid var(--rule);
}

.share-title {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--ink-soft);
	margin: 0 0.4rem 0 0;
}

.pin-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	text-decoration: none;
	color: #fff;
	background: #b6011a;
	border: 2px solid var(--ink);
	border-radius: 999px;
	padding: 0.5rem 1rem;
}

.pin-button:hover {
	background: #900015;
}

.pin-button svg {
	display: block;
}

.copy-link {
	display: inline-flex;
	align-items: center;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	background: transparent;
	color: var(--ink);
	border: 2px solid var(--ink);
	border-radius: 999px;
	padding: 0.5rem 1rem;
	cursor: pointer;
}

.copy-link:hover {
	background: var(--ink);
	color: var(--paper);
}

.tag-strip {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	padding: 1.2rem 0 0;
}

.tag-strip a {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	text-decoration: none;
	border: 2px solid var(--rule);
	border-radius: 999px;
	padding: 0.35rem 0.8rem;
	color: var(--ink-soft);
}

.tag-strip a:hover {
	border-color: var(--ink);
	color: var(--ink);
	background: var(--card);
}

.narrow {
	padding-bottom: 4rem;
}

.narrow p {
	max-width: 62ch;
	font-size: 1.05rem;
}

/*
 * Body links in the reading blocks. `a { color: inherit }` up top means an
 * underlined-by-default anchor is the only thing separating a link from the
 * sentence around it, and a privacy policy whose links read as text is both a
 * WCAG 1.4.1 failure and a dead end for the one reader who needed it.
 */
.narrow a,
.browse-body a {
	text-decoration: underline;
	text-underline-offset: 0.16em;
	text-decoration-thickness: 1px;
}

.narrow a:hover,
.browse-body a:hover {
	text-decoration-thickness: 2px;
}

.browse-body {
	padding: 3.2rem 0 4.5rem;
	margin-top: 1.5rem;
	border-top: 1px solid var(--rule);
}

.browse-body h2 {
	font-family: var(--font-display);
	font-size: clamp(1.45rem, 2.3vw, 2.05rem);
	line-height: 1.12;
	letter-spacing: -0.01em;
	margin: 0 0 1.2rem;
}

.browse-body h3 {
	font-family: var(--font-mono);
	font-size: 0.76rem;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	color: var(--ink-soft);
	margin: 2.4rem 0 0.55rem;
}

.browse-body p {
	max-width: 66ch;
	font-size: 1.05rem;
	line-height: 1.62;
	margin: 0 0 1rem;
}

@media (max-width: 900px) {
	.listing {
		grid-template-columns: minmax(0, 1fr);
	}

	.listing-media {
		position: static;
	}
}

/* WordPress injects these on images and the gallery; keep them inside the card */
.wp-block-image img,
.listing-media img {
	max-width: 100%;
	height: auto;
}

.alignleft {
	float: left;
	margin: 0 1rem 1rem 0;
}

.alignright {
	float: right;
	margin: 0 0 1rem 1rem;
}

.aligncenter {
	display: block;
	margin: 0 auto 1rem;
}

/* Gift guides (listicles are posts; this is the homepage strip they surface in) */
.lists-section {
	padding-bottom: 1rem;
}

.lists-head {
	display: flex;
	align-items: flex-end;
	gap: 1rem;
}

/* The heading keeps the row and its rule runs to the arrows instead of under them. */
.lists-head .section-title {
	flex: 1 1 auto;
}

.lists-arrows {
	display: flex;
	gap: 0.4rem;
	padding-bottom: 0.2rem;
}

/* display:flex here would otherwise beat the UA's [hidden] rule. */
.lists-arrows[hidden] {
	display: none;
}

.lists-arrow {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 2px solid var(--ink);
	border-radius: 999px;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-mono);
	font-size: 1.05rem;
	line-height: 1;
	cursor: pointer;
}

.lists-arrow:hover {
	background: var(--ink);
	color: var(--paper);
}

.lists-arrow[disabled] {
	opacity: 0.28;
	cursor: default;
}

.lists-arrow[disabled]:hover {
	background: var(--paper);
	color: var(--ink);
}

/*
 * A rail, not a grid: eight guides in one scrollable row. Fixed card widths mean
 * the strip is one line tall at every viewport, and the next card peeking past the
 * right edge is what says the row continues — no count of "8" needed.
 */
.lists {
	display: flex;
	gap: 1.25rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	/*
	 * The negative margins cancel the padding, so the cards stay flush with the
	 * wrap while the padding gives a focused card's outline room inside the
	 * scroll container's clip box.
	 */
	padding: 6px 6px 2rem;
	margin: -6px -6px 0;
}

.lists::-webkit-scrollbar {
	display: none;
}

@media (prefers-reduced-motion: no-preference) {
	.lists {
		scroll-behavior: smooth;
	}
}

.list-card {
	display: grid;
	gap: 0.45rem;
	padding: 0.9rem;
	flex: 0 0 280px;
	scroll-snap-align: start;
	border: 2px solid var(--ink);
	border-radius: 14px;
	background: var(--paper);
	color: var(--ink);
	text-decoration: none;
}

@media (max-width: 400px) {
	/* At 320px a 280px card fills the row and the next one is invisible. */
	.list-card {
		flex-basis: min(280px, 76vw);
	}
}

.list-card:hover {
	background: var(--ink);
	color: var(--paper);
}

.list-thumb {
	display: block;
	aspect-ratio: 4 / 3;
	border-radius: 9px;
	background-color: rgba(28, 26, 23, 0.07);
	background-position: center;
	background-size: cover;
}

/* A guide with no cover and nothing to fan reads as a typographic card. */
.list-thumb:not(.has-image):not(.has-fan) {
	display: none;
}

/* Three of the guide's own listings, fanned: one lead image, two stacked. */
.list-thumb.has-fan {
	display: grid;
	grid-template-columns: 2fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: 2px;
	background: none;
	overflow: hidden;
}

.list-thumb.has-fan img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.list-thumb.has-fan img:first-child {
	grid-row: 1 / span 2;
}

.list-card:hover .list-thumb.has-image {
	outline: 2px solid var(--paper);
}

.list-name {
	font-family: var(--font-display);
	font-size: 1.05rem;
	line-height: 1.2;
}

.list-count {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.72;
}

/* Sort + price control over the homepage shelf */
.sortbar {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	gap: 0.75rem 1rem;
	padding-bottom: 1.5rem;
}

.sort-field {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.sort-field select {
	font: inherit;
	padding: 0.4rem 0.6rem;
	border: 2px solid var(--ink);
	border-radius: 999px;
	background: transparent;
	color: var(--ink);
	max-width: 100%;
}

.sort-status {
	margin: 0;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	color: var(--ink-soft);
}

/* A guide's own page */
.guide {
	padding-top: 2rem;
}

.guide h1 {
	font-size: clamp(2rem, 6vw, 3.4rem);
	margin: 0.35rem 0 1rem;
}

.guide-body {
	max-width: 62ch;
}

.guide-body p {
	line-height: 1.65;
}

.lists-inline {
	grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
}
