/* =========================================================================
   Red Dot Geek — main.css
   Shared layout, header, footer, base typography, home + 404
   ========================================================================= */

:root {
	--black:  #111;
	--yellow: #FFE600;
	--red:    #E53935;
	--cream:  #fff9e6;
	--dot:    #f0d080;
	--border: 4px solid #111;
	--shadow: 5px 5px 0 #111;
	--head:   'Bangers', cursive;
	--body:   'Comic Neue', cursive;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
	font-family: var(--body);
	background: var(--cream);
	background-image: radial-gradient(circle, var(--dot) 1px, transparent 1px);
	background-size: 14px 14px;
	color: var(--black);
}

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--black); }

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

/* WP admin bar adjustment so the sticky header isn't hidden underneath it */
/* body.admin-bar .site-header-wrap { top: 32px; } */
@media screen and (max-width: 782px) {
	body.admin-bar .site-header-wrap { top: 46px; }
}

/* Zero the .site top margin when the admin bar is visible so the header
   sits flush against the admin bar — visitors still get the 20px gap. */
/* body.admin-bar .site { margin-top: 0; } */

/* =========================================================================
   FRAME
   ========================================================================= */
.site {
	border: var(--border);
	max-width: 1200px;
	margin: 20px auto;
	overflow: hidden;
	background: var(--cream);
}

/* =========================================================================
   HEADER
   ========================================================================= */
.site-header-wrap {
	position: sticky;
	top: 0;
	z-index: 100;
}
.site-header {
	background: var(--black);
	border-bottom: var(--border);
}
.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 60px;
	padding: 0 1.5rem;
	gap: 1rem;
}
.logo {
	font-family: var(--head);
	font-size: 30px;
	letter-spacing: 4px;
	color: var(--yellow);
	text-shadow: 3px 3px 0 var(--red);
	text-decoration: none;
}
.logo span { color: var(--red); text-shadow: 3px 3px 0 var(--yellow); }
.logo:hover { color: var(--yellow); }

.nav { display: flex; list-style: none; padding: 0; margin: 0; }
.nav li { list-style: none; }
.nav a {
	font-family: var(--head);
	font-size: 14px;
	letter-spacing: 1.5px;
	color: var(--yellow);
	text-decoration: none;
	padding: 0 14px;
	height: 60px;
	display: flex;
	align-items: center;
	border-left: 2px solid #333;
	transition: background .15s, color .15s;
}
.nav a:hover,
.nav .current-menu-item > a,
.nav .current_page_item > a,
.nav a.active {
	background: var(--yellow);
	color: var(--black);
}

.cart-btn {
	font-family: var(--head);
	font-size: 14px;
	letter-spacing: 1px;
	color: var(--yellow);
	border: 3px solid var(--yellow);
	padding: 6px 14px;
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	transition: background .15s;
}
.cart-btn:hover { background: var(--yellow); color: var(--black); }
.cart-count {
	background: var(--red);
	color: #fff;
	border-radius: 50%;
	width: 22px;
	height: 22px;
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid var(--yellow);
}

/* Mobile nav toggle (hidden by default on desktop) */
.nav-toggle { display: none; }

/* =========================================================================
   TICKER
   ========================================================================= */
.ticker {
	background: var(--yellow);
	border-bottom: 3px solid var(--black);
	padding: 9px 1.5rem;
	display: flex;
	gap: 2.5rem;
	overflow: hidden;
}
.tick-item {
	font-family: var(--head);
	font-size: 14px;
	letter-spacing: 2px;
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 8px;
}
.tick-dot { width: 7px; height: 7px; background: var(--red); border-radius: 50%; }

/* =========================================================================
   BREADCRUMBS
   ========================================================================= */
