/*
Theme Name: Nerf Commerce
Theme URI: https://github.com/yourusername/nerf-theme
Author: Nerf Developer
Author URI: https://github.com/yourusername
Description: A traditional WordPress and WooCommerce theme with a sharp tactical storefront layout.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nerf
*/

:root {
	--nerf-bg: #f7f7f3;
	--nerf-surface: #ffffff;
	--nerf-ink: #171717;
	--nerf-muted: #68645d;
	--nerf-line: #e5e1d8;
	--nerf-primary: #0f766e;
	--nerf-primary-ink: #ffffff;
	--nerf-accent: #f59e0b;
	--nerf-danger: #be123c;
	--nerf-radius: 0;
	--nerf-shadow: 0 20px 60px rgb(17 24 39 / 9%);
	font-family: "Inter Variable", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dark {
	--nerf-bg: #1f201e;
	--nerf-surface: #2b2e2a;
	--nerf-ink: #fafbfa;
	--nerf-muted: #b9bcb7;
	--nerf-line: rgba(255, 255, 255, 0.1);
	--nerf-primary: #14b8a6;
	--nerf-primary-ink: #000000;
	--nerf-accent: #f59e0b;
	--nerf-danger: #ef4444;
	--nerf-shadow: 0 20px 60px rgb(0 0 0 / 45%);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--nerf-bg);
	color: var(--nerf-ink);
	font-family: "Inter Variable", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
	color: inherit;
}

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

.nerf-container {
	width: min(1180px, calc(100% - 32px));
	margin-inline: auto;
}

.nerf-site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	border-bottom: 1px solid var(--nerf-line);
	background: color-mix(in srgb, var(--nerf-surface) 88%, transparent);
	backdrop-filter: blur(16px);
}

.admin-bar .nerf-site-header {
	top: 32px;
}

.nerf-header-inner {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 24px;
	min-height: 68px;
}

.nerf-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	font-size: 18px;
	font-weight: 760;
	letter-spacing: 0;
}

.nerf-brand-mark {
	display: inline-grid;
	width: 34px;
	height: 34px;
	place-items: center;
	border-radius: var(--nerf-radius);
	background: var(--nerf-ink);
	color: #fff;
	font-weight: 800;
}

.dark .nerf-brand-mark {
	border: 1px solid var(--nerf-line);
	background: #171917;
	color: var(--nerf-ink);
}

.nerf-primary-nav {
	justify-self: center;
}

.nerf-menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--nerf-line);
	border-radius: 0;
	background: var(--nerf-surface);
	color: var(--nerf-ink);
	cursor: pointer;
	padding: 9px;
}

.nerf-menu-toggle span:not(.screen-reader-text) {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
}

.nerf-menu {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.nerf-mobile-only {
	display: none;
}

.nerf-menu a,
.nerf-cart-link,
.nerf-chip,
.nerf-account-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	border: 1px solid transparent;
	border-radius: var(--nerf-radius);
	padding: 8px 12px;
	color: var(--nerf-muted);
	font-size: 14px;
	font-weight: 650;
	text-decoration: none;
	transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.nerf-menu a:hover,
.nerf-cart-link:hover,
.nerf-chip:hover,
.nerf-account-link:hover {
	border-color: var(--nerf-line);
	background: var(--nerf-surface);
	color: var(--nerf-ink);
}

.nerf-cart-link {
	gap: 8px;
	width: 42px;
	height: 42px;
	min-height: 42px;
	border-color: var(--nerf-line);
	background: var(--nerf-surface);
	color: var(--nerf-ink);
	padding: 0;
	box-shadow: 0 8px 20px rgb(17 24 39 / 6%);
	position: relative;
}

.nerf-cart-link span {
	display: inline-grid;
	position: absolute;
	top: -7px;
	right: -7px;
	min-width: 22px;
	height: 22px;
	place-items: center;
	border-radius: 999px;
	background: var(--nerf-primary);
	color: #fff;
	font-size: 12px;
	line-height: 1;
}

.nerf-cart-link svg {
	width: 19px;
	height: 19px;
}

.nerf-account-link {
	width: 38px;
	height: 38px;
	min-height: 38px;
	border-color: var(--nerf-line);
	border-radius: var(--nerf-radius);
	background: var(--nerf-ink);
	color: var(--nerf-surface);
	padding: 0;
	box-shadow: 0 8px 20px rgb(17 24 39 / 6%);
	overflow: hidden;
}

.dark .nerf-account-link {
	background: #171917;
	color: var(--nerf-ink);
}

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

.nerf-account-link:hover {
	border-color: var(--nerf-primary);
	background: var(--nerf-primary);
	color: var(--nerf-primary-ink);
}

.nerf-account-link svg {
	width: 18px;
	height: 18px;
}

.nerf-header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.nerf-theme-toggle-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid var(--nerf-line);
	border-radius: var(--nerf-radius);
	background: var(--nerf-surface);
	color: var(--nerf-ink);
	cursor: pointer;
	padding: 0;
	transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
	box-shadow: 0 8px 20px rgb(17 24 39 / 4%);
}

