/*
Theme Name: AI Server
Theme URI: https://aiserver.in.th
Description: Thai-first editorial theme for AI Server — news, reviews and deep-dives on AI server hardware, workstations and GPUs (DGX Spark, RTX-5090, GB200). Custom classic theme with self-hosted Kanit/Sarabun, dark mode and no-plugin OG/SEO meta.
Author: AI Server
Version: 1.5.4
Requires at least: 6.4
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aiserver
*/

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
	/* Brand */
	--accent: #06b6d4;
	--accent-hover: #0891b2;
	--accent-soft: rgba(6, 182, 212, 0.12);
	--accent-contrast: #04232b;

	/* Surfaces (light) */
	--bg: #f6f8fb;
	--surface: #ffffff;
	--surface-2: #eef2f7;
	--text: #0d1520;
	--muted: #5a6673;
	--border: #dfe6ee;
	--shadow: 0 1px 2px rgba(13, 21, 32, 0.04), 0 8px 24px rgba(13, 21, 32, 0.06);
	--scrim: linear-gradient(to top, rgba(6, 10, 16, 0.92) 0%, rgba(6, 10, 16, 0.55) 45%, rgba(6, 10, 16, 0.05) 100%);

	/* Layout */
	--container: 1120px;
	--reading: 820px;
	--wide: 1040px;

	/* Radii */
	--radius-sm: 8px;
	--radius: 14px;
	--radius-lg: 22px;

	/* Spacing scale */
	--s-1: 0.25rem;
	--s-2: 0.5rem;
	--s-3: 0.75rem;
	--s-4: 1rem;
	--s-5: 1.5rem;
	--s-6: 2rem;
	--s-7: 3rem;
	--s-8: 4.5rem;

	/* Type */
	--font-sans: 'Sarabun', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--font-display: 'Kanit', var(--font-sans);

	--header-h: 64px;
}

/* Dark via system preference */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme='light']) {
		--accent: #22d3ee;
		--accent-hover: #67e8f9;
		--accent-soft: rgba(34, 211, 238, 0.14);
		--accent-contrast: #04232b;
		--bg: #080b11;
		--surface: #10161f;
		--surface-2: #19212d;
		--text: #e7edf4;
		--muted: #93a1b3;
		--border: #232e3d;
		--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.45);
		--scrim: linear-gradient(to top, rgba(3, 6, 10, 0.94) 0%, rgba(3, 6, 10, 0.6) 45%, rgba(3, 6, 10, 0.05) 100%);
	}
}

/* Dark via explicit toggle (wins over system both ways) */
:root[data-theme='dark'] {
	--accent: #22d3ee;
	--accent-hover: #67e8f9;
	--accent-soft: rgba(34, 211, 238, 0.14);
	--accent-contrast: #04232b;
	--bg: #080b11;
	--surface: #10161f;
	--surface-2: #19212d;
	--text: #e7edf4;
	--muted: #93a1b3;
	--border: #232e3d;
	--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.45);
	--scrim: linear-gradient(to top, rgba(3, 6, 10, 0.94) 0%, rgba(3, 6, 10, 0.6) 45%, rgba(3, 6, 10, 0.05) 100%);
}

:root[data-theme='light'] {
	--accent: #06b6d4;
	--accent-hover: #0891b2;
	--accent-soft: rgba(6, 182, 212, 0.12);
	--bg: #f6f8fb;
	--surface: #ffffff;
	--surface-2: #eef2f7;
	--text: #0d1520;
	--muted: #5a6673;
	--border: #dfe6ee;
	--shadow: 0 1px 2px rgba(13, 21, 32, 0.04), 0 8px 24px rgba(13, 21, 32, 0.06);
}