.breadcrumb {
	font-family: var(--head);
	font-size: 13px;
	letter-spacing: 1px;
	padding: 1rem 2rem .5rem;
	color: var(--black);
}
.breadcrumb a { color: var(--red); }
.breadcrumb .sep,
.breadcrumb span { color: #aaa; }

/* =========================================================================
   PAGE TITLE BAR
   ========================================================================= */
.page-title-bar {
	padding: 1rem 2rem 1.5rem;
	border-bottom: 3px solid var(--black);
	background: #fff;
}
.page-title {
	font-family: var(--head);
	font-size: 52px;
	letter-spacing: 2px;
	text-shadow: 4px 4px 0 var(--yellow);
}

/* =========================================================================
   HERO (home)
   ========================================================================= */
.hero {
	display: grid;
	grid-template-columns: 1fr 1fr;
	border-bottom: var(--border);
	min-height: 400px;
}
.hero-left {
	background: var(--red);
	border-right: var(--border);
	padding: 2.5rem 2rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	position: relative;
	overflow: hidden;
}
.hero-left::before {
	content: '';
	position: absolute;
	top: -30px;
	left: -30px;
	width: 160px;
	height: 160px;
	background: var(--yellow);
	border-radius: 50%;
	opacity: .12;
}
.burst {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 80px;
	height: 80px;
	background: var(--yellow);
	clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
	display: flex;
	align-items: center;
	justify-content: center;
}
.burst-txt {
	font-family: var(--head);
	font-size: 11px;
	color: var(--black);
	text-align: center;
	line-height: 1.2;
}
.eyebrow {
	font-family: var(--head);
	font-size: 12px;
	letter-spacing: 3px;
	color: var(--yellow);
	background: var(--black);
	display: inline-block;
	padding: 2px 12px;
	margin-bottom: .75rem;
}
.hero-title {
	font-family: var(--head);
	font-size: 76px;
	line-height: .88;
	letter-spacing: 2px;
	color: #fff;
	text-shadow: 5px 5px 0 var(--black), -2px -2px 0 var(--black), 2px -2px 0 var(--black), -2px 2px 0 var(--black);
	margin-bottom: 1rem;
}
.speech {
	background: #fff;
	border: 3px solid var(--black);
	border-radius: 16px 16px 16px 0;
	padding: 10px 16px;
	font-size: 14px;
	font-style: italic;
	color: var(--black);
	position: relative;
	margin-bottom: 1.5rem;
	max-width: 320px;
	line-height: 1.5;
}
.speech::after {
	content: '';
	position: absolute;
	bottom: -14px;
	left: 20px;
	border: 7px solid transparent;
	border-top-color: var(--black);
}
.speech::before {
	content: '';
	position: absolute;
	bottom: -9px;
	left: 21px;
	border: 6px solid transparent;
	border-top-color: #fff;
	z-index: 1;
}
.btn {
	font-family: var(--head);
	font-size: 18px;
	letter-spacing: 2px;
	padding: 10px 28px;
	background: var(--yellow);
	color: var(--black);
	border: 3px solid var(--black);
	cursor: pointer;
	box-shadow: 5px 5px 0 var(--black);
	display: inline-block;
	text-decoration: none;
	transition: transform .1s, box-shadow .1s;
	align-self: flex-start;
}
.btn:hover {
	transform: translate(2px, 2px);
	box-shadow: 3px 3px 0 var(--black);
	color: var(--black);
}
.hero-right {
	display: grid;
	grid-template-columns: 1fr 1fr;
}
.hero-cover {
	border-right: var(--border);
	border-bottom: var(--border);
	overflow: hidden;
	position: relative;
	display: block;
	text-decoration: none;
}
.hero-cover:nth-child(even) { border-right: none; }
.hero-cover:nth-child(3),
.hero-cover:nth-child(4) { border-bottom: none; }
.cover-art {
	width: 100%;
	aspect-ratio: 2/3;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .25s;
	overflow: hidden;
}
.cover-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-cover:hover .cover-art { transform: scale(1.05); }
.c-label {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--black);
	color: var(--yellow);
	font-family: var(--head);
	font-size: 11px;
	letter-spacing: 2px;
	padding: 5px 8px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* =========================================================================
   GENRE STRIP
   ========================================================================= */
.genre-section {
	padding: 2rem;
	border-bottom: var(--border);
}
.section-title {
	font-family: var(--head);
	font-size: 36px;
	letter-spacing: 2px;
	text-shadow: 3px 3px 0 var(--yellow);
	margin-bottom: 1.25rem;
}
.genres-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.chip {
	font-family: var(--head);
	font-size: 15px;
	letter-spacing: 2px;
	padding: 6px 18px;
	border: 3px solid var(--black);
	background: var(--cream);
	color: var(--black);
	text-decoration: none;
	box-shadow: 3px 3px 0 var(--black);
	transition: transform .1s, box-shadow .1s, background .1s;
	display: inline-block;
}
.chip:hover {
	transform: translate(1px, 1px);
	box-shadow: 2px 2px 0 var(--black);
	background: var(--yellow);
	color: var(--black);
}
.chip.active {
	background: var(--black);
	color: var(--yellow);
	box-shadow: 3px 3px 0 var(--red);
}

/* =========================================================================
   PANEL DIVIDER
   ========================================================================= */
.panel-div {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 2rem;
}
.panel-div::before,
.panel-div::after {
	content: '';
	flex: 1;
	height: 3px;
	background: var(--black);
}
.div-label {
	font-family: var(--head);
	font-size: 20px;
	letter-spacing: 2px;
	color: var(--red);
	white-space: nowrap;
}

/* =========================================================================
   PRODUCT CARDS (shared by home, shop, single, 404, my-account)
   ========================================================================= */
.picks-section,
.related-section {
	padding: 2rem;
}
.section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.5rem;
}
.see-all {
	font-family: var(--head);
	font-size: 14px;
	letter-spacing: 1px;
	color: var(--red);
	text-decoration: underline;
}

