/*
Theme Name: Chroma Chaos
Theme URI: https://chromachaos.com
Author: Chroma Chaos
Author URI: https://chromachaos.com
Description: Custom neon-graffiti WooCommerce theme for Chroma Chaos stickers and tees. Fixed graffiti concrete background, glowing logo header, outlined Bangers headings and dark translucent product cards.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
WC requires at least: 8.0
WC tested up to: 11.3
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chromachaos
Tags: e-commerce, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, dark
*/

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("assets/fonts/inter-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Bangers";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/bangers-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
	--cc-pink: #ff00aa;
	--cc-pink-warm: #ff2d95;
	--cc-magenta: #ff00ff;
	--cc-cyan: #00ffff;
	--cc-green: #00ff88;
	--cc-text: #f0f0f0;
	--cc-muted: #bbb;
	--cc-dim: #999;
	--cc-card: rgba(12, 12, 12, 0.85);
	--cc-panel: rgba(10, 10, 10, 0.82);
	--cc-line: #333;
	--cc-border: #555;
	--cc-radius: 12px;
	--cc-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--cc-display: "Bangers", "Impact", cursive;
	--cc-outline: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 3px 0 #000, 3px 0 0 #000, 0 -3px 0 #000, -3px 0 0 #000;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--cc-font);
	color: var(--cc-text);
	line-height: 1.5;
	min-height: 100vh;
	background-color: #111;
	background-image: url("assets/images/graffiti-bg.jpg");
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
	background-attachment: fixed;
	display: flex;
	flex-direction: column;
}
.site-content { flex: 1 0 auto; }
img, video, svg { max-width: 100%; height: auto; }
a { color: var(--cc-cyan); text-decoration: none; transition: color 0.2s; }
a:hover, a:focus { color: var(--cc-pink); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
hr { border: 0; border-top: 1px solid var(--cc-line); margin: 2em 0; }
::selection { background: var(--cc-pink); color: #fff; }

:focus-visible { outline: 2px solid var(--cc-cyan); outline-offset: 2px; }

.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;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; margin: 0;
	left: 10px; top: 10px; z-index: 100000; padding: 10px 16px;
	background: var(--cc-pink); color: #fff; border-radius: 6px;
}

/* ---------- Headings ---------- */
h1, h2, h3, h4, h5, h6 { line-height: 1.2; margin: 0 0 0.6em; color: #fff; }
h1, h2, .page-title, .woocommerce-products-header__title, .product_title, .cc-display {
	font-family: var(--cc-display);
	font-weight: 400;
	letter-spacing: 1px;
	color: #fff !important;
	-webkit-text-stroke: 2px #000;
	paint-order: stroke fill;
	text-shadow: var(--cc-outline);
}
h2, .page-title, .woocommerce-products-header__title {
	font-size: 2.2rem;
	margin: 40px 0 20px;
	border-bottom: 2px solid var(--cc-line);
	padding-bottom: 8px;
}
.site-main > h2:first-child,
.site-main > .page-title:first-child,
.site-main > article:first-child > .page-title,
.site-main > .archive-header:first-child .page-title,
.cc-woo-content > .woocommerce-products-header:first-child .page-title,
.cc-woo-content > .cc-breadcrumb + .woocommerce-products-header .page-title { margin-top: 0; }
h1 { font-size: 2.6rem; }
h3 { font-size: 1.25rem; }
.entry-content h2 { font-size: 1.9rem; margin-top: 1.4em; }
.entry-content h3, .entry-content h4 { color: #fff; }

/* ---------- Header ---------- */
.site-header {
	background: rgba(0, 0, 0, 0.75);
	border-bottom: 4px solid var(--cc-pink);
	padding: 20px;
	text-align: center;
}
.site-branding .custom-logo-link { display: inline-block; }
.site-branding .custom-logo,
.site-branding img {
	width: 280px;
	max-width: 90%;
	height: auto;
	margin-bottom: 10px;
	filter: drop-shadow(0 0 15px var(--cc-magenta));
	display: inline-block;
}
.tagline { color: #aaa; font-size: 1rem; margin: 5px 0 0; }

/* ---------- Navigation ---------- */
.main-navigation {
	background: rgba(20, 20, 20, 0.9);
	border-bottom: 1px solid var(--cc-line);
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .main-navigation { top: 32px; }
.nav-inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 12px 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}
.main-navigation ul { list-style: none; margin: 0; padding: 0; }
.main-navigation .menu,
.main-navigation > .nav-inner > ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 4px 0;
}
.main-navigation li { position: relative; }
.main-navigation a {
	display: block;
	color: var(--cc-cyan);
	font-weight: 600;
	margin: 0 15px;
	padding: 2px 0;
}
.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-menu-ancestor > a { color: var(--cc-pink); }
.main-navigation .sub-menu {
	display: none;
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	top: 100%;
	min-width: 200px;
	background: rgba(12, 12, 12, 0.96);
	border: 1px solid var(--cc-pink);
	border-radius: 8px;
	padding: 8px 0;
	z-index: 60;
	text-align: left;
}
.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu { display: block; }
.main-navigation .sub-menu a { margin: 0; padding: 6px 16px; }

.cc-cart-link {
	position: absolute;
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--cc-cyan);
	font-weight: 700;
}
.cc-cart-count {
	display: inline-block;
	min-width: 1.5em;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--cc-pink);
	color: #fff;
	font-size: 0.75rem;
	line-height: 1.5em;
	text-align: center;
}
.cc-cart-link:hover .cc-cart-count { background: var(--cc-cyan); color: #000; }

.menu-toggle {
	display: none;
	align-items: center;
	gap: 10px;
	background: transparent;
	color: var(--cc-cyan);
	border: 2px solid var(--cc-border);
	border-radius: 8px;
	padding: 6px 14px;
	font-family: var(--cc-display);
	font-size: 1.2rem;
	letter-spacing: 1px;
	cursor: pointer;
}
.menu-toggle:hover, .menu-toggle[aria-expanded="true"] { border-color: var(--cc-pink-warm); color: var(--cc-pink); }
.menu-toggle-bars { display: inline-flex; flex-direction: column; gap: 4px; }
.menu-toggle-bars span { display: block; width: 20px; height: 2px; background: currentColor; transition: transform 0.2s, opacity 0.2s; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Layout ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 30px 20px; }
.site-main { width: 100%; }

.intro,
.cc-panel {
	background: var(--cc-panel);
	padding: 25px;
	border-radius: var(--cc-radius);
	margin-bottom: 40px;
	border-left: 5px solid var(--cc-pink-warm);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}
.cc-panel { border-left-width: 5px; }
.cc-panel > :last-child { margin-bottom: 0; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.cc-section { margin-bottom: 20px; }
.cc-view-all { text-align: center; margin: 25px 0 10px; }

/* Cards */
.cc-card {
	background: var(--cc-card);
	border: 1px solid var(--cc-border);
	border-radius: var(--cc-radius);
	padding: 18px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.cc-card:hover { transform: translateY(-4px); border-color: var(--cc-pink); box-shadow: 0 8px 25px rgba(255, 45, 149, 0.3); }
.item-no { font-size: 0.8rem; color: var(--cc-dim); letter-spacing: 0.5px; margin: -4px 0 10px; }
.price { font-size: 1.4rem; font-weight: 700; color: var(--cc-green); }

/* Posts */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.post-card-thumb img { width: 100%; height: 200px; object-fit: cover; border-radius: 8px; margin-bottom: 12px; display: block; }
.post-card-title { font-size: 1.25rem; margin-bottom: 8px; }
.post-card-title a { color: #fff; }
.post-card-title a:hover { color: var(--cc-pink); }
.post-card-excerpt { color: var(--cc-muted); font-size: 0.95rem; margin-bottom: 14px; }
.entry-meta, .entry-tags { color: var(--cc-dim); font-size: 0.9rem; margin: -10px 0 20px; }
.entry-tags { margin: 10px 0 30px; }
.entry-thumb img { border-radius: var(--cc-radius); margin-bottom: 20px; display: block; }
.entry-content { overflow-wrap: break-word; }
.entry-content img { border-radius: 8px; }
.entry-content blockquote, blockquote {
	margin: 1.5em 0; padding: 10px 20px;
	border-left: 4px solid var(--cc-cyan);
	background: rgba(0, 0, 0, 0.35);
	border-radius: 0 8px 8px 0;
}
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
code, pre, kbd { font-family: ui-monospace, Menlo, Consolas, monospace; background: #000; border-radius: 4px; }
code { padding: 2px 5px; color: var(--cc-green); }
pre { padding: 15px; overflow: auto; border: 1px solid var(--cc-line); }
table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; }
th, td { border: 1px solid var(--cc-line); padding: 10px 12px; text-align: left; }
th { background: rgba(0, 0, 0, 0.5); color: #fff; }
.wp-block-image figcaption, figcaption { color: var(--cc-dim); font-size: 0.85rem; text-align: center; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.sticky .post-card-title::before { content: "\2605  "; color: var(--cc-pink); }
.bypostauthor { }
.gallery-caption { color: var(--cc-dim); }
.page-links { margin-top: 20px; }

/* ---------- Buttons & forms ---------- */
.btn,
button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.wp-block-button__link,
.wp-element-button {
	display: inline-block;
	background: var(--cc-pink);
	color: #fff;
	padding: 8px 16px;
	border: 0;
	border-radius: 6px;
	font-family: var(--cc-font);
	font-weight: 600;
	font-size: 0.9rem;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}
.btn:hover, .btn:focus,
button:hover, button:focus,
input[type="submit"]:hover, input[type="button"]:hover, input[type="reset"]:hover,
.wp-block-button__link:hover, .wp-element-button:hover {
	background: var(--cc-cyan);
	color: #000;
}
.menu-toggle, .menu-toggle:hover, .menu-toggle:focus { background: transparent; }

input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="search"], input[type="number"], input[type="tel"], input[type="date"],
textarea, select {
	width: 100%;
	max-width: 100%;
	background: rgba(0, 0, 0, 0.6);
	color: var(--cc-text);
	border: 1px solid var(--cc-border);
	border-radius: 6px;
	padding: 10px 12px;
	font: inherit;
	transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
	outline: none;
	border-color: var(--cc-pink);
	box-shadow: 0 0 0 2px rgba(255, 0, 170, 0.35);
}
select {
	-webkit-appearance: none;
	appearance: none;
	padding-right: 36px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2300ffff' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px 8px;
}
select option { background: #111; color: var(--cc-text); }
label { color: #ddd; font-weight: 600; font-size: 0.95rem; }
::placeholder { color: #777; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--cc-pink); }

.search-form { display: flex; gap: 8px; max-width: 520px; margin: 15px 0; }
.search-form .search-field { flex: 1; }

/* ---------- Tabs (front page) ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.tab-btn {
	font-family: var(--cc-display);
	font-size: 1.3rem;
	font-weight: 400;
	letter-spacing: 1px;
	background: var(--cc-card);
	color: var(--cc-cyan);
	border: 2px solid var(--cc-border);
	border-radius: 8px;
	padding: 8px 22px;
	cursor: pointer;
}
.tab-btn:hover, .tab-btn:focus { background: var(--cc-card); color: var(--cc-cyan); border-color: var(--cc-pink-warm); }
.tab-btn.active, .tab-btn.active:hover { background: var(--cc-pink); color: #fff; border-color: var(--cc-pink); }
.tab-panel-title { display: none; }
/* Without JS both sections show stacked with their own titles. */
.no-js .tabs { display: none; }
.no-js .tab-panel-title { display: block; font-family: var(--cc-display); font-size: 1.8rem; font-weight: 400; letter-spacing: 1px; }
.js .tab-panel { display: none; }
.js .tab-panel.active { display: block; }

/* ---------- Pagination ---------- */
.pagination .nav-links,
.post-navigation .nav-links,
.comments-pagination .nav-links {
	display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 30px 0;
}
.post-navigation .nav-links { justify-content: space-between; }
.page-numbers,
.post-navigation a {
	display: inline-block;
	min-width: 42px;
	padding: 8px 14px;
	text-align: center;
	background: var(--cc-card);
	border: 1px solid var(--cc-border);
	border-radius: 8px;
	color: var(--cc-cyan);
	font-weight: 600;
}
a.page-numbers:hover, .post-navigation a:hover { border-color: var(--cc-pink); color: var(--cc-pink); }
.page-numbers.current { background: var(--cc-pink); border-color: var(--cc-pink); color: #fff; }
.page-numbers.dots { background: transparent; border-color: transparent; }

/* ---------- Comments ---------- */
.comments-area { margin-top: 30px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 20px; border-left: 2px solid var(--cc-line); }
.comment-body { padding: 15px 0; border-bottom: 1px solid var(--cc-line); }
.comment-meta { font-size: 0.85rem; color: var(--cc-dim); }
.comment-author img { border-radius: 50%; vertical-align: middle; margin-right: 8px; }
.comment-form p { margin-bottom: 14px; }

/* ---------- Widgets ---------- */
.widget { margin-bottom: 20px; }
.widget:hover { transform: none; }
.widget-title { font-family: var(--cc-display); font-weight: 400; letter-spacing: 1px; font-size: 1.4rem; color: var(--cc-cyan); margin-bottom: 12px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 4px 0; border-bottom: 1px solid #222; }
.widget li:last-child { border-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer {
	background: #000;
	text-align: center;
	padding: 30px 20px;
	margin-top: 60px;
	color: #888;
	font-size: 0.9rem;
	border-top: 3px solid var(--cc-pink);
}
.site-footer p { margin: 0 0 0.5em; }
.site-footer a { color: var(--cc-cyan); }
.site-footer a:hover { color: var(--cc-pink); }
.footer-navigation ul { list-style: none; margin: 0 0 15px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.footer-navigation a { font-weight: 600; }
.footer-widgets { padding-top: 0; text-align: left; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }

/* ---------- 404 ---------- */
.error-404 .page-title { margin-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 782px) {
	.admin-bar .main-navigation { top: 46px; }
}
@media (max-width: 600px) {
	.admin-bar .main-navigation { top: 0; }
}
@media (max-width: 760px) {
	.site-header { padding: 16px 12px; }
	.site-branding .custom-logo, .site-branding img { width: 220px; }
	.nav-inner { justify-content: space-between; padding: 10px 16px; flex-wrap: wrap; }
	.menu-toggle { display: inline-flex; }
	.cc-cart-link { position: static; transform: none; }
	.main-navigation .menu,
	.main-navigation > .nav-inner > ul {
		display: none;
		order: 3;
		width: 100%;
		flex-direction: column;
		align-items: stretch;
		padding-top: 10px;
		margin-top: 10px;
		border-top: 1px solid var(--cc-line);
	}
	.main-navigation.toggled .menu,
	.main-navigation.toggled > .nav-inner > ul { display: flex; }
	.main-navigation a { margin: 0; padding: 10px 4px; border-bottom: 1px solid #222; text-align: center; }
	.main-navigation .sub-menu { position: static; transform: none; display: block; border: 0; background: transparent; padding: 0; min-width: 0; }
	.main-navigation .sub-menu a { padding-left: 4px; color: #9ff; font-weight: 400; }
	.no-js .main-navigation .menu,
	.no-js .main-navigation > .nav-inner > ul { display: flex; }
	.no-js .menu-toggle { display: none; }
	.container { padding: 22px 14px; }
	h2, .page-title, .woocommerce-products-header__title { font-size: 1.85rem; margin-top: 30px; }
	h1 { font-size: 2.1rem; }
	.intro, .cc-panel { padding: 18px; }
	.tab-btn { flex: 1 1 auto; text-align: center; }
	.alignleft, .alignright { float: none; margin: 0 0 1em; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
/* iOS ignores background-attachment: fixed; use a fixed layer instead. */
@supports (-webkit-touch-callout: none) {
	body.chromachaos { background-image: none !important; }
	body.chromachaos::before {
		content: "";
		position: fixed;
		inset: 0;
		z-index: -1;
		background: #111 url("assets/images/graffiti-bg.jpg") center center / cover no-repeat;
	}
}