/* ==========================================================================
   2. BASE
   ========================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-sans);
	font-size: 17px;
	line-height: 1.75;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

a {
	color: var(--accent);
	text-decoration: none;
}

a:hover {
	color: var(--accent-hover);
	text-decoration: underline;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.25;
	color: var(--text);
	margin: 0 0 var(--s-4);
	letter-spacing: -0.01em;
}

h1 {
	font-size: clamp(1.9rem, 4vw, 2.7rem);
}

h2 {
	font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
	font-size: 1.3rem;
}

p {
	margin: 0 0 var(--s-5);
}

hr {
	border: 0;
	border-top: 1px solid var(--border);
	margin: var(--s-6) 0;
}

blockquote {
	margin: var(--s-6) 0;
	padding: var(--s-2) var(--s-5);
	border-left: 4px solid var(--accent);
	background: var(--accent-soft);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	color: var(--text);
}

blockquote p:last-child {
	margin-bottom: 0;
}

code,
pre,
kbd {
	font-family: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
	font-size: 0.9em;
}

:not(pre) > code {
	background: var(--surface-2);
	padding: 0.15em 0.4em;
	border-radius: 6px;
}

pre {
	background: var(--surface-2);
	border: 1px solid var(--border);
	padding: var(--s-4);
	border-radius: var(--radius-sm);
	overflow-x: auto;
}

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

.container {
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: 1.5rem;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--accent);
	color: var(--accent-contrast);
	padding: var(--s-2) var(--s-4);
	z-index: 200;
	border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
	left: 0;
}

.screen-reader-text {
	position: absolute !important;
	clip-path: inset(50%);
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ==========================================================================
   3. HEADER
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: color-mix(in srgb, var(--surface) 82%, transparent);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
	backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid var(--border);
}

.header-inner {
	display: flex;
	align-items: center;
	gap: var(--s-5);
	min-height: var(--header-h);
}

.site-brand {
	display: flex;
	align-items: center;
	gap: var(--s-3);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.2rem;
	color: var(--text);
	letter-spacing: -0.02em;
	white-space: nowrap;
}

.site-brand:hover {
	text-decoration: none;
	color: var(--text);
}

.brand-mark {
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #3b82f6));
	color: #fff;
	flex: none;
	box-shadow: 0 2px 10px var(--accent-soft);
}

.brand-mark svg {
	width: 20px;
	height: 20px;
}

.main-nav {
	display: flex;
	align-items: center;
	gap: var(--s-2);
	margin-inline-start: var(--s-3);
}

.main-nav ul {
	list-style: none;
	display: flex;
	gap: var(--s-2);
	margin: 0;
	padding: 0;
}

.main-nav a {
	color: var(--muted);
	font-weight: 500;
	font-size: 0.97rem;
	padding: var(--s-2) var(--s-3);
	border-radius: var(--radius-sm);
	transition: color 0.15s, background 0.15s;
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
	color: var(--text);
	background: var(--surface-2);
	text-decoration: none;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: var(--s-2);
	margin-inline-start: auto;
}

.icon-btn {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	background: transparent;
	color: var(--muted);
	cursor: pointer;
	transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.icon-btn:hover {
	color: var(--text);
	background: var(--surface-2);
}

.icon-btn svg {
	width: 20px;
	height: 20px;
}

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

:root[data-theme='dark'] .theme-toggle .icon-sun,
.theme-toggle .icon-moon {
	display: block;
}

:root[data-theme='dark'] .theme-toggle .icon-moon,
.theme-toggle .icon-sun {
	display: none;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme='light']) .theme-toggle .icon-sun {
		display: none;
	}

	:root:not([data-theme='light']) .theme-toggle .icon-moon {
		display: block;
	}
}

/* Header search */
.header-search {
	position: relative;
}

.header-search input[type='search'] {
	width: 210px;
	max-width: 42vw;
	padding: 0.5rem 0.75rem 0.5rem 2.2rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface-2);
	color: var(--text);
	font-family: inherit;
	font-size: 0.92rem;
}

.header-search input[type='search']:focus {
	outline: none;
	border-color: var(--accent);
	background: var(--surface);
}

.header-search .search-icon {
	position: absolute;
	left: 0.7rem;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	color: var(--muted);
	pointer-events: none;
}

.nav-toggle {
	display: none;
}

/* ==========================================================================
   4. HOME: HERO + GRID
   ========================================================================== */
.site-main {
	padding-block: var(--s-7);
}

.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--s-4);
	margin-bottom: var(--s-5);
}

.section-head h2 {
	margin: 0;
	font-size: 1.35rem;
}

.section-head .eyebrow {
	color: var(--accent);
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.hero {
	position: relative;
	border-radius: var(--radius-lg);
	overflow: hidden;
	margin-bottom: var(--s-7);
	aspect-ratio: 16 / 9;
	min-height: 360px;
	max-height: 640px;
	display: flex;
	align-items: flex-end;
	background: var(--surface-2);
	box-shadow: var(--shadow);
}

.hero-media {
	position: absolute;
	inset: 0;
}

.hero-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--scrim);
}