.products {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 16px;
	list-style: none;
	padding: 0;
	margin: 0;
}
.products.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.related-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	list-style: none;
	padding: 0;
	margin: 0;
}

.product-card {
	border: 3px solid var(--black);
	background: #fff;
	box-shadow: var(--shadow);
	transition: transform .12s, box-shadow .12s;
	position: relative;
	cursor: pointer;
	list-style: none;
	display: flex;
	flex-direction: column;
	min-width: 0; /* allow shrinking below intrinsic content size in grid */
	overflow: hidden;
}
.product-card:hover {
	transform: translate(-2px, -2px);
	box-shadow: 7px 7px 0 var(--black);
}
.prod-cover {
	aspect-ratio: 2/3;
	display: flex;
	align-items: center;
	justify-content: center;
	border-bottom: 3px solid var(--black);
	overflow: hidden;
}
.prod-cover a { display: block; width: 100%; height: 100%; }
.prod-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prod-cover svg { width: 100%; height: 100%; display: block; }
.prod-info { padding: 10px; flex: 1; display: flex; flex-direction: column; }
.prod-title {
	font-family: var(--head);
	font-size: 15px;
	letter-spacing: 1px;
	color: var(--black);
	margin-bottom: 2px;
	line-height: 1.2;
	/* Clamp to 2 lines so all cards in a row stay the same height */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.4em; /* reserves 2 lines so short titles don't shrink the card */
}
.prod-title a { color: var(--black); text-decoration: none; }
.prod-title a:hover { color: var(--red); }
.prod-author {
	font-size: 11px;
	color: #666;
	margin-bottom: 8px;
	font-style: italic;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-height: 1.2em; /* keeps the row aligned even when subline is missing */
}
.prod-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	gap: 8px;
	min-width: 0;
}
.prod-price {
	font-family: var(--head);
	font-size: 17px;
	letter-spacing: 1px;
	color: var(--red);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex: 1;
	min-width: 0;
}
.prod-price del {
	color: #999;
	font-size: 13px;
	margin-right: 6px;
}
.prod-price ins { text-decoration: none; }
.add-btn {
	font-family: var(--head);
	font-size: 18px;
	min-width: 30px;
	height: 30px;
	border: 2px solid var(--black);
	background: var(--yellow);
	color: var(--black);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 2px 2px 0 var(--black);
	transition: transform .1s;
	padding: 0 6px;
	text-decoration: none;
}
.add-btn:hover {
	transform: translate(1px, 1px);
	box-shadow: 1px 1px 0 var(--black);
	color: var(--black);
}
.add-btn.loading { opacity: .6; pointer-events: none; }
.add-btn.added { background: #4caf50; color: #fff; }

.badge {
	position: absolute;
	top: -2px;
	right: -2px;
	background: var(--red);
	color: #fff;
	font-family: var(--head);
	font-size: 11px;
	letter-spacing: 1px;
	padding: 2px 8px;
	border: 2px solid var(--black);
	z-index: 2;
}
.badge-sale { background: #1565C0; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer {
	background: var(--black);
	border-top: var(--border);
}
.footer-inner {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 2rem;
	padding: 2rem 1.75rem;
	flex-wrap: wrap;
}
.f-logo {
	font-family: var(--head);
	font-size: 28px;
	letter-spacing: 4px;
	color: var(--yellow);
	text-shadow: 3px 3px 0 var(--red);
	margin-bottom: 6px;
	text-decoration: none;
	display: inline-block;
}
.f-logo span { color: var(--red); }
.f-tagline {
	font-size: 13px;
	font-style: italic;
	color: #777;
}
.f-links {
	display: flex;
	flex-direction: column;
	gap: 6px;
	list-style: none;
	padding: 0;
	margin: 0;
}
.f-links li { list-style: none; }
.f-links a {
	font-family: var(--head);
	font-size: 14px;
	letter-spacing: 1px;
	color: #777;
	text-decoration: none;
}
.f-links a:hover { color: var(--yellow); }
.footer-bottom {
	display: flex;
	justify-content: space-between;
	padding: 1rem 1.75rem;
	border-top: 2px solid #333;
	font-size: 12px;
	color: #555;
	flex-wrap: wrap;
	gap: 1rem;
}

/* =========================================================================
   404
   ========================================================================= */
.error-page {
	min-height: 520px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3rem 2rem;
}
.error-inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: center;
	max-width: 900px;
}
.error-art { position: relative; }
.explosion { width: 100%; max-width: 340px; }

