/* ==========================================================================
   Cosplay Pro — Main Stylesheet
   Dark modern design with purple accents
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
	/* Colors */
	--color-bg:             #0D0D0D;
	--color-bg-alt:         #111122;
	--color-surface:        #1A1A2E;
	--color-surface-hover:  #24243E;
	--color-border:         #2A2A4A;

	--color-primary:        #9B59B6;
	--color-primary-light:  #BB77D6;
	--color-primary-dark:   #7D3C98;

	--color-accent:         #F39C12;

	--color-text:           #E0E0E0;
	--color-text-muted:     #8888AA;
	--color-text-heading:   #FFFFFF;

	--color-success:        #2ECC71;
	--color-error:          #E74C3C;
	--color-warning:        #F39C12;

	/* Typography */
	--font-body:            'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--font-heading:         'Orbitron', 'Inter', sans-serif;

	--fs-xs:    0.75rem;    /* 12px */
	--fs-sm:    0.875rem;   /* 14px */
	--fs-base:  1rem;       /* 16px */
	--fs-md:    1.125rem;   /* 18px */
	--fs-lg:    1.25rem;    /* 20px */
	--fs-xl:    1.5rem;     /* 24px */
	--fs-2xl:   2rem;       /* 32px */
	--fs-3xl:   2.5rem;     /* 40px */
	--fs-4xl:   3.5rem;     /* 56px */

	--fw-normal:  400;
	--fw-medium:  500;
	--fw-semibold:600;
	--fw-bold:    700;
	--fw-black:   900;

	--lh-tight:   1.2;
	--lh-normal:  1.6;
	--lh-relaxed: 1.8;

	/* Spacing */
	--space-xs:   0.25rem;
	--space-sm:   0.5rem;
	--space-md:   1rem;
	--space-lg:   1.5rem;
	--space-xl:   2rem;
	--space-2xl:  3rem;
	--space-3xl:  4rem;
	--space-4xl:  6rem;

	/* Layout */
	--container-max:  1280px;
	--container-pad:  1.5rem;
	--header-height:  72px;

	/* Borders & Radius */
	--radius-sm:  4px;
	--radius-md:  8px;
	--radius-lg:  12px;
	--radius-xl:  16px;
	--radius-full:9999px;

	/* Shadows */
	--shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.4);
	--shadow-md:   0 4px 12px rgba(0, 0, 0, 0.5);
	--shadow-lg:   0 8px 30px rgba(0, 0, 0, 0.6);
	--shadow-glow: 0 0 20px rgba(155, 89, 182, 0.3);

	/* Transitions */
	--transition-fast:   150ms ease;
	--transition-normal: 250ms ease;
	--transition-slow:   400ms ease;
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: var(--font-body);
	font-size: var(--fs-base);
	font-weight: var(--fw-normal);
	line-height: var(--lh-normal);
	color: var(--color-text);
	background-color: var(--color-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

img,
picture,
video,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: var(--color-primary-light);
	text-decoration: none;
	transition: color var(--transition-fast);
}

a:hover,
a:focus {
	color: var(--color-primary);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	font-weight: var(--fw-bold);
	line-height: var(--lh-tight);
	color: var(--color-text-heading);
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

ul, ol {
	list-style: none;
}

input,
textarea,
button,
select {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
	background: none;
	border: none;
}

/* Screen reader only */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--color-surface);
	color: var(--color-text);
	clip: auto !important;
	display: block;
	font-size: var(--fs-sm);
	height: auto;
	left: 5px;
	padding: var(--space-md);
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--container-pad);
}

.site-content {
	min-height: calc(100vh - var(--header-height) - 300px);
}

.section {
	padding-block: var(--space-4xl);
}

.section--alt {
	background-color: var(--color-bg-alt);
}

.section__title {
	text-align: center;
	margin-bottom: var(--space-3xl);
	font-size: var(--fs-2xl);
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.section__title::after {
	content: '';
	display: block;
	width: 60px;
	height: 3px;
	background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
	margin: var(--space-md) auto 0;
	border-radius: var(--radius-full);
}

.section__cta {
	text-align: center;
	margin-top: var(--space-3xl);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-sm);
	padding: 0.75rem 2rem;
	font-family: var(--font-heading);
	font-size: var(--fs-sm);
	font-weight: var(--fw-semibold);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	border-radius: var(--radius-md);
	border: 2px solid transparent;
	transition: all var(--transition-normal);
	cursor: pointer;
}

.btn--primary {
	background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
	color: #fff;
	border-color: var(--color-primary);
}