.hero-body {
	position: relative;
	z-index: 1;
	padding: var(--s-7) var(--s-6);
	max-width: 760px;
	color: #fff;
}

.hero-body .cat-pill {
	background: var(--accent);
	color: var(--accent-contrast);
}

.hero-title {
	color: #fff;
	font-size: clamp(1.8rem, 3.6vw, 2.8rem);
	margin: var(--s-3) 0;
	text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.hero-title a {
	color: #fff;
}

.hero-title a:hover {
	color: #fff;
	text-decoration: none;
}

.hero-excerpt {
	color: rgba(255, 255, 255, 0.9);
	font-size: 1.05rem;
	margin-bottom: var(--s-4);
	max-width: 620px;
}

.hero-meta {
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.9rem;
	display: flex;
	gap: var(--s-3);
	align-items: center;
	flex-wrap: wrap;
}

.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
	gap: var(--s-5);
}

/* ==========================================================================
   5. CARD
   ========================================================================== */
.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow);
	border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.card-media {
	aspect-ratio: 16 / 9;
	background: var(--surface-2);
	overflow: hidden;
}

.card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.card:hover .card-media img {
	transform: scale(1.04);
}

.card-body {
	padding: var(--s-4) var(--s-5) var(--s-5);
	display: flex;
	flex-direction: column;
	gap: var(--s-3);
	flex: 1;
}

.card-title {
	font-size: 1.18rem;
	margin: 0;
	line-height: 1.35;
}

.card-title a {
	color: var(--text);
}

.card-title a:hover {
	color: var(--accent);
	text-decoration: none;
}

.card-excerpt {
	color: var(--muted);
	font-size: 0.96rem;
	margin: 0;
	flex: 1;
}

.card-meta {
	display: flex;
	align-items: center;
	gap: var(--s-3);
	color: var(--muted);
	font-size: 0.85rem;
	margin-top: auto;
}

/* Category pill */
.cat-pill {
	display: inline-block;
	align-self: flex-start;
	background: var(--accent-soft);
	color: var(--accent);
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.72rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 0.25rem 0.6rem;
	border-radius: 999px;
}

.cat-pill:hover {
	text-decoration: none;
	color: var(--accent);
}

.dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.5;
	flex: none;
}

/* ==========================================================================
   6. SINGLE / PAGE
   ========================================================================== */
.entry {
	padding-block: var(--s-6) var(--s-7);
}

.entry-header {
	max-width: var(--reading);
	margin: 0 auto var(--s-6);
	text-align: center;
}

.entry-header .cat-pill {
	margin-bottom: var(--s-4);
}

.entry-title {
	margin: 0 0 var(--s-4);
}

.entry-meta {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: var(--s-3);
	color: var(--muted);
	font-size: 0.92rem;
	flex-wrap: wrap;
}

.entry-meta .avatar {
	border-radius: 50%;
}

.featured-breakout {
	max-width: var(--wide);
	margin: 0 auto var(--s-7);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow);
}

.featured-breakout img {
	width: 100%;
}

.entry-content {
	max-width: var(--reading);
	margin-inline: auto;
	font-size: 1.06rem;
}

.entry-content > * {
	margin-bottom: var(--s-5);
}

.entry-content h2 {
	margin-top: var(--s-7);
}

.entry-content h3 {
	margin-top: var(--s-6);
}

.entry-content img,
.entry-content figure {
	border-radius: var(--radius);
}

.entry-content figure {
	margin-inline: 0;
}

.entry-content figcaption {
	color: var(--muted);
	font-size: 0.86rem;
	text-align: center;
	margin-top: var(--s-2);
}

/* Wide / full blocks break out of the reading column */
.entry-content .alignwide {
	width: min(var(--wide), 92vw);
	margin-inline: calc(50% - min(var(--wide), 92vw) / 2);
}

.entry-content .alignfull {
	width: 100vw;
	margin-inline: calc(50% - 50vw);
	border-radius: 0;
}

/* Any wide content scrolls instead of overflowing */
.entry-content table {
	width: 100%;
	border-collapse: collapse;
	display: block;
	overflow-x: auto;
}

.entry-content table th,
.entry-content table td {
	border: 1px solid var(--border);
	padding: var(--s-3);
	text-align: left;
}

