/* =====================================================
   Nerf Commerce — Archive Page Stylesheet
   Location: templates/archive/archive.css
   ===================================================== */

.nerf-archive-main {
	background:
		linear-gradient(to right, color-mix(in srgb, var(--nerf-line) 55%, transparent) 1px, transparent 1px),
		linear-gradient(to bottom, color-mix(in srgb, var(--nerf-line) 55%, transparent) 1px, transparent 1px),
		var(--nerf-bg);
	background-size: 28px 28px;
	padding-bottom: 80px;
	min-height: 100vh;
}

/* ── Archive Header (Banner) ────────────────────────── */
.nerf-archive-hero {
	padding: 64px 0;
	border-bottom: 1px solid var(--nerf-line);
	background: var(--nerf-surface);
	margin-bottom: 48px;
}

.nerf-archive-hero-inner {
	display: flex;
	gap: 28px;
	align-items: center;
}

.nerf-author-avatar {
	flex-shrink: 0;
	width: 90px;
	height: 90px;
	border: 1px solid var(--nerf-line);
	background: var(--nerf-bg);
	overflow: hidden;
}

.nerf-author-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.nerf-archive-info {
	flex: 1;
}

.nerf-archive-eyebrow {
	display: inline-block;
	color: var(--nerf-primary);
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 6px;
}

.nerf-archive-hero h1 {
	font-size: clamp(28px, 4vw, 40px);
	font-weight: 950;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--nerf-ink);
	margin: 0 0 10px;
}

.nerf-archive-description {
	color: var(--nerf-muted);
	font-size: 14px;
	line-height: 1.6;
	margin: 0;
	max-width: 700px;
}

/* ── Post Grid ──────────────────────────────────────── */
.nerf-archive-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
	gap: 32px;
	list-style: none !important;
	padding: 0;
	margin: 0 0 48px;
}

.nerf-archive-grid li {
	margin: 0;
	list-style: none !important;
}

/* Post Card */
.nerf-post-card {
	background: var(--nerf-surface);
	border: 1px solid var(--nerf-line);
	box-shadow: var(--nerf-shadow);
	display: flex;
	flex-direction: column;
	height: 100%;
	transition: transform 150ms ease, box-shadow 150ms ease;
}

.nerf-post-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgb(17 24 39 / 6%);
}

.nerf-post-card-thumb {
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--nerf-bg);
	border-bottom: 1px solid var(--nerf-line);
	position: relative;
}

.nerf-post-card-thumb a {
	display: block;
	width: 100%;
	height: 100%;
}

.nerf-post-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 300ms ease;
}

.nerf-post-card:hover .nerf-post-card-thumb img {
	transform: scale(1.03);
}

.nerf-post-card-body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.nerf-post-card-meta {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	color: var(--nerf-muted);
	font-weight: 700;
	margin-bottom: 10px;
}

.nerf-post-card-cat {
	color: var(--nerf-primary);
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.nerf-post-card-title {
	font-size: 18px;
	font-weight: 850;
	line-height: 1.3;
	margin: 0 0 10px;
	letter-spacing: -0.01em;
}

.nerf-post-card-title a {
	color: var(--nerf-ink);
	text-decoration: none;
	transition: color 140ms ease;
}

.nerf-post-card-title a:hover {
	color: var(--nerf-primary);
}

.nerf-post-card-excerpt {
	color: var(--nerf-muted);
	font-size: 13px;
	line-height: 1.6;
	margin: 0 0 20px;
	flex-grow: 1;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.nerf-post-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-top: 1px solid var(--nerf-line);
	padding-top: 14px;
	font-size: 12px;
	color: var(--nerf-muted);
}

.nerf-post-card-author {
	display: flex;
	align-items: center;
	gap: 6px;
	color: inherit;
	text-decoration: none;
	font-weight: 800;
}

.nerf-post-card-author:hover {
	color: var(--nerf-primary);
}

.nerf-post-card-author-avatar {
	width: 20px;
	height: 20px;
	border: 1px solid var(--nerf-line);
	overflow: hidden;
}

.nerf-post-card-author-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ── Pagination ─────────────────────────────────────── */
.nerf-archive-main .pagination {
	margin-top: 24px;
}

.nerf-archive-main .pagination .nav-links {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.nerf-archive-main .pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	border: 1px solid var(--nerf-line);
	background: var(--nerf-surface);
	color: var(--nerf-ink);
	text-decoration: none;
	font-size: 13px;
	font-weight: 850;
	box-sizing: border-box;
	transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.nerf-archive-main .pagination .page-numbers.current {
	background: var(--nerf-primary);
	border-color: var(--nerf-primary);
	color: var(--nerf-primary-ink);
}

.nerf-archive-main .pagination .page-numbers:not(.current):hover {
	border-color: var(--nerf-primary);
	color: var(--nerf-primary);
}

.nerf-archive-main .pagination .page-numbers.prev,
.nerf-archive-main .pagination .page-numbers.next {
	padding: 0 12px;
	width: auto;
}

/* ── Empty State ────────────────────────────────────── */
.nerf-archive-empty {
	background: var(--nerf-surface);
	border: 1px solid var(--nerf-line);
	box-shadow: var(--nerf-shadow);
	padding: 48px;
	text-align: center;
}

.nerf-archive-empty h2 {
	margin: 0 0 12px;
	font-size: 20px;
	font-weight: 850;
}

.nerf-archive-empty p {
	color: var(--nerf-muted);
	font-size: 14px;
	margin: 0;
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 600px) {
	.nerf-archive-hero-inner {
		flex-direction: column;
		text-align: center;
		gap: 16px;
	}

	.nerf-archive-hero h1 {
		margin-top: 8px;
	}

	.nerf-archive-description {
		margin-inline: auto;
	}
}