.btn--primary:hover {
	background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
	box-shadow: var(--shadow-glow);
	color: #fff;
	transform: translateY(-2px);
}

.btn--outline {
	background: transparent;
	color: var(--color-primary-light);
	border-color: var(--color-primary);
}

.btn--outline:hover {
	background: var(--color-primary);
	color: #fff;
	transform: translateY(-2px);
}

.btn--lg {
	padding: 1rem 2.5rem;
	font-size: var(--fs-base);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background-color: rgba(13, 13, 13, 0.95);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--color-border);
	height: var(--header-height);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-xl);
	height: var(--header-height);
}

/* Branding */
.site-branding .site-title {
	font-family: var(--font-heading);
	font-size: var(--fs-xl);
	font-weight: var(--fw-black);
	color: var(--color-text-heading);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.site-branding .site-title:hover {
	color: var(--color-primary-light);
}

.site-branding .custom-logo {
	height: 48px;
	width: auto;
}

/* Navigation */
.main-navigation {
	flex: 1;
	display: flex;
	justify-content: center;
}

.primary-menu {
	display: flex;
	align-items: center;
	gap: var(--space-xs);
}

.primary-menu li {
	position: relative;
}

.primary-menu li a {
	display: block;
	padding: var(--space-sm) var(--space-md);
	color: var(--color-text);
	font-size: var(--fs-sm);
	font-weight: var(--fw-medium);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-radius: var(--radius-sm);
	transition: all var(--transition-fast);
}

.primary-menu li a:hover,
.primary-menu li.current-menu-item > a {
	color: var(--color-primary-light);
	background-color: rgba(155, 89, 182, 0.1);
}

/* Dropdown */
.primary-menu li ul.sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	padding: var(--space-sm) 0;
	background-color: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
	z-index: 100;
}

.primary-menu li:hover > ul.sub-menu {
	display: block;
}

.primary-menu li ul.sub-menu a {
	text-transform: none;
	padding: var(--space-sm) var(--space-lg);
}

/* Menu toggle (mobile) */
.menu-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	padding: var(--space-sm);
}

.hamburger-line {
	display: block;
	width: 24px;
	height: 2px;
	background-color: var(--color-text);
	transition: all var(--transition-normal);
	border-radius: 1px;
}

/* Header Actions */
.header-actions {
	display: flex;
	align-items: center;
	gap: var(--space-md);
}

.header-search-toggle,
.header-cart {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	color: var(--color-text);
	border-radius: var(--radius-md);
	transition: all var(--transition-fast);
}

.header-search-toggle:hover,
.header-cart:hover {
	color: var(--color-primary-light);
	background-color: rgba(155, 89, 182, 0.1);
}

.header-cart {
	position: relative;
}

.cart-count {
	position: absolute;
	top: 2px;
	right: 2px;
	background: var(--color-primary);
	color: #fff;
	font-size: 10px;
	font-weight: var(--fw-bold);
	width: 18px;
	height: 18px;
	border-radius: var(--radius-full);
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

/* Search Overlay */
.header-search-overlay {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background-color: var(--color-surface);
	border-bottom: 1px solid var(--color-border);
	padding: var(--space-lg) 0;
	box-shadow: var(--shadow-lg);
}

.header-search-overlay.is-active {
	display: block;
}

.header-search-overlay .search-form {
	display: flex;
	gap: var(--space-sm);
}

.header-search-overlay .search-field {
	flex: 1;
	padding: var(--space-sm) var(--space-md);
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	color: var(--color-text);
	font-size: var(--fs-base);
}

.header-search-overlay .search-field:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 2px rgba(155, 89, 182, 0.2);
}

.header-search-overlay .search-submit {
	padding: var(--space-sm) var(--space-lg);
	background: var(--color-primary);
	color: #fff;
	border: none;
	border-radius: var(--radius-md);
	font-weight: var(--fw-semibold);
	cursor: pointer;
	transition: background var(--transition-fast);
}

.header-search-overlay .search-submit:hover {
	background: var(--color-primary-light);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 80vh;
	padding-block: var(--space-4xl);
	background: linear-gradient(135deg, #0D0D0D 0%, #1A1A2E 50%, #16213E 100%);
	overflow: hidden;
}

.hero__overlay {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse at 20% 80%, rgba(155, 89, 182, 0.15) 0%, transparent 50%),
		radial-gradient(ellipse at 80% 20%, rgba(155, 89, 182, 0.1) 0%, transparent 50%);
	pointer-events: none;
}

.hero__content {
	position: relative;
	z-index: 1;
	max-width: 700px;
}