.entry-content table th {
	background: var(--surface-2);
	font-family: var(--font-display);
	font-weight: 600;
}

.entry-footer {
	max-width: var(--reading);
	margin: var(--s-7) auto 0;
}

.tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-2);
	margin-bottom: var(--s-6);
}

.tag-list a {
	background: var(--surface-2);
	color: var(--muted);
	font-size: 0.85rem;
	padding: 0.25rem 0.7rem;
	border-radius: 999px;
}

.tag-list a:hover {
	color: var(--accent);
	text-decoration: none;
}

/* Prev/next */
.post-nav {
	max-width: var(--reading);
	margin: var(--s-7) auto 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--s-4);
}

.post-nav a {
	display: block;
	padding: var(--s-4) var(--s-5);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--text);
	transition: border-color 0.15s, background 0.15s;
}

.post-nav a:hover {
	text-decoration: none;
	border-color: var(--accent);
	background: var(--surface-2);
}

.post-nav .nav-label {
	display: block;
	color: var(--muted);
	font-size: 0.8rem;
	margin-bottom: var(--s-1);
}

.post-nav .nav-next {
	text-align: right;
}

.post-nav .nav-title {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.98rem;
}

/* ==========================================================================
   7. ARCHIVE / SEARCH HEADERS
   ========================================================================== */
.page-hero {
	padding: var(--s-7) 0 var(--s-5);
	border-bottom: 1px solid var(--border);
	margin-bottom: var(--s-7);
}

.page-hero .eyebrow {
	color: var(--accent);
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.82rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.page-hero h1 {
	margin: var(--s-2) 0 var(--s-3);
}

.page-hero p {
	color: var(--muted);
	max-width: var(--reading);
	margin: 0;
}

.pagination {
	margin-top: var(--s-7);
	display: flex;
	justify-content: center;
	gap: var(--s-2);
	flex-wrap: wrap;
}

.pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding: 0 0.5rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--text);
	font-family: var(--font-display);
	font-weight: 500;
}

.pagination .page-numbers.current {
	background: var(--accent);
	color: var(--accent-contrast);
	border-color: var(--accent);
}

.pagination a.page-numbers:hover {
	border-color: var(--accent);
	text-decoration: none;
}

/* ==========================================================================
   8. COMMENTS
   ========================================================================== */
.comments-area {
	max-width: var(--reading);
	margin: var(--s-8) auto 0;
}

.comment-list {
	list-style: none;
	margin: var(--s-6) 0;
	padding: 0;
}

.comment-list li {
	margin-bottom: var(--s-5);
}

.comment-body {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: var(--s-4) var(--s-5);
}

.comment-list .children {
	list-style: none;
	margin: var(--s-5) 0 0;
	padding-inline-start: var(--s-5);
	border-inline-start: 2px solid var(--border);
}

.comment-meta {
	display: flex;
	align-items: center;
	gap: var(--s-3);
	margin-bottom: var(--s-2);
	font-size: 0.9rem;
}

.comment-author {
	font-family: var(--font-display);
	font-weight: 600;
}

.comment-metadata {
	color: var(--muted);
	font-size: 0.82rem;
}

.comment-form {
	display: grid;
	gap: var(--s-4);
}

.comment-form input[type='text'],
.comment-form input[type='email'],
.comment-form input[type='url'],
.comment-form textarea,
.form-field input,
.form-field textarea,
.form-field select {
	width: 100%;
	padding: 0.7rem 0.9rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--text);
	font-family: inherit;
	font-size: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: var(--accent);
}

/* ==========================================================================
   8b. CONTACT FORM
   ========================================================================== */
.aiserver-form {
	max-width: var(--reading);
	display: grid;
	gap: var(--s-4);
	margin-top: var(--s-5);
}

.form-field {
	display: grid;
	gap: var(--s-2);
}

.form-field label {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--text);
}

.aiserver-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.aiserver-form .btn {
	justify-self: start;
}

.form-notice {
	padding: var(--s-4) var(--s-5);
	border-radius: var(--radius);
	margin-bottom: var(--s-5);
	border: 1px solid var(--border);
}

.form-success {
	background: var(--accent-soft);
	border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
	color: var(--text);
}