.error-code {
	font-family: var(--head);
	font-size: 120px;
	line-height: .85;
	color: var(--red);
	text-shadow: 8px 8px 0 var(--black), -2px -2px 0 var(--black), 2px -2px 0 var(--black), -2px 2px 0 var(--black);
}
.error-title {
	font-family: var(--head);
	font-size: 52px;
	letter-spacing: 2px;
	color: var(--black);
	text-shadow: 4px 4px 0 var(--yellow);
	margin-bottom: 1rem;
}
.error-speech {
	background: #fff;
	border: 3px solid var(--black);
	border-radius: 16px 16px 16px 0;
	padding: 14px 18px;
	font-size: 15px;
	font-style: italic;
	color: var(--black);
	position: relative;
	margin-bottom: 1.5rem;
	max-width: 380px;
	line-height: 1.5;
}
.error-speech::after {
	content: '';
	position: absolute;
	bottom: -14px;
	left: 20px;
	border: 7px solid transparent;
	border-top-color: var(--black);
}
.error-speech::before {
	content: '';
	position: absolute;
	bottom: -9px;
	left: 21px;
	border: 6px solid transparent;
	border-top-color: #fff;
	z-index: 1;
}
.error-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 1.5rem;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { color: #fff; }
.btn-yellow { background: var(--yellow); color: var(--black); }
.btn-yellow:hover { color: var(--black); }

.error-search {
	display: flex;
	gap: 0;
	max-width: 380px;
}
.error-search input,
.error-search [type=search] {
	font-family: var(--head);
	font-size: 15px;
	letter-spacing: 1px;
	border: 3px solid var(--black);
	border-right: none;
	padding: 9px 14px;
	background: #fff;
	flex: 1;
	width: 100%;
}
.error-search input:focus,
.error-search [type=search]:focus { outline: none; box-shadow: 0 0 0 3px var(--yellow); }
.search-btn {
	font-family: var(--head);
	font-size: 15px;
	letter-spacing: 1px;
	padding: 9px 18px;
	background: var(--black);
	color: var(--yellow);
	border: 3px solid var(--black);
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s;
}
.search-btn:hover { background: var(--red); color: var(--yellow); }

.popular-section {
	padding: 2rem;
	border-top: var(--border);
	background: #fff;
}
.popular-title {
	font-family: var(--head);
	font-size: 30px;
	letter-spacing: 2px;
	text-shadow: 3px 3px 0 var(--yellow);
	margin-bottom: 1.25rem;
}
.popular-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
}
.pop-card {
	border: 3px solid var(--black);
	background: var(--cream);
	box-shadow: 3px 3px 0 var(--black);
	transition: transform .1s, box-shadow .1s;
	cursor: pointer;
	text-decoration: none;
	display: block;
}
.pop-card:hover {
	transform: translate(-1px, -1px);
	box-shadow: 4px 4px 0 var(--black);
}
.pop-cover {
	aspect-ratio: 2/3;
	display: flex;
	align-items: center;
	justify-content: center;
	border-bottom: 3px solid var(--black);
	overflow: hidden;
}
.pop-cover img { width: 100%; height: 100%; object-fit: cover; }
.pop-info { padding: 8px 10px; }
.pop-title {
	font-family: var(--head);
	font-size: 14px;
	letter-spacing: 1px;
	color: var(--black);
}
.pop-price {
	font-family: var(--head);
	font-size: 14px;
	color: var(--red);
}