.hero__title {
	font-size: clamp(var(--fs-2xl), 5vw, var(--fs-4xl));
	font-weight: var(--fw-black);
	letter-spacing: 0.05em;
	text-transform: uppercase;
	margin-bottom: var(--space-lg);
	background: linear-gradient(135deg, #fff 0%, var(--color-primary-light) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.hero__subtitle {
	font-size: var(--fs-lg);
	color: var(--color-text-muted);
	line-height: var(--lh-relaxed);
	margin-bottom: var(--space-2xl);
	max-width: 550px;
}

/* --------------------------------------------------------------------------
   Page Hero (Archive, Search, Blog)
   -------------------------------------------------------------------------- */
.page-hero {
	text-align: center;
	padding-block: var(--space-3xl);
	margin-bottom: var(--space-2xl);
}

.page-hero__title {
	margin-bottom: var(--space-md);
}

.page-hero__subtitle {
	color: var(--color-text-muted);
	font-size: var(--fs-md);
	max-width: 600px;
	margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Category Cards (Front Page)
   -------------------------------------------------------------------------- */
.categories-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: var(--space-xl);
}

.category-card {
	position: relative;
	display: block;
	border-radius: var(--radius-lg);
	overflow: hidden;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	transition: all var(--transition-normal);
}

.category-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-glow);
	border-color: var(--color-primary);
}

.category-card__image {
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.category-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--transition-slow);
}

.category-card:hover .category-card__image img {
	transform: scale(1.05);
}

.category-card__info {
	padding: var(--space-lg);
}

.category-card__title {
	font-size: var(--fs-md);
	margin-bottom: var(--space-xs);
	color: var(--color-text-heading);
}

.category-card__count {
	font-size: var(--fs-sm);
	color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Feature Cards (Front Page)
   -------------------------------------------------------------------------- */
.features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: var(--space-xl);
}

.feature-card {
	text-align: center;
	padding: var(--space-2xl) var(--space-lg);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	transition: all var(--transition-normal);
}

.feature-card:hover {
	border-color: var(--color-primary);
	transform: translateY(-2px);
}

.feature-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	background: rgba(155, 89, 182, 0.1);
	border-radius: var(--radius-full);
	margin-bottom: var(--space-lg);
	color: var(--color-primary-light);
}

.feature-card__title {
	font-size: var(--fs-md);
	margin-bottom: var(--space-sm);
}

.feature-card p {
	color: var(--color-text-muted);
	font-size: var(--fs-sm);
	line-height: var(--lh-relaxed);
}

/* --------------------------------------------------------------------------
   Post Cards (Blog Grid)
   -------------------------------------------------------------------------- */
.posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: var(--space-xl);
}

.post-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	transition: all var(--transition-normal);
}

.post-card:hover {
	border-color: var(--color-primary);
	transform: translateY(-3px);
	box-shadow: var(--shadow-md);
}

.post-card__thumbnail {
	aspect-ratio: 3 / 4;
	overflow: hidden;
}

.post-card__thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--transition-slow);
}

.post-card:hover .post-card__thumbnail img {
	transform: scale(1.05);
}

.post-card__content {
	padding: var(--space-lg);
}

.post-card__meta {
	display: flex;
	align-items: center;
	gap: var(--space-md);
	font-size: var(--fs-xs);
	color: var(--color-text-muted);
	margin-bottom: var(--space-sm);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.post-card__category a {
	color: var(--color-primary-light);
}

.post-card__title {
	font-family: var(--font-body);
	font-size: var(--fs-lg);
	font-weight: var(--fw-semibold);
	margin-bottom: var(--space-sm);
}

.post-card__title a {
	color: var(--color-text-heading);
}

.post-card__title a:hover {
	color: var(--color-primary-light);
}

.post-card__excerpt {
	color: var(--color-text-muted);
	font-size: var(--fs-sm);
	line-height: var(--lh-relaxed);
	margin-bottom: var(--space-md);
}

.post-card__read-more {
	display: inline-flex;
	align-items: center;
	gap: var(--space-xs);
	font-size: var(--fs-sm);
	font-weight: var(--fw-semibold);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--color-primary-light);
}

