/*
Theme Name: CardMart210
Theme URI: https://cardmart210.com
Author: CardMart210
Description: Custom WooCommerce theme for CardMart210 — light, clean layout with neon accents, card-aware product tiles, deep filtering for singles and graded cards, and live search.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: cardmart210
WC requires at least: 8.0
*/

/* ================= Tokens ================= */
:root {
	--cm-bg: #f6f5fa;
	--cm-surface: #ffffff;
	--cm-ink: #16121f;
	--cm-ink-2: #3b3548;
	--cm-muted: #6b6478;
	--cm-line: #e6e2ee;
	--cm-purple: #6d28d9;
	--cm-purple-dark: #3b0f86;
	--cm-purple-soft: #f1eafe;
	--cm-yellow: #ffd60a;
	--cm-yellow-ink: #6b5200;
	--cm-lime: #a3e635;
	--cm-lime-soft: #ecfccb;
	--cm-blue: #0ea5e9;
	--cm-red: #e11d48;
	--cm-green: #15803d;
	--cm-radius: 14px;
	--cm-radius-sm: 9px;
	--cm-shadow: 0 1px 2px rgba(22, 18, 31, .06), 0 6px 20px rgba(22, 18, 31, .06);
	--cm-shadow-lg: 0 10px 40px rgba(76, 29, 149, .16);
	--cm-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--cm-display: "Rubik", "Inter", system-ui, sans-serif;
	--cm-wrap: 1320px;
	--cm-gutter: clamp(16px, 3vw, 32px);
}