.nerf-theme-toggle-btn:hover {
	border-color: var(--nerf-primary);
	background: var(--nerf-bg);
}

.nerf-theme-toggle-btn svg {
	width: 18px;
	height: 18px;
}

.nerf-theme-toggle-btn .nerf-sun-icon {
	display: none;
}

.nerf-theme-toggle-btn .nerf-moon-icon {
	display: block;
}

.dark .nerf-theme-toggle-btn .nerf-sun-icon {
	display: block;
}

.dark .nerf-theme-toggle-btn .nerf-moon-icon {
	display: none;
}

.nerf-site-main {
	min-height: calc(100vh - 148px);
}

.nerf-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	border: 1px solid transparent;
	border-radius: 0;
	color: inherit;
	font-size: 14px;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
	padding: 11px 16px;
	transition: background 160ms ease, border-color 160ms ease, color 160ms ease, filter 160ms ease;
}

.nerf-button-primary,
.nerf-button-secondary {
	background: var(--nerf-primary);
	color: var(--nerf-primary-ink);
}

.nerf-button-outline {
	border-color: var(--nerf-line);
	background: var(--nerf-surface);
	color: var(--nerf-ink);
}

.nerf-button:hover {
	filter: brightness(0.95);
}

.nerf-site-footer {
	border-top: 1px solid var(--nerf-line);
	background: var(--nerf-surface);
}

.nerf-footer-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 80px;
	color: var(--nerf-muted);
	font-size: 14px;
}

.nerf-footer-inner p {
	margin: 0;
}

.nerf-footer-inner a {
	font-weight: 700;
	text-decoration: none;
}

@media (max-width: 900px) {
	.admin-bar .nerf-site-header {
		top: 46px;
	}

	.nerf-header-inner {
		grid-template-columns: auto minmax(0, 1fr) auto;
		gap: 12px;
		padding: 12px 0;
		min-height: 74px;
	}

	.nerf-brand {
		grid-column: 1;
	}

	.nerf-menu-toggle {
		display: inline-grid;
		grid-column: 3;
		gap: 4px;
		order: 3;
	}

	.nerf-primary-nav {
		grid-column: 1 / -1;
		display: none;
		justify-self: stretch;
		width: 100%;
		border-top: 1px solid var(--nerf-line);
		padding-top: 12px;
	}

	.nerf-menu-open .nerf-primary-nav {
		display: block;
	}

	.nerf-menu {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
		min-width: 0;
	}

	.nerf-mobile-only {
		display: block;
	}

	.nerf-mobile-only span {
		display: inline-grid;
		min-width: 22px;
		height: 22px;
		place-items: center;
		margin-left: auto;
		border-radius: 999px;
		background: var(--nerf-primary);
		color: var(--nerf-primary-ink);
		font-size: 12px;
	}

	.nerf-menu a {
		border-color: var(--nerf-line);
		background: var(--nerf-surface);
		justify-content: flex-start;
		width: 100%;
	}

	.nerf-header-actions {
		grid-column: 2;
		justify-self: end;
		display: flex;
		gap: 8px;
	}

	.nerf-header-actions .nerf-cart-link {
		display: none;
	}
}

@media (max-width: 560px) {
	.nerf-container {
		width: min(100% - 24px, 1180px);
	}

	.nerf-brand {
		font-size: 16px;
	}

	.nerf-theme-toggle-btn,
	.nerf-account-link {
		width: 42px;
		height: 42px;
	}

	.nerf-menu {
		grid-template-columns: 1fr;
	}

	.nerf-footer-inner {
		flex-direction: column;
		align-items: flex-start;
		justify-content: center;
	}
}