.form-error {
	background: color-mix(in srgb, #ef4444 10%, var(--surface));
	border-color: color-mix(in srgb, #ef4444 40%, var(--border));
	color: var(--text);
}

/* ==========================================================================
   9. BUTTONS
   ========================================================================== */
.btn {
	display: inline-flex;
	align-items: center;
	gap: var(--s-2);
	background: var(--accent);
	color: var(--accent-contrast);
	font-family: var(--font-display);
	font-weight: 600;
	padding: 0.65rem 1.3rem;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	cursor: pointer;
	transition: background 0.15s, transform 0.1s;
}

.btn:hover {
	background: var(--accent-hover);
	color: var(--accent-contrast);
	text-decoration: none;
}

.btn:active {
	transform: translateY(1px);
}

.btn-ghost {
	background: transparent;
	color: var(--text);
	border-color: var(--border);
}

.btn-ghost:hover {
	background: var(--surface-2);
	color: var(--text);
	border-color: var(--accent);
}

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
.site-footer {
	margin-top: var(--s-8);
	border-top: 1px solid var(--border);
	background: var(--surface);
	padding-block: var(--s-7) var(--s-6);
}

.footer-inner {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-6);
	justify-content: space-between;
}

.footer-brand {
	max-width: 360px;
}

.footer-brand .site-brand {
	margin-bottom: var(--s-3);
}

.footer-brand p {
	color: var(--muted);
	font-size: 0.95rem;
	margin: 0;
}

.footer-nav h4 {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--muted);
	margin-bottom: var(--s-3);
}

.footer-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--s-2);
}

.footer-nav a {
	color: var(--text);
	font-size: 0.95rem;
}

.footer-nav a:hover {
	color: var(--accent);
}

.footer-bottom {
	margin-top: var(--s-6);
	padding-top: var(--s-5);
	border-top: 1px solid var(--border);
	color: var(--muted);
	font-size: 0.88rem;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: var(--s-3);
}

/* ==========================================================================
   10b. WOOCOMMERCE
   ========================================================================== */
.woo-container {
	padding-block: var(--s-6) 0;
}

.woocommerce-products-header {
	margin-bottom: var(--s-6);
}

.woocommerce-products-header__title,
.woocommerce div.product .product_title {
	font-family: var(--font-display);
}

.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
	color: var(--muted);
}

/* Product grid → theme cards */
.woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
	gap: var(--s-5);
	margin: 0;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: var(--s-4);
	display: flex;
	flex-direction: column;
	gap: var(--s-2);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.woocommerce ul.products li.product:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow);
	border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.woocommerce ul.products li.product a img {
	border-radius: var(--radius-sm);
	margin-bottom: var(--s-2);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--font-display);
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--text);
	padding: 0;
}

.woocommerce ul.products li.product .price {
	color: var(--text);
	font-weight: 600;
}

.woocommerce ul.products li.product .price del {
	color: var(--muted);
	font-weight: 400;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: var(--accent);
}

.woocommerce span.onsale {
	background: var(--accent);
	color: var(--accent-contrast);
	border-radius: 999px;
}

/* Buttons */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
	background: var(--accent);
	color: var(--accent-contrast);
	font-family: var(--font-display);
	font-weight: 600;
	border-radius: var(--radius-sm);
	transition: background 0.15s;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
	background: var(--accent-hover);
	color: var(--accent-contrast);
}

/* Notices / messages */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-top-color: var(--accent);
	background: var(--surface-2);
	color: var(--text);
	border-radius: var(--radius-sm);
}

.woocommerce-message::before,
.woocommerce-info::before {
	color: var(--accent);
}

/* Single product layout inside reading-ish width */
.woocommerce div.product {
	margin-top: var(--s-4);
}

.woocommerce .star-rating span {
	color: var(--accent);
}

/* Forms adopt theme fields */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce .select2-container .select2-selection {
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--text);
}

/* Empty shop message */
.woocommerce-no-products-found {
	padding: var(--s-6) 0;
	color: var(--muted);
}

/* ==========================================================================
   10c. PRODUCT SHOWCASE (custom products page)
   ========================================================================== */
.products-intro {
	max-width: var(--reading);
	color: var(--muted);
}

.product-showcase {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr));
	gap: var(--s-6);
	margin-bottom: var(--s-8);
}

.showcase-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.showcase-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow);
	border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.showcase-media {
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--surface-2);
	overflow: hidden;
}