.post-card__read-more:hover {
	color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   Single Content
   -------------------------------------------------------------------------- */
.single-content {
	max-width: 800px;
	margin-inline: auto;
	padding-block: var(--space-2xl);
}

.entry-header {
	margin-bottom: var(--space-2xl);
	text-align: center;
}

.entry-title {
	margin-bottom: var(--space-md);
}

.entry-meta {
	display: flex;
	justify-content: center;
	gap: var(--space-lg);
	color: var(--color-text-muted);
	font-size: var(--fs-sm);
}

.entry-thumbnail {
	margin-bottom: var(--space-2xl);
	border-radius: var(--radius-lg);
	overflow: hidden;
}

.entry-content {
	font-size: var(--fs-md);
	line-height: var(--lh-relaxed);
}

.entry-content p {
	margin-bottom: var(--space-lg);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	margin-top: var(--space-2xl);
	margin-bottom: var(--space-md);
}

.entry-content ul,
.entry-content ol {
	margin-bottom: var(--space-lg);
	padding-left: var(--space-xl);
}

.entry-content ul {
	list-style: disc;
}

.entry-content ol {
	list-style: decimal;
}

.entry-content li {
	margin-bottom: var(--space-sm);
}

.entry-content blockquote {
	border-left: 3px solid var(--color-primary);
	padding-left: var(--space-lg);
	margin: var(--space-xl) 0;
	font-style: italic;
	color: var(--color-text-muted);
}

.entry-content img {
	border-radius: var(--radius-md);
}

.entry-content a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Post Navigation */
.post-navigation {
	margin-top: var(--space-3xl);
	padding-top: var(--space-2xl);
	border-top: 1px solid var(--color-border);
}

.post-navigation .nav-links {
	display: flex;
	justify-content: space-between;
	gap: var(--space-xl);
}

.post-navigation .nav-label {
	display: block;
	font-size: var(--fs-xs);
	color: var(--color-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-bottom: var(--space-xs);
}

.post-navigation .nav-next {
	text-align: right;
}

/* Entry Footer */
.entry-footer {
	margin-top: var(--space-2xl);
	padding-top: var(--space-lg);
	border-top: 1px solid var(--color-border);
}

.entry-tags {
	font-size: var(--fs-sm);
	color: var(--color-text-muted);
}

.entry-tags a {
	color: var(--color-primary-light);
}

/* --------------------------------------------------------------------------
   404 Page
   -------------------------------------------------------------------------- */
.error-404 {
	text-align: center;
	padding-block: var(--space-4xl);
}

.error-404__code {
	font-size: clamp(5rem, 15vw, 12rem);
	font-weight: var(--fw-black);
	background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	line-height: 1;
	margin-bottom: var(--space-md);
}

.error-404__title {
	font-size: var(--fs-2xl);
	margin-bottom: var(--space-md);
}

.error-404__message {
	color: var(--color-text-muted);
	font-size: var(--fs-md);
	max-width: 500px;
	margin-inline: auto;
	margin-bottom: var(--space-2xl);
}

.error-404__actions {
	display: flex;
	justify-content: center;
	gap: var(--space-md);
	margin-bottom: var(--space-2xl);
	flex-wrap: wrap;
}

.error-404__search {
	max-width: 400px;
	margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pagination {
	margin-top: var(--space-3xl);
	text-align: center;
}

.pagination .nav-links {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: var(--space-sm);
	flex-wrap: wrap;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 var(--space-sm);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	color: var(--color-text);
	font-size: var(--fs-sm);
	font-weight: var(--fw-medium);
	transition: all var(--transition-fast);
}

.pagination .page-numbers:hover {
	border-color: var(--color-primary);
	color: var(--color-primary-light);
}

.pagination .page-numbers.current {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: #fff;
}

/* --------------------------------------------------------------------------
   No Results
   -------------------------------------------------------------------------- */
.no-results {
	text-align: center;
	padding-block: var(--space-4xl);
}

.no-results h2 {
	margin-bottom: var(--space-md);
}

.no-results p {
	color: var(--color-text-muted);
	margin-bottom: var(--space-xl);
}

.no-results .search-form {
	max-width: 400px;
	margin-inline: auto;
	display: flex;
	gap: var(--space-sm);
}

.no-results .search-field {
	flex: 1;
	padding: var(--space-sm) var(--space-md);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
}

.no-results .search-field:focus {
	outline: none;
	border-color: var(--color-primary);
}

.no-results .search-submit {
	padding: var(--space-sm) var(--space-lg);
	background: var(--color-primary);
	color: #fff;
	border: none;
	border-radius: var(--radius-md);
	cursor: pointer;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
	background-color: var(--color-bg-alt);
	border-top: 1px solid var(--color-border);
	padding-top: var(--space-4xl);
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: var(--space-2xl);
	padding-bottom: var(--space-3xl);
	border-bottom: 1px solid var(--color-border);
}

.footer-widget-area .widget-title {
	font-size: var(--fs-md);
	margin-bottom: var(--space-lg);
	color: var(--color-text-heading);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.footer-widget-area p {
	color: var(--color-text-muted);
	font-size: var(--fs-sm);
	line-height: var(--lh-relaxed);
}

.footer-menu {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
}

.footer-menu a {
	color: var(--color-text-muted);
	font-size: var(--fs-sm);
	transition: color var(--transition-fast);
}

.footer-menu a:hover {
	color: var(--color-primary-light);
}

/* Widget styles */
.widget {
	margin-bottom: var(--space-xl);
}

.widget:last-child {
	margin-bottom: 0;
}

.widget ul {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
}

.widget ul a {
	color: var(--color-text-muted);
	font-size: var(--fs-sm);
}

.widget ul a:hover {
	color: var(--color-primary-light);
}

/* Footer Bottom */
.footer-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-block: var(--space-xl);
}

.footer-copyright p {
	font-size: var(--fs-sm);
	color: var(--color-text-muted);
}

.footer-copyright a {
	color: var(--color-primary-light);
}

.back-to-top {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	color: var(--color-text-muted);
	transition: all var(--transition-fast);
}

.back-to-top:hover {
	border-color: var(--color-primary);
	color: var(--color-primary-light);
	transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Forms (Generic)
   -------------------------------------------------------------------------- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="number"],
textarea,
select {
	width: 100%;
	padding: 0.625rem var(--space-md);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	color: var(--color-text);
	font-size: var(--fs-base);
	transition: border-color var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 2px rgba(155, 89, 182, 0.2);
}

::placeholder {
	color: var(--color-text-muted);
	opacity: 0.7;
}

/* --------------------------------------------------------------------------
   Plugin Accommodation — Generic Containers
   --------------------------------------------------------------------------
   These styles provide sensible dark-theme defaults for common
   plugin-injected elements (badges, notices, modals) so they
   don't appear unstyled. Plugins should ship their own CSS and
   can override these with higher specificity.
   -------------------------------------------------------------------------- */

/* Generic badge styling (e.g. "New", "Hot", "Sale" from plugins) */
.woocommerce ul.products li.product [class*="badge"] {
	font-size: var(--fs-xs);
	font-weight: var(--fw-bold);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	border-radius: var(--radius-sm);
	z-index: 5;
}

/* Generic notice box (plugins may inject before add-to-cart form) */
.woocommerce div.product .woocommerce-variation-add-to-cart .single_add_to_cart_button,
.woocommerce div.product [class*="notice"],
.woocommerce div.product [class*="info-box"] {
	border-radius: var(--radius-md);
}

/* Ensure plugin modals/overlays sit above the header */
[class*="modal-overlay"],
[class*="popup-overlay"],
[class*="lightbox-overlay"] {
	z-index: 10000;
}

[class*="modal-content"],
[class*="popup-content"],
[class*="lightbox-content"] {
	z-index: 10001;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
	.main-navigation {
		position: fixed;
		top: var(--header-height);
		left: 0;
		right: 0;
		bottom: 0;
		background: var(--color-bg);
		justify-content: flex-start;
		align-items: flex-start;
		padding: var(--space-xl);
		transform: translateX(-100%);
		transition: transform var(--transition-normal);
		z-index: 999;
		overflow-y: auto;
	}

	.main-navigation.is-toggled {
		transform: translateX(0);
	}

	.primary-menu {
		flex-direction: column;
		width: 100%;
		gap: 0;
	}

	.primary-menu li a {
		padding: var(--space-md);
		font-size: var(--fs-base);
		border-bottom: 1px solid var(--color-border);
	}

	.primary-menu li ul.sub-menu {
		position: static;
		display: none;
		box-shadow: none;
		border: none;
		padding-left: var(--space-lg);
		background: transparent;
	}

	.primary-menu li.menu-item-has-children:hover > ul.sub-menu {
		display: block;
	}

	.menu-toggle {
		display: flex;
	}
}

@media (max-width: 768px) {
	:root {
		--container-pad: 1rem;
		--header-height: 64px;
	}

	.hero {
		min-height: 60vh;
	}

	.hero__title {
		font-size: var(--fs-2xl);
	}

	.posts-grid {
		grid-template-columns: 1fr;
	}

	.categories-grid {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	}

	.features-grid {
		grid-template-columns: 1fr;
	}

	.footer-bottom {
		flex-direction: column;
		gap: var(--space-md);
		text-align: center;
	}

	.post-navigation .nav-links {
		flex-direction: column;
	}

	.post-navigation .nav-next {
		text-align: left;
	}
}

@media (max-width: 480px) {
	.error-404__actions {
		flex-direction: column;
		align-items: center;
	}

	.btn--lg {
		width: 100%;
	}
}