/* =========================================================================
   GENERIC HELPERS
   ========================================================================= */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* WordPress pagination styling, used by the_posts_pagination */
.pagination,
.woocommerce-pagination,
.nav-links {
	display: flex;
	gap: 8px;
	justify-content: center;
	padding: 2rem 0 0;
	flex-wrap: wrap;
}
.pagination .page-numbers,
.woocommerce-pagination .page-numbers,
.nav-links .page-numbers,
.page-btn {
	font-family: var(--head);
	font-size: 17px;
	letter-spacing: 1px;
	border: 3px solid var(--black);
	padding: 6px 16px;
	background: #fff;
	color: var(--black);
	text-decoration: none;
	box-shadow: 3px 3px 0 var(--black);
	transition: transform .1s, box-shadow .1s;
	display: inline-block;
}
.pagination .page-numbers:hover,
.woocommerce-pagination .page-numbers:hover,
.nav-links .page-numbers:hover,
.page-btn:hover {
	transform: translate(1px, 1px);
	box-shadow: 2px 2px 0 var(--black);
	background: var(--yellow);
	color: var(--black);
}
.pagination .page-numbers.current,
.woocommerce-pagination .page-numbers.current,
.nav-links .page-numbers.current,
.page-btn.current {
	background: var(--black);
	color: var(--yellow);
}

/* WooCommerce-emitted store notices */
.woocommerce-notices-wrapper { padding: 0 2rem; }
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	margin: 1rem 0;
	border: 3px solid var(--black);
	padding: 12px 16px;
	box-shadow: 4px 4px 0 var(--black);
	font-family: var(--head);
	font-size: 15px;
	letter-spacing: 1px;
	list-style: none;
	display: flex;
	align-items: center;
	gap: 10px;
}
.woocommerce-message { background: var(--yellow); }
.woocommerce-info    { background: #fff; }
.woocommerce-error   { background: var(--red); color: #fff; }
.woocommerce-error a,
.woocommerce-message a,
.woocommerce-info a { color: inherit; text-decoration: underline; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 900px) {
	.hero { grid-template-columns: 1fr; }
	.hero-left { border-right: none; border-bottom: var(--border); }
	.products { grid-template-columns: repeat(3, 1fr); }
	.related-grid,
	.popular-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
	.site { margin: 10px; }
	.topbar { flex-wrap: wrap; height: auto; padding: 10px 1rem; gap: .5rem; }
	.nav { display: none; width: 100%; flex-direction: column; }
	.nav.open { display: flex; }
	.nav a { height: 44px; border-left: none; border-top: 1px solid #333; }
	.nav-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		background: transparent;
		border: 2px solid var(--yellow);
		color: var(--yellow);
		font-family: var(--head);
		font-size: 14px;
		letter-spacing: 1px;
		padding: 6px 12px;
		cursor: pointer;
	}
	.ticker { gap: 1.25rem; font-size: 12px; overflow-x: auto; }
	.page-title { font-size: 36px; }
	.section-title { font-size: 28px; }
	.hero-title { font-size: 52px; }
	.products,
	.related-grid,
	.popular-grid { grid-template-columns: repeat(2, 1fr); }
	.error-inner { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 480px) {
	.products,
	.related-grid,
	.popular-grid { grid-template-columns: repeat(2, 1fr); }
	.hero-right { grid-template-columns: 1fr; }
	.hero-cover { border-right: none !important; }
}
