/*
Theme Name: CardTracker
Description: Fast, lightweight storefront theme for the CardTracker Shop plugin. No page builder, no jQuery, system fonts.
Version: 1.0.0
Requires PHP: 8.1
Author: CardTracker
Text Domain: cardtracker
*/

:root {
	--bg: #f6f6f3;
	--surface: #fff;
	--sunken: #eef0f2;
	--line: #e2e4e8;
	--line-strong: #c9ced6;
	--ink: #15191f;
	--muted: #5a6371;
	--accent: #b3122e;
	--accent-ink: #8f0e24;
	--accent-soft: #fdecef;
	--focus: #1f4fd1;
	--ok: #1e7a46;
	--rc-ink: #8a5a00; --rc-bg: #fff3d1;
	--auto-ink: #1f4fd1; --auto-bg: #e3ebff;
	--relic-ink: #6d2fa3; --relic-bg: #f1e6fb;
	--grade-ink: #2f3a4a; --grade-bg: #e6e9ee;
	--radius: 10px;
	--shadow: 0 1px 2px rgb(21 25 31 / 6%), 0 4px 16px rgb(21 25 31 / 6%);
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--wrap: 1280px;
	--gutter: 16px;
	color-scheme: light;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); font-weight: 750; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 1em; }
small { font-size: .8125em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; clip: auto; width: auto; height: auto; margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.center { text-align: center; }
.fine { color: var(--muted); font-size: .8125rem; }
.icon { flex: none; }
main { padding-bottom: 48px; min-height: 60vh; }

/* ---- Buttons & forms ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border: 1px solid var(--ink); border-radius: 8px; background: var(--ink); color: #fff; font-weight: 600; font-size: .9375rem; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: #2b323c; color: #fff; }
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink); color: var(--ink); }
.btn-small { min-height: 34px; padding: 0 12px; font-size: .875rem; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn.is-added { background: var(--ok); border-color: var(--ok); }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font-size: .8125rem; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--accent); }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 8px; background: none; color: inherit; cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--sunken); color: var(--ink); }
.field { display: grid; gap: 6px; margin-bottom: 14px; font-size: .875rem; font-weight: 600; }
.field small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=search], select, textarea { width: 100%; min-height: 44px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; font-weight: 400; font-size: 1rem; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: -1px; border-color: var(--focus); }
select { appearance: none; padding-right: 36px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%235a6371' stroke-width='1.8'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center; }
.check { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: .9375rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: none; }
.check span { flex: 1; min-width: 0; }
.check small { color: var(--muted); font-variant-numeric: tabular-nums; }
.hp { position: absolute; left: -9999px; }
.form { display: grid; }
.form-narrow { max-width: 420px; }
.form .btn-small { justify-self: start; }
.notice { padding: 12px 16px; border-radius: 8px; background: #eef4ff; border: 1px solid #c9d8fb; margin: 0 0 16px; }
.notice p { margin: 0; }
.notice-error { background: var(--accent-soft); border-color: #f3c3cc; color: var(--accent-ink); }
.vacation-notice { background: #fff6e0; border-color: #f0d38a; color: #5c4400; font-weight: 600; }

/* ---- Header ---- */
.topbar { background: var(--ink); color: #d7dbe1; font-size: .8125rem; text-align: center; padding: 6px var(--gutter); }
.topbar span + span::before { content: "·"; margin: 0 10px; color: #7a8391; }
.topbar-nl a { color: #fff; font-weight: 600; text-decoration: none; }
.topbar-nl a:hover { color: #fff; text-decoration: underline; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; text-decoration: none; color: var(--ink); flex: none; }
.logo:hover { color: var(--ink); }
.logo svg { color: var(--accent); }
.search { flex: 1; display: flex; max-width: 620px; margin: 0 auto; position: relative; }
.search input { padding-left: 42px; background: var(--bg); border-color: var(--line); border-radius: 999px; }
.search input:focus { background: var(--surface); }
.search button { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.header-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.cart-link { position: relative; }
.cart-count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.catnav { border-top: 1px solid var(--line); }
.catnav .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.catnav .wrap::-webkit-scrollbar { display: none; }
.catnav a { flex: none; padding: 10px 12px; font-size: .9375rem; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.catnav a:hover { color: var(--ink); }
.catnav a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }
.catnav small { font-weight: 500; color: #8a929e; margin-left: 2px; }
@media (max-width: 699px) {
	.header-row { flex-wrap: wrap; gap: 8px 12px; padding-top: 8px; padding-bottom: 8px; }
	.search { order: 3; flex-basis: 100%; }
	.header-actions { margin-left: auto; }
	.topbar span:nth-child(n+2):not(.topbar-nl) { display: none; } /* phones: "Ships from Canada · Join our newsletter" */
}

/* ---- Breadcrumbs ---- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; padding: 16px 0 8px; font-size: .8125rem; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a::after { content: "/"; margin-left: 6px; color: var(--line-strong); }
.crumbs span { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

/* ---- Badges ---- */
.badges { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.badge, .cond { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: .6875rem; font-weight: 750; letter-spacing: .03em; line-height: 1.6; white-space: nowrap; }
.badge-rc { color: var(--rc-ink); background: var(--rc-bg); }
.badge-auto { color: var(--auto-ink); background: var(--auto-bg); }
.badge-relic { color: var(--relic-ink); background: var(--relic-bg); }
.badge-serial { color: var(--grade-ink); background: var(--grade-bg); }
.cond { color: var(--grade-ink); background: var(--surface); border: 1px solid var(--line-strong); font-weight: 650; line-height: 1.45; }
.product-info .badges { margin: 4px 0 8px; }
.product-info .badge { font-size: .75rem; padding: 2px 8px; }

/* ---- Card grid & tiles ---- */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid-row { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .grid:not(.grid-shop) { grid-template-columns: repeat(6, minmax(0, 1fr)); } .grid-shop { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.tile:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.tile-link { display: flex; flex-direction: column; flex: 1; padding: 10px 10px 4px; text-decoration: none; color: inherit; min-width: 0; }
.tile-link:hover { color: inherit; }
.tile-img { position: relative; display: block; aspect-ratio: 5 / 7; background: var(--sunken); border-radius: 6px; margin-bottom: 10px; overflow: hidden; }
.tile-img img, .tile-img .noimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.tile-img .back { opacity: 0; transition: opacity .2s; }
.tile-link:hover .tile-img .back { opacity: 1; }
.tile-kicker { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-title { font-weight: 650; font-size: .9375rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-link:hover .tile-title { color: var(--accent); }
.tile-meta { font-size: .8125rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.2em; }
.tile-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px 10px; margin-top: auto; }
.tile-foot form { margin: 0; }
.price { font-weight: 750; font-variant-numeric: tabular-nums; font-size: 1.0625rem; }
.price-sold { color: var(--muted); }
.btn-add { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: .8125rem; font-weight: 650; cursor: pointer; transition: all .15s; }
.btn-add:hover { border-color: var(--accent); color: var(--accent); }
.btn-add.is-added { background: var(--ok); border-color: var(--ok); color: #fff; }
.tile.is-sold .tile-img img { opacity: .5; }
.noimg { background: repeating-linear-gradient(135deg, var(--sunken) 0 10px, #e5e8eb 10px 20px); }
@media (max-width: 420px) { .btn-add span { display: none; } .btn-add { width: 36px; justify-content: center; padding: 0; } }

/* ---- Home ---- */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-grid { display: grid; gap: 24px; padding-top: 40px; padding-bottom: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr .9fr; padding-top: 56px; padding-bottom: 56px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 12px; }
.hero h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); letter-spacing: -.03em; line-height: 1.05; margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 34em; }
.hero-search { display: flex; gap: 8px; max-width: 520px; margin: 24px 0 16px; }
.hero-search input { min-height: 52px; border-radius: 10px; }
.hero-search .btn { min-height: 52px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--muted); font-size: .9375rem; margin: 0; }
.hero-stats strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.fan { position: relative; height: 300px; max-width: 440px; width: 100%; margin: 0 auto; }
.fan a { position: absolute; top: 50%; left: 50%; width: 46%; aspect-ratio: 5 / 7; transform-origin: 50% 100%; transition: transform .25s ease; }
.fan img { width: 100%; height: auto; border-radius: 3px; box-shadow: 0 10px 24px rgb(21 25 31 / 24%); }
.fan a:nth-child(1) { transform: translate(-50%, -50%) translate(-58%, 6%) rotate(-12deg); }
.fan a:nth-child(2) { transform: translate(-50%, -50%) translate(58%, 6%) rotate(12deg); }
.fan a:nth-child(3) { transform: translate(-50%, -50%) translateY(-3%); z-index: 1; }
.fan a:hover { z-index: 2; }
@media (min-width: 900px) { .fan { height: 420px; } }
.section { padding-top: 40px; }
.shelf { padding-top: 40px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.shelf-head h2 { margin: 0; font-size: 1.375rem; }
.shelf-head a { font-weight: 600; font-size: .9375rem; color: var(--accent); text-decoration: none; white-space: nowrap; }
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.cat { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 124px; padding: 20px 20px 20px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.cat:hover { box-shadow: var(--shadow); border-color: var(--line-strong); color: inherit; }
.cat strong { display: block; font-size: 1.25rem; letter-spacing: -.01em; }
.cat span { color: var(--muted); font-size: .9375rem; }
.cat-img { width: 64px; flex: none; aspect-ratio: 5 / 7; transform: rotate(6deg); transition: transform .2s; }
.cat-img img { width: 100%; height: auto; border-radius: 2px; box-shadow: 0 3px 8px rgb(21 25 31 / 22%); }
.cat:hover .cat-img { transform: rotate(0) scale(1.05); }
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; }
.feature .icon { color: var(--accent); margin-bottom: 8px; }
.feature h3 { margin-bottom: 4px; }
.feature p { margin: 0; color: var(--muted); font-size: .9375rem; }
.split { display: grid; gap: 16px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }

/* ---- Catalog ---- */
.shop-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.shop-head h1 { margin: 0; }
.shop-head .count { color: var(--muted); font-weight: 500; font-size: .6em; vertical-align: middle; font-variant-numeric: tabular-nums; }
.shop-tools { display: flex; gap: 8px; }
.sort select { min-height: 42px; width: auto; font-size: .9375rem; }
.shop-body { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .shop-body { grid-template-columns: 240px minmax(0, 1fr); } .filters-open { display: none; } }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 16px 16px; }
@media (min-width: 900px) { .filters { position: sticky; top: 124px; max-height: calc(100vh - 140px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; } }
.filters-head, .filters-foot { display: none; }
.facet { border: 0; border-bottom: 1px solid var(--line); margin: 0; padding: 12px 0; min-width: 0; }
.facet:last-of-type { border-bottom: 0; }
.facet-label, .facet summary { font-size: .8125rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0; margin: 0 0 6px; }
.facet summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; margin: 0; }
.facet summary::-webkit-details-marker { display: none; }
.facet summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.facet[open] summary::after { transform: rotate(-135deg); }
.facet[open] summary { margin-bottom: 6px; }
.facet-n { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; letter-spacing: 0; }
.facet-list.is-long { max-height: 260px; overflow: auto; scrollbar-width: thin; padding-right: 4px; }
.facet-cats ul { list-style: none; margin: 0; padding: 0; }
.facet-cats a { display: flex; justify-content: space-between; padding: 5px 0; text-decoration: none; font-size: .9375rem; }
.facet-cats a small { color: var(--muted); }
.facet-cats a[aria-current] { font-weight: 700; color: var(--accent); }
.price-range { display: flex; align-items: center; gap: 6px; }
.price-range input { min-height: 38px; padding: 6px 8px; font-size: .9375rem; }
.price-range .btn { min-height: 38px; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .8125rem; font-weight: 600; text-decoration: none; }
.chip:hover { background: var(--accent); color: #fff; }
.chip-clear { font-size: .8125rem; color: var(--muted); }
.more { text-align: center; padding: 32px 0 8px; }
.more-note { color: var(--muted); font-size: .875rem; margin-bottom: 12px; }
.load-more { min-width: 220px; }
.load-more[aria-busy=true] { opacity: .6; pointer-events: none; }
.pager { display: flex; justify-content: center; gap: 20px; padding: 16px 0; font-size: .875rem; color: var(--muted); }
.js .pager { display: none; }
.empty { text-align: center; padding: 56px 16px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty p { color: var(--muted); }
/* Mobile filter drawer (only when JavaScript can open it) */
@media (max-width: 899px) {
	.js .filters { position: fixed; inset: 0 0 0 auto; width: min(420px, 100%); z-index: 60; border-radius: 0; border: 0; padding: 0 16px; overflow: auto; transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility 0s .25s; }
	.js .filters.is-open { transform: none; visibility: visible; transition: transform .25s ease; box-shadow: -8px 0 32px rgb(21 25 31 / 20%); }
	.js .filters-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--surface); padding: 12px 0; border-bottom: 1px solid var(--line); z-index: 1; }
	.js .filters-foot { display: block; position: sticky; bottom: 0; background: var(--surface); padding: 12px 0 16px; border-top: 1px solid var(--line); }
	.js .filters-foot .btn { width: 100%; }
	.no-js .filters-open { display: none; }
	.scrim { position: fixed; inset: 0; background: rgb(21 25 31 / 45%); z-index: 55; }
}

/* ---- Card page ---- */
.product { display: grid; gap: 24px; margin-top: 8px; }
@media (min-width: 900px) { .product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } .gallery { position: sticky; top: 124px; align-self: start; } }
.gallery-main { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 5 / 6; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; cursor: zoom-in; }
.gallery-main img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 8px 22px rgb(21 25 31 / 18%); }
.zoom-hint { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: rgb(255 255 255 / 92%); border: 1px solid var(--line); font-size: .75rem; font-weight: 600; color: var(--muted); }
.thumbs { display: flex; gap: 10px; margin-top: 12px; justify-content: center; }
.thumb { display: grid; justify-items: center; gap: 4px; padding: 6px 6px 4px; border: 2px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; font-size: .75rem; font-weight: 600; color: var(--muted); }
.thumb img { width: 56px; height: 78px; object-fit: contain; }
.thumb[aria-pressed=true] { border-color: var(--ink); color: var(--ink); }
.exact { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 0; font-size: .875rem; color: var(--muted); }
.product-title { margin-bottom: 4px; font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem); }
.kicker { display: block; font-size: .9375rem; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-bottom: 4px; }
.product-meta { color: var(--muted); margin: 0 0 8px; }
.buy { padding: 20px 0; margin: 12px 0 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.buy form { margin: 0; }
.price-lg { font-size: 2rem; letter-spacing: -.02em; margin: 0 0 12px; }
.price-lg small { font-size: .875rem; font-weight: 600; color: var(--muted); }
.stock { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: .875rem; color: var(--ok); font-weight: 600; }
.stock-out { color: var(--muted); margin-bottom: 12px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.panel h2 { display: flex; align-items: center; gap: 8px; font-size: 1.0625rem; }
.panel h2 span { color: var(--accent); }
.condition p:not(.fine) { font-size: .9375rem; }
.details { display: grid; margin: 0; }
.details div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.details div:last-child { border-bottom: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 500; }
.ship-list { list-style: none; margin: 0 0 8px; padding: 0; }
.ship-list li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.ship-list li:last-child { border-bottom: 0; }
.ship-list strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ship-free strong { color: var(--ok); }
.zoom { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(15 18 22 / 96%); }
.zoom::backdrop { background: rgb(15 18 22 / 80%); }
.zoom-imgs { display: flex; gap: 24px; justify-content: center; align-items: center; min-height: 100%; padding: 56px 16px 24px; flex-wrap: wrap; }
.zoom-imgs img { max-height: calc(100vh - 80px); width: auto; max-width: min(720px, 100%); object-fit: contain; }
.zoom-close { position: fixed; top: 8px; right: 8px; color: #fff; z-index: 1; }
.zoom-close:hover { background: rgb(255 255 255 / 12%); color: #fff; }

/* ---- Cart & checkout ---- */
.cart-page h1 { margin-top: 24px; }
.cart-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .cart-layout { grid-template-columns: minmax(0, 1fr) 360px; } .summary { position: sticky; top: 124px; } }
.cart-items { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel .cart-items { border: 0; }
.cart-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-thumb { display: block; aspect-ratio: 5 / 7; background: var(--sunken); border-radius: 4px; overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; object-fit: contain; }
.cart-desc { display: grid; gap: 2px; font-size: .875rem; color: var(--muted); min-width: 0; }
.cart-desc a { text-decoration: none; color: var(--ink); font-size: 1rem; }
.cart-cond { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cart-price { display: grid; justify-items: end; gap: 4px; font-variant-numeric: tabular-nums; }
.cart-price form { margin: 0; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.totals { margin: 0 0 12px; }
.totals div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; }
.totals dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.totals .total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-size: 1.125rem; font-weight: 750; }
.ship-head { font-weight: 650; margin: 8px 0 4px; font-size: .9375rem; }
.ship-head small { font-weight: 400; color: var(--muted); }
.ship-choices li { font-size: .875rem; }
.free-hint { background: #eaf6ee; color: var(--ok); padding: 8px 12px; border-radius: 8px; font-size: .875rem; font-weight: 600; }
.summary .btn-block { margin: 8px 0 12px; }
.summary .fine { margin-bottom: 8px; }
/* Checkout (Stripe Embedded Checkout inside our layout) */
.checkout-page h1 { margin: 8px 0 20px; }
.steps { display: flex; gap: 8px; list-style: none; margin: 24px 0 0; padding: 0; font-size: .8125rem; font-weight: 600; color: var(--muted); counter-reset: step; }
.steps li { display: flex; align-items: center; gap: 8px; counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); font-size: .75rem; }
.steps li + li::after { order: -1; content: ""; width: 24px; height: 1.5px; background: var(--line-strong); }
.steps .is-done::before { content: "✓"; background: var(--ok); border-color: var(--ok); color: #fff; }
.steps [aria-current]::before { background: var(--ink); border-color: var(--ink); color: #fff; }
.steps [aria-current] { color: var(--ink); }
.steps a { text-decoration: none; }
.checkout-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 960px) { .checkout-layout { grid-template-columns: minmax(0, 1fr) 340px; } .checkout-summary { position: sticky; top: 124px; } }
.embed { position: relative; min-height: 560px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: clamp(8px, 2vw, 24px); }
.embed iframe { display: block; }
.embed-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: .9375rem; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.embed-error { margin-top: 16px; }
.mini-items { list-style: none; margin: 0 0 12px; padding: 0; max-height: 320px; overflow: auto; }
.mini-items li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .875rem; }
.mini-items .cart-thumb { width: 40px; }
.mini-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.mini-items strong { font-variant-numeric: tabular-nums; }
.totals .muted { color: var(--muted); font-weight: 400; font-size: .875rem; }
.hold { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: #eaf6ee; color: var(--ok); font-size: .875rem; }
.hold .icon { margin-top: 2px; }
.hold.is-low { background: var(--rc-bg); color: var(--rc-ink); }
.hold-left { font-variant-numeric: tabular-nums; }
.back-to-cart { display: inline-block; margin-top: 4px; }
.ship-form { padding: clamp(16px, 3vw, 28px); }
.ship-form h2 { font-size: 1.0625rem; margin: 8px 0 12px; }
.ship-form h2:not(:first-of-type) { margin-top: 20px; }
.grid-2, .grid-3 { display: grid; gap: 0 12px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1.3fr 1fr .8fr; } }
.field-error { color: var(--accent); font-weight: 600; }
[aria-invalid=true] { border-color: var(--accent); }
.ship-options { border: 0; margin: 8px 0 0; padding: 0; min-width: 0; }
.ship-options legend { padding: 0; }
.ship-options legend h2 { margin-top: 20px; }
.ship-option { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; margin-bottom: 8px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.ship-option:hover { border-color: var(--line-strong); }
.ship-option:has(input:checked) { border-color: var(--ink); background: var(--bg); }
.ship-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.ship-option-name { display: grid; font-weight: 600; font-size: .9375rem; }
.ship-option-name small { font-weight: 400; color: var(--muted); }
.ship-option strong { font-variant-numeric: tabular-nums; }
.ship-hint { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9375rem; padding: 14px; border: 1.5px dashed var(--line); border-radius: 10px; }
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.ship-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 16px; }
.js .js-hide { display: none; }
.cart-main { display: grid; gap: 16px; min-width: 0; }
.cart-main .ship-form { margin: 0; }
.ship-form > h2 { font-size: 1.25rem; margin: 0 0 14px; }
.ship-legend { font-weight: 700; font-size: .9375rem; padding: 0; margin-bottom: 8px; }
.ship-options .js-hide { margin-top: 4px; }
.ship-sub { font-size: 1rem; margin: 20px 0 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.summary .btn-block[aria-busy=true] { opacity: .7; }
.ship-to { font-size: .875rem; border-top: 1px solid var(--line); padding-top: 12px; margin-bottom: 12px; }
.ship-to h3 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.ship-to p { margin-bottom: 6px; }

.complete { text-align: center; padding: 40px 0 24px; }
.complete-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #eaf6ee; color: var(--ok); margin-bottom: 16px; }
.address { margin-top: 16px; font-size: .9375rem; }
.cta-account { text-align: center; }

/* ---- Account ---- */
.account h1 { margin-top: 24px; }
.auth { display: grid; gap: 16px; }
@media (min-width: 800px) { .auth { grid-template-columns: 1fr 1fr; } }
.auth .panel { padding: 24px; }
.account-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px 0 16px; }
.account-head h1 { margin: 0; }
.orders { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.orders th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 8px 8px 0; border-bottom: 1px solid var(--line); }
.orders td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--line); }
.orders .num { text-align: right; font-variant-numeric: tabular-nums; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 600; background: var(--sunken); }
.status-paid { background: var(--rc-bg); color: var(--rc-ink); }
.status-shipped { background: #eaf6ee; color: var(--ok); }
.pw { margin: 0 0 14px; }
.pw summary { cursor: pointer; font-weight: 600; font-size: .875rem; margin-bottom: 10px; }

/* ---- Support ---- */
.support-page h1 { margin-top: 24px; }
.support-layout { display: grid; gap: 16px; align-items: start; }
@media (min-width: 900px) { .support-layout { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.support-signin { max-width: 640px; }
.ticket-list { list-style: none; margin: 0 0 12px; padding: 0; }
.ticket-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ticket-list li a { flex: 1 1 200px; text-decoration: none; }
.ticket-thread { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 12px; max-width: 820px; }
.ticket-msg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.ticket-msg.is-staff { background: #f1f5ff; border-color: #d6e0fb; margin-left: clamp(0px, 6vw, 48px); }
.ticket-msg.is-customer { margin-right: clamp(0px, 6vw, 48px); }
.ticket-meta { font-size: .8125rem; color: var(--muted); margin: 0 0 6px; }
.ticket-body { font-size: .9375rem; overflow-wrap: anywhere; }
.ticket-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.ticket-photos img { width: 120px; height: 120px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.ticket-reply { max-width: 820px; }
.ticket-close { margin: -4px 0 24px; }
input[type=file] { font-size: .875rem; }

/* ---- Newsletter ---- */
.ct-newsletter { margin-top: 16px; }
.ct-nl-form { padding: 20px 24px; }

/* ---- Pages ---- */
.page-content { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); margin-top: 16px; }
.page-content > :first-child { margin-top: 0; }
.page-content h2 { margin-top: 1.5em; }
.page-content :where(ul, ol) { padding-left: 1.25em; }
.page-content li { margin-bottom: .35em; }

/* ---- Footer ---- */
.site-footer { background: var(--ink); color: #b8bfc9; font-size: .9375rem; padding: 40px 0 24px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.footer-grid h2 { color: #fff; font-size: .8125rem; text-transform: uppercase; letter-spacing: .08em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-brand .logo { color: #fff; margin-bottom: 8px; }
.footer-brand p { max-width: 28em; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px solid #2c333d; margin-top: 32px; padding-top: 16px; font-size: .8125rem; }

/* ---- Toast ---- */
.toast { position: fixed; left: 50%; bottom: 20px; z-index: 70; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px); padding: 12px 12px 12px 16px; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: 0 8px 32px rgb(0 0 0 / 25%); font-size: .9375rem; transform: translate(-50%, 150%); transition: transform .25s ease; }
.toast.is-on { transform: translate(-50%, 0); }
.toast a { color: #fff; font-weight: 700; white-space: nowrap; padding: 6px 10px; border-radius: 6px; background: rgb(255 255 255 / 14%); text-decoration: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
@media print { .site-header, .topbar, .site-footer, .btn, .tile-foot form { display: none !important; } }