.showcase-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.showcase-card:hover .showcase-media img {
	transform: scale(1.04);
}

.showcase-body {
	padding: var(--s-5) var(--s-6) var(--s-6);
	display: flex;
	flex-direction: column;
	gap: var(--s-3);
	flex: 1;
}

.showcase-title {
	font-size: 1.5rem;
	margin: 0;
	line-height: 1.3;
}

.showcase-title a {
	color: var(--text);
}

.showcase-title a:hover {
	color: var(--accent);
	text-decoration: none;
}

.showcase-excerpt {
	color: var(--muted);
	margin: 0;
	flex: 1;
	font-size: 0.98rem;
}

.showcase-price {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.35rem;
	color: var(--accent);
}

.showcase-price del {
	color: var(--muted);
	font-weight: 400;
	font-size: 1rem;
	margin-right: 0.4rem;
}

.showcase-price .amount {
	white-space: nowrap;
}

.showcase-body .btn {
	align-self: flex-start;
	margin-top: var(--s-2);
}

/* ==========================================================================
   10d. COURSES PAGE
   ========================================================================== */
.course-promo {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--s-4) var(--s-6);
	background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 20%, var(--surface)), var(--surface) 70%);
	border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
	border-radius: var(--radius-lg);
	padding: var(--s-5) var(--s-6);
	margin-bottom: var(--s-7);
}

.course-promo-badge {
	display: inline-block;
	margin-bottom: var(--s-2);
	background: var(--accent);
	color: var(--accent-contrast);
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.75rem;
	letter-spacing: 0.03em;
	padding: 0.2rem 0.7rem;
	border-radius: 999px;
}

.course-promo h2 {
	margin: 0 0 var(--s-2);
	font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.course-promo p {
	margin: 0;
	color: var(--muted);
}

.course-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
	gap: var(--s-5);
	margin-bottom: var(--s-6);
}

.course-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: var(--s-5) var(--s-6) var(--s-6);
	display: flex;
	flex-direction: column;
	gap: var(--s-3);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.course-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow);
	border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.course-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.course-no {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.6rem;
	color: color-mix(in srgb, var(--accent) 55%, var(--border));
}

.course-free-pill {
	background: var(--accent-soft);
	color: var(--accent);
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.72rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 0.25rem 0.6rem;
	border-radius: 999px;
}

.course-title {
	font-size: 1.3rem;
	margin: 0;
}

.course-price {
	display: flex;
	align-items: baseline;
	gap: var(--s-2);
	flex-wrap: wrap;
}

.course-price-value {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.25rem;
	color: var(--muted);
	text-decoration: line-through;
}

.course-price-note {
	color: var(--accent);
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.9rem;
}

.course-desc {
	color: var(--muted);
	margin: 0;
	font-size: 0.96rem;
}

.course-topics {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--s-2);
}

.course-topics li {
	position: relative;
	padding-left: 1.5rem;
	color: var(--text);
	font-size: 0.94rem;
}

.course-topics li::before {
	content: '✓';
	position: absolute;
	left: 0;
	top: 0;
	color: var(--accent);
	font-weight: 700;
}

.course-foot {
	text-align: center;
	color: var(--muted);
	font-size: 0.92rem;
	margin-bottom: var(--s-8);
}

/* ==========================================================================
   11. RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
	.main-nav,
	.header-search {
		display: none;
	}

	.nav-toggle {
		display: inline-grid;
	}

	.header-actions {
		gap: var(--s-1);
	}

	.mobile-nav-open .main-nav {
		display: block;
		position: fixed;
		inset: var(--header-h) 0 auto 0;
		background: var(--surface);
		border-bottom: 1px solid var(--border);
		padding: var(--s-4) 1.5rem var(--s-5);
		box-shadow: var(--shadow);
	}

	.mobile-nav-open .main-nav ul {
		flex-direction: column;
		gap: var(--s-1);
	}

	.mobile-nav-open .main-nav a {
		display: block;
		font-size: 1.05rem;
		padding: var(--s-3);
	}

	.post-nav {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 560px) {
	body {
		font-size: 16px;
	}

	.hero {
		min-height: 340px;
	}

	.hero-body {
		padding: var(--s-6) var(--s-5);
	}

	.card-grid {
		grid-template-columns: 1fr;
	}

	.footer-inner {
		flex-direction: column;
		gap: var(--s-5);
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}