/* ================= Base ================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--cm-bg);
	color: var(--cm-ink);
	font: 16px/1.55 var(--cm-font);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--cm-purple); text-decoration: none; }
a:hover { color: var(--cm-purple-dark); }
h1, h2, h3, h4 { font-family: var(--cm-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; }
h2 { font-size: clamp(22px, 2.6vw, 32px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--cm-blue); outline-offset: 2px; border-radius: 6px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.cm-wrap { max-width: var(--cm-wrap); margin: 0 auto; padding: 0 var(--cm-gutter); }
.cm-hp { position: absolute; left: -9999px; }

/* Buttons */
.cm-btn, .button, button.button, a.button, input[type=submit], .wp-element-button,
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 20px;
	border: 0; border-radius: 999px; cursor: pointer;
	background: var(--cm-ink); color: #fff;
	font: 700 15px/1.2 var(--cm-font); text-decoration: none;
	transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.cm-btn:hover, .button:hover, a.button:hover, button.button:hover { background: var(--cm-purple); color: #fff; transform: translateY(-1px); }
.cm-btn--primary, .woocommerce a.button.alt, .woocommerce button.button.alt, .single_add_to_cart_button {
	background: var(--cm-purple) !important; color: #fff !important;
	box-shadow: 0 6px 18px rgba(109, 40, 217, .28);
}
.cm-btn--primary:hover, .single_add_to_cart_button:hover { background: var(--cm-purple-dark) !important; }
.cm-btn--neon { background: var(--cm-yellow); color: var(--cm-ink); }
.cm-btn--neon:hover { background: var(--cm-lime); color: var(--cm-ink); }
.cm-btn--ghost { background: transparent; color: var(--cm-ink); box-shadow: inset 0 0 0 2px var(--cm-ink); }
.cm-btn--ghost:hover { background: var(--cm-ink); color: #fff; }

input[type=text], input[type=email], input[type=tel], input[type=number], input[type=search], input[type=password], select, textarea {
	width: 100%; min-height: 44px; padding: 10px 14px;
	border: 1.5px solid var(--cm-line); border-radius: var(--cm-radius-sm);
	background: #fff; color: var(--cm-ink); font: 15px/1.4 var(--cm-font);
}
input:focus, select:focus, textarea:focus { border-color: var(--cm-purple); outline: none; box-shadow: 0 0 0 3px var(--cm-purple-soft); }
label { font-weight: 600; font-size: 14px; }

/* ================= Header ================= */
.cm-topbar {
	background: linear-gradient(90deg, var(--cm-purple-dark), var(--cm-purple) 55%, #7c3aed);
	color: #fff; font-size: 13px; font-weight: 600;
}
.cm-topbar .cm-wrap { display: flex; gap: 22px; justify-content: center; align-items: center; min-height: 36px; flex-wrap: wrap; text-align: center; }
.cm-topbar a { color: var(--cm-yellow); }
.cm-topbar span::before { content: "✦ "; color: var(--cm-lime); }

.cm-header { background: #fff; border-bottom: 1px solid var(--cm-line); position: sticky; top: 0; z-index: 50; }
.admin-bar .cm-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .cm-header { top: 0; position: relative; } }
.cm-header__main { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; min-height: 84px; }
.cm-logo { display: flex; align-items: center; gap: 10px; }
.cm-logo img { height: 72px; width: auto; display: block; }
.cm-logo__text { font: 900 22px/1 var(--cm-display); color: var(--cm-ink); }

.cm-search { position: relative; max-width: 640px; width: 100%; justify-self: center; }
.cm-search form { display: flex; align-items: center; background: var(--cm-bg); border: 2px solid var(--cm-line); border-radius: 999px; padding: 4px 4px 4px 18px; transition: border-color .15s, box-shadow .15s; }
.cm-search form:focus-within { border-color: var(--cm-purple); box-shadow: 0 0 0 4px var(--cm-purple-soft); background: #fff; }
.cm-search input[type=search] { border: 0; background: transparent; min-height: 40px; padding: 0 8px; box-shadow: none; font-size: 15px; }
.cm-search button { min-height: 40px; padding: 0 18px; border-radius: 999px; background: var(--cm-purple); color: #fff; border: 0; font-weight: 700; cursor: pointer; }
.cm-search button:hover { background: var(--cm-purple-dark); }

.cm-live { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff; border: 1px solid var(--cm-line); border-radius: var(--cm-radius); box-shadow: var(--cm-shadow-lg); overflow: hidden; display: none; z-index: 60; }
.cm-live.is-open { display: block; }
.cm-live a { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; color: var(--cm-ink); border-bottom: 1px solid var(--cm-line); }
.cm-live a:hover, .cm-live a.is-active { background: var(--cm-purple-soft); }
.cm-live img { width: 44px; height: 60px; object-fit: contain; background: var(--cm-bg); border-radius: 6px; }
.cm-live__name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.cm-live__price { font-weight: 800; color: var(--cm-purple); white-space: nowrap; }
.cm-live__all { display: block !important; text-align: center; font-weight: 700; color: var(--cm-purple) !important; grid-template-columns: none !important; }
.cm-live__empty { padding: 16px; color: var(--cm-muted); font-size: 14px; }

.cm-actions { display: flex; align-items: center; gap: 6px; }
.cm-icon-link { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; color: var(--cm-ink); font-weight: 600; font-size: 14px; }
.cm-icon-link:hover { background: var(--cm-bg); color: var(--cm-purple); }
.cm-icon-link svg { width: 22px; height: 22px; }
.cm-cart-count { position: absolute; top: 2px; left: 26px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--cm-yellow); color: var(--cm-ink); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.cm-cart-count:empty, .cm-cart-count[data-count="0"] { display: none; }

.cm-nav { border-top: 1px solid var(--cm-line); }
.cm-nav ul { list-style: none; margin: 0; padding: 0; }
.cm-nav > .cm-wrap > ul { display: flex; gap: 2px; flex-wrap: wrap; }
.cm-nav li { position: relative; }
.cm-nav a { display: block; padding: 12px 14px; color: var(--cm-ink); font-weight: 700; font-size: 14.5px; border-radius: 8px; }
.cm-nav > .cm-wrap > ul > li > a:hover, .cm-nav .current-menu-item > a { color: var(--cm-purple); }
.cm-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.cm-nav .sub-menu { position: absolute; top: 100%; left: 0; min-width: 210px; background: #fff; border: 1px solid var(--cm-line); border-radius: var(--cm-radius); box-shadow: var(--cm-shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s ease; z-index: 70; }
.cm-nav li:hover > .sub-menu, .cm-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.cm-nav .sub-menu a { font-weight: 600; padding: 9px 12px; }
.cm-nav .sub-menu a:hover { background: var(--cm-purple-soft); }
.cm-nav li:last-child > a { background: var(--cm-lime-soft); color: #365314; margin-left: 6px; }
.cm-nav li:last-child > a:hover { background: var(--cm-lime); color: var(--cm-ink); }

.cm-burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--cm-ink); }
.cm-burger svg { width: 28px; height: 28px; }

@media (max-width: 960px) {
	.cm-header__main { grid-template-columns: auto 1fr auto; gap: 10px; min-height: 68px; }
	.cm-logo img { height: 54px; }
	.cm-search { grid-column: 1 / -1; grid-row: 2; max-width: none; margin-bottom: 12px; }
	.cm-burger { display: inline-flex; }
	.cm-icon-link span.cm-label { display: none; }
	.cm-nav { display: none; }
	.cm-nav.is-open { display: block; }
	.cm-nav > .cm-wrap > ul { flex-direction: column; padding: 8px 0 16px; }
	.cm-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 16px; display: none; }
	.cm-nav li.is-open > .sub-menu { display: block; }
	.cm-nav li:last-child > a { margin: 6px 0 0; }
}

/* ================= Main / pages ================= */
.cm-main { padding: 28px 0 64px; min-height: 50vh; }
.cm-page { background: #fff; border: 1px solid var(--cm-line); border-radius: var(--cm-radius); padding: clamp(20px, 4vw, 48px); max-width: 920px; margin: 0 auto; }
.cm-page h1 { margin-bottom: .6em; }
.cm-page ul { padding-left: 1.2em; }
.cm-page li { margin-bottom: .4em; }
.cm-page h2 { margin-top: 1.4em; font-size: 24px; }
.cm-page--wide { max-width: none; }

.cm-notice { padding: 14px 18px; border-radius: var(--cm-radius-sm); margin: 0 0 18px; font-weight: 500; }
.cm-notice--success { background: var(--cm-lime-soft); color: #365314; }
.cm-notice--error { background: #ffe4e6; color: #9f1239; }

/* Trade form */
.cm-trade-form { background: var(--cm-bg); border-radius: var(--cm-radius); padding: clamp(16px, 3vw, 28px); }
.cm-trade-form p { margin-bottom: 14px; }
.cm-trade-form label { display: block; margin-bottom: 6px; }
.cm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) { .cm-grid-2 { grid-template-columns: 1fr; } }
.cm-games { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.cm-games legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; width: 100%; }
.cm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1.5px solid var(--cm-line); font-weight: 600; cursor: pointer; margin: 0 !important; }
.cm-chip:has(input:checked) { border-color: var(--cm-purple); background: var(--cm-purple-soft); color: var(--cm-purple-dark); }

/* ================= Home ================= */
.cm-hero { position: relative; overflow: hidden; background: #fff; border-bottom: 1px solid var(--cm-line); }
.cm-hero::before { content: ""; position: absolute; inset: 0; background:
	radial-gradient(600px 300px at 85% 30%, rgba(163, 230, 53, .22), transparent 70%),
	radial-gradient(500px 320px at 70% 90%, rgba(109, 40, 217, .16), transparent 70%),
	radial-gradient(400px 260px at 100% 0%, rgba(14, 165, 233, .15), transparent 70%); }
.cm-hero .cm-wrap { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; padding-top: clamp(28px, 5vw, 64px); padding-bottom: clamp(28px, 5vw, 64px); }
.cm-hero__eyebrow { display: inline-flex; gap: 8px; align-items: center; background: var(--cm-ink); color: var(--cm-yellow); padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px; }
.cm-hero h1 { font-size: clamp(34px, 5.4vw, 64px); line-height: 1.02; letter-spacing: -.02em; }
.cm-hero h1 mark { background: linear-gradient(transparent 58%, var(--cm-yellow) 58%, var(--cm-yellow) 92%, transparent 92%); color: inherit; padding: 0 .08em; }
.cm-hero h1 em { font-style: normal; color: var(--cm-purple); }
.cm-hero p.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--cm-ink-2); max-width: 560px; }
.cm-hero__search { max-width: 560px; margin: 20px 0; }
.cm-hero__search.cm-search form { background: #fff; box-shadow: var(--cm-shadow); padding: 6px 6px 6px 20px; }
.cm-hero__search.cm-search input[type=search] { min-height: 48px; font-size: 16px; }
.cm-hero__search.cm-search button { min-height: 48px; padding: 0 24px; }
.cm-hero__ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.cm-hero__art { display: flex; justify-content: center; }
.cm-hero__art img { width: min(460px, 100%); filter: drop-shadow(0 24px 40px rgba(76, 29, 149, .25)); animation: cm-float 6s ease-in-out infinite; }
@keyframes cm-float { 50% { transform: translateY(-10px) rotate(-1deg); } }
@media (prefers-reduced-motion: reduce) { .cm-hero__art img { animation: none; } }
.cm-hero__quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--cm-muted); align-items: center; }
.cm-hero__quick a { padding: 4px 10px; border-radius: 999px; background: var(--cm-bg); border: 1px solid var(--cm-line); color: var(--cm-ink-2); font-weight: 600; }
.cm-hero__quick a:hover { border-color: var(--cm-purple); color: var(--cm-purple); }
@media (max-width: 860px) {
	.cm-hero .cm-wrap { grid-template-columns: 1fr; }
	.cm-hero__art { order: -1; }
	.cm-hero__art img { width: 220px; }
}

.cm-section { padding: clamp(32px, 5vw, 56px) 0 0; }
.cm-section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.cm-section__head h2 { margin: 0; }
.cm-section__head a { font-weight: 700; }

.cm-games-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.cm-game { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 150px; padding: 18px; border-radius: var(--cm-radius); background: #fff; border: 1px solid var(--cm-line); color: var(--cm-ink); overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s; }
.cm-game::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 120px; height: 120px; border-radius: 50%; background: var(--g1); opacity: .9; transition: transform .25s; }
.cm-game::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--g1), var(--g2)); }
.cm-game:hover { transform: translateY(-3px); box-shadow: var(--cm-shadow-lg); border-color: transparent; color: var(--cm-ink); }
.cm-game:hover::after { transform: scale(1.25); }
.cm-game__name { position: relative; z-index: 1; font: 800 20px/1.1 var(--cm-display); }
.cm-game__count { position: relative; z-index: 1; font-size: 13px; color: var(--cm-muted); font-weight: 600; }
.cm-game__links { position: relative; z-index: 1; display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; font-weight: 700; }
.cm-game__links span { background: var(--cm-bg); padding: 3px 8px; border-radius: 999px; }
.cm-game--pokemon { --g1: #ffcb05; --g2: #3b4cca; }
.cm-game--one-piece { --g1: #e2231a; --g2: #14213d; }
.cm-game--dragon-ball { --g1: #ff8c00; --g2: #f5d000; }
.cm-game--gundam { --g1: #00a0e9; --g2: #e60012; }
.cm-game--lorcana { --g1: #b48cff; --g2: #d4af37; }
@media (max-width: 1000px) { .cm-games-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .cm-games-grid { grid-template-columns: repeat(2, 1fr); } .cm-game { min-height: 120px; } }

.cm-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cm-type { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 22px; border-radius: var(--cm-radius); color: var(--cm-ink); background: #fff; border: 1px solid var(--cm-line); transition: .15s; }
.cm-type strong { display: block; font: 800 22px/1.1 var(--cm-display); }
.cm-type small { color: var(--cm-muted); font-size: 14px; }
.cm-type__icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; }
.cm-type:hover { box-shadow: var(--cm-shadow-lg); transform: translateY(-2px); color: var(--cm-ink); }
.cm-type--single .cm-type__icon { background: var(--cm-purple-soft); }
.cm-type--graded .cm-type__icon { background: #fff7cc; }
.cm-type--sealed .cm-type__icon { background: var(--cm-lime-soft); }
@media (max-width: 760px) { .cm-types { grid-template-columns: 1fr; } }

.cm-cta { margin-top: clamp(32px, 5vw, 56px); border-radius: 22px; overflow: hidden; position: relative; background: var(--cm-ink); color: #fff; }
.cm-cta::before { content: ""; position: absolute; inset: 0; background:
	radial-gradient(400px 200px at 10% 0%, rgba(163, 230, 53, .35), transparent 70%),
	radial-gradient(500px 260px at 90% 100%, rgba(109, 40, 217, .7), transparent 70%),
	radial-gradient(300px 200px at 60% 20%, rgba(14, 165, 233, .35), transparent 70%); }
.cm-cta__inner { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; padding: clamp(24px, 5vw, 56px); }
.cm-cta h2 { color: #fff; font-size: clamp(26px, 3.4vw, 42px); }
.cm-cta h2 span { color: var(--cm-yellow); }
.cm-cta p { color: #ddd6fe; font-size: 17px; }
.cm-cta__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.cm-cta__steps li { counter-increment: s; display: flex; gap: 12px; align-items: center; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; padding: 12px 14px; font-weight: 600; }
.cm-cta__steps li::before { content: counter(s); flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--cm-lime); color: var(--cm-ink); display: grid; place-items: center; font-weight: 800; }
@media (max-width: 800px) { .cm-cta__inner { grid-template-columns: 1fr; } }

.cm-trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: clamp(32px, 5vw, 56px); }
.cm-trust div { background: #fff; border: 1px solid var(--cm-line); border-radius: var(--cm-radius); padding: 18px; }
.cm-trust strong { display: block; font-family: var(--cm-display); font-size: 17px; margin-bottom: 2px; }
.cm-trust span { color: var(--cm-muted); font-size: 14px; }
.cm-trust i { font-style: normal; font-size: 22px; display: block; margin-bottom: 6px; }
@media (max-width: 860px) { .cm-trust { grid-template-columns: 1fr 1fr; } }

/* ================= Product grid ================= */
.woocommerce ul.products, ul.products { list-style: none; margin: 0; padding: 0; display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
ul.products::before, ul.products::after { display: none !important; }
.cm-shop ul.products { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; padding: 0 !important; }
@media (max-width: 1100px) { ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { ul.products, .cm-shop ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.cm-tile { position: relative; display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--cm-line); border-radius: var(--cm-radius); overflow: hidden; transition: box-shadow .15s, transform .15s, border-color .15s; }
.cm-tile:hover { box-shadow: var(--cm-shadow-lg); transform: translateY(-2px); border-color: #d8ccf5; }
.cm-tile__media { position: relative; display: block; aspect-ratio: 5 / 6; background: radial-gradient(120% 90% at 50% 10%, #fff, #f0edf6); padding: 14px; }
.cm-tile__media img { width: 100% !important; height: 100% !important; object-fit: contain; margin: 0 !important; transition: transform .2s; filter: drop-shadow(0 6px 10px rgba(22, 18, 31, .15)); }
.cm-tile:hover .cm-tile__media img { transform: scale(1.04); }
.cm-badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 6px; pointer-events: none; z-index: 2; }
.cm-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; background: var(--cm-ink); color: #fff; white-space: nowrap; }
.cm-badge--grade { background: var(--cm-yellow); color: var(--cm-ink); font-size: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.cm-badge--sealed { background: var(--cm-lime); color: var(--cm-ink); }
.cm-badge--sale { background: var(--cm-red); }
.cm-badge--game { background: rgba(255, 255, 255, .92); color: var(--cm-ink-2); border: 1px solid var(--cm-line); }
.cm-tile__body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; flex: 1; }
.cm-tile__title { font: 700 15px/1.3 var(--cm-font); margin: 0; color: var(--cm-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cm-tile__title a { color: inherit; }
.cm-tile__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.cm-tile__meta { font-size: 12.5px; color: var(--cm-muted); line-height: 1.35; }
.cm-tile__foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cm-tile .price { font: 800 18px/1 var(--cm-display); color: var(--cm-ink) !important; margin: 0 !important; }
.cm-tile .price del { font-size: 13px; color: var(--cm-muted); font-weight: 600; margin-right: 4px; }
.cm-tile .price ins { text-decoration: none; color: var(--cm-red); }
.cm-tile .button, .cm-tile .added_to_cart { position: relative; z-index: 3; min-height: 36px !important; padding: 6px 12px !important; font-size: 13px !important; }
.cm-tile .added_to_cart { font-weight: 700; font-size: 12px !important; padding: 0 !important; }
.cm-tile .button.loading { opacity: .6; }
.cm-tile__stock { font-size: 12px; font-weight: 700; color: var(--cm-red); }
@media (max-width: 700px) {
	.cm-tile__body { padding: 10px; }
	.cm-tile .price { font-size: 16px; }
	.cm-tile .button { font-size: 0 !important; width: 36px; padding: 0 !important; }
	.cm-tile .button::before { content: "+"; font-size: 20px; }
}

/* ================= Shop layout with filters ================= */
.cm-shop { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 28px; align-items: start; }
.cm-shop__head { margin-bottom: 16px; }
.cm-shop__head h1 { margin-bottom: 4px; }
.cm-shop__head .term-description, .cm-shop__head .page-description { color: var(--cm-muted); }
.woocommerce-breadcrumb { font-size: 13px; color: var(--cm-muted); margin-bottom: 10px; }
.woocommerce-breadcrumb a { color: var(--cm-muted); }

.cm-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 12px; background: #fff; border: 1px solid var(--cm-line); border-radius: var(--cm-radius); }
.cm-toolbar .woocommerce-result-count { margin: 0; font-size: 14px; color: var(--cm-muted); font-weight: 600; }
.cm-toolbar .woocommerce-ordering { margin: 0; }
.cm-toolbar select { min-height: 38px; padding: 6px 34px 6px 12px; width: auto; border-radius: 999px; font-weight: 600; }
.cm-filter-toggle { display: none; }

.cm-active { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cm-active a { display: inline-flex; align-items: center; gap: 6px; background: var(--cm-purple-soft); color: var(--cm-purple-dark); padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.cm-active a::after { content: "✕"; font-size: 11px; opacity: .7; }
.cm-active a.cm-active__clear { background: transparent; color: var(--cm-muted); text-decoration: underline; }
.cm-active a.cm-active__clear::after { content: none; }

.cm-filters { position: sticky; top: 150px; max-height: calc(100vh - 170px); overflow: auto; background: #fff; border: 1px solid var(--cm-line); border-radius: var(--cm-radius); padding: 6px 16px 16px; scrollbar-width: thin; }
.admin-bar .cm-filters { top: 182px; }
.cm-filters__head { display: none; }
.cm-fgroup { border-bottom: 1px solid var(--cm-line); padding: 12px 0; }
.cm-fgroup:last-child { border-bottom: 0; }
.cm-fgroup > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font: 800 14px/1.2 var(--cm-display); text-transform: uppercase; letter-spacing: .05em; color: var(--cm-ink); padding: 4px 0; }
.cm-fgroup > summary::-webkit-details-marker { display: none; }
.cm-fgroup > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--cm-muted); border-bottom: 2px solid var(--cm-muted); transform: rotate(45deg); transition: transform .15s; }
.cm-fgroup[open] > summary::after { transform: rotate(-135deg); }
.cm-fgroup ul { list-style: none; margin: 8px 0 0; padding: 0; max-height: 260px; overflow: auto; }
.cm-fgroup li a { display: flex; align-items: center; gap: 10px; padding: 5px 4px; border-radius: 6px; color: var(--cm-ink-2); font-size: 14px; }
.cm-fgroup li a:hover { background: var(--cm-bg); color: var(--cm-ink); }
.cm-fgroup li a .cm-box { flex: 0 0 18px; height: 18px; border: 2px solid #cfc8dc; border-radius: 5px; display: grid; place-items: center; transition: .12s; }
.cm-fgroup li.is-chosen a { color: var(--cm-ink); font-weight: 700; }
.cm-fgroup li.is-chosen a .cm-box { background: var(--cm-purple); border-color: var(--cm-purple); }
.cm-fgroup li.is-chosen a .cm-box::after { content: ""; width: 5px; height: 9px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg) translate(-1px, -1px); }
.cm-fgroup li a .cm-count { margin-left: auto; font-size: 12px; color: var(--cm-muted); background: var(--cm-bg); padding: 1px 7px; border-radius: 999px; }
.cm-fgroup .cm-fsearch { min-height: 36px; padding: 6px 10px; font-size: 13px; margin-top: 8px; }
.cm-fgroup--chips ul { display: flex; flex-wrap: wrap; gap: 6px; max-height: none; }
.cm-fgroup--chips li a { border: 1.5px solid var(--cm-line); border-radius: 999px; padding: 5px 12px; font-weight: 700; }
.cm-fgroup--chips li a .cm-box { display: none; }
.cm-fgroup--chips li.is-chosen a { background: var(--cm-purple); border-color: var(--cm-purple); color: #fff; }
.cm-fgroup--chips li a .cm-count { display: none; }
.cm-price { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; margin-top: 10px; }
.cm-price input { min-height: 38px; padding: 6px 10px; font-size: 14px; }
.cm-price button { min-height: 38px; padding: 0 12px; border-radius: 9px; border: 0; background: var(--cm-ink); color: #fff; font-weight: 700; cursor: pointer; }
.cm-fgroup .cm-games-list li a { font-weight: 600; }

@media (max-width: 960px) {
	.cm-shop { grid-template-columns: 1fr; }
	.cm-filter-toggle { display: inline-flex; min-height: 38px; padding: 6px 16px; }
	.cm-filters { position: fixed; inset: 0 auto 0 0; top: 0 !important; width: min(360px, 88vw); max-height: none; height: 100%; z-index: 200; border-radius: 0 18px 18px 0; transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--cm-shadow-lg); padding-top: 0; }
	.cm-filters.is-open { transform: none; }
	.cm-filters__head { display: flex; position: sticky; top: 0; background: #fff; z-index: 2; justify-content: space-between; align-items: center; padding: 16px 0 10px; border-bottom: 1px solid var(--cm-line); }
	.cm-filters__head strong { font: 800 20px var(--cm-display); }
	.cm-filters__close { background: var(--cm-bg); border: 0; width: 40px; height: 40px; border-radius: 50%; font-size: 18px; cursor: pointer; }
	.cm-scrim { position: fixed; inset: 0; background: rgba(22, 18, 31, .45); z-index: 150; opacity: 0; visibility: hidden; transition: .2s; }
	.cm-scrim.is-open { opacity: 1; visibility: visible; }
}

.woocommerce-pagination { margin-top: 28px; }
.woocommerce-pagination ul { display: flex; gap: 6px; justify-content: center; list-style: none; padding: 0; margin: 0; border: 0 !important; }
.woocommerce-pagination ul li { border: 0 !important; }
.woocommerce-pagination a, .woocommerce-pagination span { display: grid !important; place-items: center; min-width: 40px; height: 40px; padding: 0 10px !important; border-radius: 10px; background: #fff; border: 1px solid var(--cm-line); font-weight: 700; color: var(--cm-ink); }
.woocommerce-pagination span.current { background: var(--cm-purple) !important; color: #fff !important; border-color: var(--cm-purple); }

.cm-empty { text-align: center; padding: 48px 20px; background: #fff; border: 1px dashed var(--cm-line); border-radius: var(--cm-radius); }
.cm-empty strong { display: block; font: 800 22px var(--cm-display); margin-bottom: 6px; }

/* ================= Single product ================= */
.single-product div.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); background: #fff; border: 1px solid var(--cm-line); border-radius: 20px; padding: clamp(16px, 3vw, 36px); position: relative; }
.single-product div.product .woocommerce-product-gallery { width: 100% !important; float: none !important; margin: 0 !important; background: radial-gradient(120% 90% at 50% 10%, #fff, #f0edf6); border-radius: 16px; padding: 20px; }
.single-product div.product .woocommerce-product-gallery img { border-radius: 8px; }
.single-product div.product .woocommerce-product-gallery__image img { max-height: 620px; object-fit: contain; }
.single-product div.product .summary { width: 100% !important; float: none !important; margin: 0 !important; }
.single-product div.product .product_title { font-size: clamp(24px, 3vw, 34px); }
.single-product div.product p.price { font: 800 32px/1 var(--cm-display); color: var(--cm-ink); margin: 10px 0 16px; }
.single-product div.product p.price ins { text-decoration: none; color: var(--cm-red); }
.single-product div.product .woocommerce-tabs, .single-product div.product .related, .single-product div.product .upsells { grid-column: 1 / -1; }
.single-product .onsale { display: none; }
.cm-pbadges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cm-pbadges .cm-badge { font-size: 12px; padding: 4px 10px; }
.cm-specs { width: 100%; border-collapse: separate; border-spacing: 0; margin: 16px 0 20px; border: 1px solid var(--cm-line); border-radius: 12px; overflow: hidden; font-size: 14.5px; }
.cm-specs th, .cm-specs td { padding: 10px 14px; border-bottom: 1px solid var(--cm-line); text-align: left; vertical-align: top; }
.cm-specs tr:last-child th, .cm-specs tr:last-child td { border-bottom: 0; }
.cm-specs th { width: 42%; background: var(--cm-bg); color: var(--cm-muted); font-weight: 600; }
.cm-specs td { font-weight: 700; }
.cm-specs td a { font-weight: 600; font-size: 13px; margin-left: 6px; }
.single-product form.cart { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; margin: 0 0 16px !important; }
.single-product form.cart .quantity input { width: 80px; min-height: 52px; text-align: center; font-weight: 700; }
.single-product .single_add_to_cart_button { min-height: 52px !important; padding: 0 32px !important; font-size: 16px !important; flex: 1; }
.single-product .stock { font-weight: 700; }
.single-product .stock.in-stock { color: var(--cm-green); }
.single-product .stock.out-of-stock { color: var(--cm-red); }
.cm-perks { list-style: none; margin: 0 0 16px; padding: 14px 16px; border-radius: 12px; background: var(--cm-bg); display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--cm-ink-2); }
.cm-perks li::before { content: "✦"; color: var(--cm-purple); margin-right: 8px; }
.product_meta { font-size: 13px; color: var(--cm-muted); }
.product_meta > span { display: block; }
.woocommerce-tabs ul.tabs { display: flex; gap: 6px; list-style: none; padding: 0 !important; margin: 0 0 12px !important; border-bottom: 1px solid var(--cm-line); }
.woocommerce-tabs ul.tabs::before, .woocommerce-tabs ul.tabs li::before, .woocommerce-tabs ul.tabs li::after { display: none !important; }
.woocommerce-tabs ul.tabs li { background: none !important; border: 0 !important; margin: 0 !important; padding: 0 !important; }
.woocommerce-tabs ul.tabs li a { display: block; padding: 10px 16px !important; font-weight: 700; color: var(--cm-muted) !important; border-bottom: 3px solid transparent; }
.woocommerce-tabs ul.tabs li.active a { color: var(--cm-ink) !important; border-color: var(--cm-purple); }
.related > h2, .upsells > h2 { margin-top: 12px; }
@media (max-width: 820px) { .single-product div.product { grid-template-columns: 1fr; } }

/* ================= WooCommerce misc ================= */
.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner { border-radius: var(--cm-radius-sm) !important; border: 0 !important; background: var(--cm-purple-soft) !important; color: var(--cm-ink) !important; padding: 14px 18px !important; list-style: none; margin: 0 0 16px !important; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.woocommerce-message::before, .woocommerce-info::before, .woocommerce-error::before { display: none; }
.woocommerce-error { background: #ffe4e6 !important; }
.wc-block-cart, .wc-block-checkout, .woocommerce-account .woocommerce, .woocommerce-cart .woocommerce, .woocommerce-checkout .woocommerce { background: #fff; border: 1px solid var(--cm-line); border-radius: var(--cm-radius); padding: clamp(16px, 3vw, 32px); }
.wc-block-components-button:not(.is-link) { border-radius: 999px !important; background: var(--cm-purple) !important; color: #fff !important; font-weight: 700 !important; min-height: 50px; }
.wc-block-components-button:not(.is-link):hover { background: var(--cm-purple-dark) !important; }

/* ================= Footer ================= */
.cm-footer { background: var(--cm-ink); color: #cfc8dc; margin-top: 56px; position: relative; }
.cm-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--cm-purple), var(--cm-blue), var(--cm-lime), var(--cm-yellow)); }
.cm-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 32px; padding: 48px 0 32px; }
.cm-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.cm-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cm-footer a { color: #cfc8dc; }
.cm-footer a:hover { color: var(--cm-yellow); }
.cm-footer__brand img { width: 150px; margin-bottom: 10px; }
.cm-footer__brand p { font-size: 14px; }
.cm-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 18px 0; font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 860px) { .cm-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .cm-footer__grid { grid-template-columns: 1fr; } }


/* ===== Layout fixes ===== */
.cm-hero__search { justify-self: start; }
.cm-scrim { display: none; }
@media (max-width: 960px) { .cm-scrim { display: block; } }
/* ===== Mobile header fixes ===== */
.cm-actions { grid-column: 3; justify-self: end; }
@media (max-width: 700px) {
	.cm-topbar .cm-wrap { min-height: 32px; font-size: 12px; }
	.cm-topbar span:not(:first-child) { display: none; }
}
/* ===== Footer legal links ===== */
.cm-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.cm-legal a { color: #fff; font-weight: 600; }
.cm-legal a:hover { color: var(--cm-yellow); }
.cm-footer__bottom { align-items: center; }
.cm-footer__bottom > span:last-child { flex-basis: 100%; font-size: 12px; opacity: .75; }
.cm-footer a.cm-btn--neon, .cm-footer a.cm-btn--neon:hover { color: var(--cm-ink); }