/* ==========================================================================
   XY Ptcg — Design System
   Single stylesheet, no dependencies. Mobile-first.
   --------------------------------------------------------------------------
   1.  Tokens
   2.  Reset & base
   3.  Layout helpers
   4.  Buttons & forms
   5.  Header / announcement / nav / cart drawer
   6.  Hero & home sections
   7.  Product cards & grids
   8.  Shop (filters/sort)
   9.  Product detail
   10. Cart, checkout & order summary
   11. Content pages (about, faq, legal, contact)
   12. Footer
   13. Toast, badges, skeletons
   14. Responsive
   15. Accounts & card binder
   16. Card market (scanner)
   ========================================================================== */

/* ============================ 1. TOKENS ================================== */
:root {
  --bg: #08090f;
  --bg-soft: #0c0e17;
  --surface: #12141f;
  --surface-2: #191c2a;
  --surface-3: #212536;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #eceef6;
  --text-muted: #9aa1b4;
  --text-dim: #6d7488;

  --accent: #7c5cff;
  --accent-soft: rgba(124, 92, 255, 0.14);
  --accent-2: #22d3ee;
  --gold: #ffb020;
  --success: #34d399;
  --danger: #f87171;
  --sale: #ff5c7a;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.75);
  --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, 0.85);

  --container: 1240px;
  --header-h: 72px;

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-display: "Sora", var(--font-body);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* The page scripts show and hide big chunks of markup by toggling the
   `hidden` attribute.  The UA rule for that is a plain `display: none`, so any
   class that sets a display value (`.seller-tabs`, `.sell-choices`, …) outranks
   it and the "hidden" pane stays on screen.  Everything the scripts toggle with
   `element.hidden` is meant to be gone, so keep this above the component rules. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

/* Ambient background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 50% at 12% -10%, rgba(124, 92, 255, 0.18), transparent 60%),
    radial-gradient(50% 45% at 92% 0%, rgba(34, 211, 238, 0.12), transparent 60%);
}

body > * {
  position: relative;
  z-index: 1;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
}

::selection {
  background: var(--accent);
  color: #fff;
}

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

/* ============================ 3. LAYOUT ================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.section {
  padding: 72px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-head h2 {
  font-size: clamp(26px, 3.6vw, 38px);
}

.section-head p {
  color: var(--text-muted);
  margin-top: 8px;
  max-width: 60ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.muted {
  color: var(--text-muted);
}

.dim {
  color: var(--text-dim);
}

.center {
  text-align: center;
}

.stack-sm > * + * {
  margin-top: 10px;
}

.grid {
  display: grid;
  gap: 22px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.products-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* ============================ 4. BUTTONS & FORMS ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s, border-color 0.18s,
    box-shadow 0.18s, opacity 0.18s;
  white-space: nowrap;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #5b3fe0 100%);
  color: #fff;
  box-shadow: 0 10px 26px -10px rgba(124, 92, 255, 0.85);
}

.btn-primary:hover {
  box-shadow: 0 16px 34px -10px rgba(124, 92, 255, 0.95);
}

.btn-gold {
  background: linear-gradient(135deg, #ffc247 0%, #f59e0b 100%);
  color: #201703;
  box-shadow: 0 10px 26px -10px rgba(245, 158, 11, 0.7);
}

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

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

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 10px 14px;
}

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

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 9px 16px;
  font-size: 14px;
}

.btn-lg {
  padding: 16px 30px;
  font-size: 16px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.18s var(--ease);
  position: relative;
}

.icon-btn:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field > span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color 0.18s, background 0.18s;
  font-size: 15px;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-dim);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}

.textarea {
  min-height: 130px;
  resize: vertical;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239aa1b4' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.field-row {
  display: grid;
  gap: 0 16px;
  grid-template-columns: 1fr 1fr;
}

/* ============================ 5. HEADER / NAV ============================ */
.announcement {
  background: linear-gradient(90deg, var(--accent) 0%, #4f46e5 50%, var(--accent-2) 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 9px 20px;
  letter-spacing: 0.01em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(8, 9, 15, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-size: 17px;
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(124, 92, 255, 0.9);
}

.logo span.accent {
  color: var(--accent-2);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 0;
}

.main-nav a {
  padding: 9px 9px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.18s, background 0.18s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
  background: var(--surface-2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 8px 8px 14px;
  min-width: 150px;
  transition: border-color 0.18s;
}

.search-form:focus-within {
  border-color: var(--accent);
}

.search-form input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  font-size: 14px;
}

.search-form button {
  border: none;
  background: var(--surface-3);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.currency-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  padding: 9px 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.lang-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  padding: 9px 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

/* Language + currency shown together inside the mobile menu. */
.mobile-prefs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--bg);
}

.cart-count[hidden] {
  display: none;
}

.nav-toggle {
  display: none;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 14px 0 22px;
  border-top: 1px solid var(--border);
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  padding: 13px 6px;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

/* Cart drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 8, 0.7);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 90;
}

.drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 100%);
  background: var(--bg-soft);
  border-left: 1px solid var(--border);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform 0.38s var(--ease);
  box-shadow: var(--shadow-lg);
}

.cart-drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.drawer-head h3 {
  font-size: 18px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
}

.drawer-foot {
  padding: 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.free-ship-meter {
  margin-bottom: 16px;
}

.free-ship-meter p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.meter {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  overflow: hidden;
}

.meter > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: inherit;
  transition: width 0.4s var(--ease);
}

/* ============================ 6. HERO & HOME ============================= */
.hero {
  padding: 78px 0 84px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(38px, 5.4vw, 64px);
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent-2), var(--accent) 60%, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: clamp(16px, 1.9vw, 19px);
  color: var(--text-muted);
  max-width: 54ch;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.hero-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}

.hero-stats span {
  font-size: 13px;
  color: var(--text-muted);
}

.hero-visual {
  position: relative;
}

.hero-card-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1 / 1;
}

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

.hero-float {
  position: absolute;
  background: rgba(18, 20, 31, 0.9);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}

.hero-float small {
  display: block;
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-float strong {
  font-size: 14px;
}

.hero-float.f-top {
  top: 24px;
  left: -34px;
}

.hero-float.f-bottom {
  bottom: 30px;
  right: -26px;
  animation-delay: -3s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Trust bar */
.trust-bar {
  border-block: 1px solid var(--border);
  background: var(--bg-soft);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 30px 0;
}

.trust-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.trust-item .ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.trust-item strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.trust-item span {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Category cards */
.category-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  display: block;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.category-card:hover img {
  transform: scale(1.06);
}

.category-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 7, 12, 0.95) 8%, rgba(6, 7, 12, 0.15) 65%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
}

.category-card h3 {
  font-size: 19px;
  margin-bottom: 4px;
}

.category-card p {
  font-size: 13px;
  color: var(--text-muted);
}

.category-card .arrow {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translate(-6px, 6px);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}

.category-card:hover .arrow {
  opacity: 1;
  transform: translate(0, 0);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.step .num {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  font-size: 15px;
}

.step h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.step p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Newsletter / CTA band */
.cta-band {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 52px 40px;
  background:
    radial-gradient(70% 120% at 50% 0%, rgba(124, 92, 255, 0.28), transparent 70%),
    var(--surface);
  text-align: center;
}

.cta-band h2 {
  font-size: clamp(24px, 3.4vw, 34px);
  margin-bottom: 12px;
}

.cta-band p {
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0 auto 26px;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto;
}

/* ============================ 7. PRODUCT CARDS =========================== */
.product-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-soft);
  overflow: hidden;
  display: block;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

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

.badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--surface-3);
  color: var(--text);
  backdrop-filter: blur(6px);
}

.badge-new {
  background: var(--accent-2);
  color: #04222a;
}
.badge-sale {
  background: var(--sale);
  color: #2a0410;
}
.badge-best {
  background: var(--gold);
  color: #2a1b02;
}
.badge-limited {
  background: var(--accent);
  color: #fff;
}
.badge-rare {
  background: linear-gradient(135deg, #f472b6, #a855f7);
  color: #fff;
}

.product-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.product-series {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.product-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.product-title a:hover {
  color: var(--accent-2);
}

.rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.stars {
  color: var(--gold);
  letter-spacing: 1px;
  font-size: 12px;
}

.product-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
}

.price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.price-was {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: line-through;
  margin-left: 7px;
  font-weight: 500;
}

.price-eur {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

.stock-flag {
  font-size: 12px;
  font-weight: 600;
}

.stock-in {
  color: var(--success);
}
.stock-low {
  color: var(--gold);
}
.stock-out {
  color: var(--danger);
}

.add-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.2s var(--ease), border-color 0.2s;
}

.add-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: scale(1.08);
}

/* ============================ 8. SHOP ==================================== */
.page-head {
  padding: 46px 0 34px;
  border-bottom: 1px solid var(--border);
}

.page-head h1 {
  font-size: clamp(30px, 4.4vw, 44px);
  margin-bottom: 10px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.breadcrumbs a:hover {
  color: var(--accent-2);
}

.shop-layout {
  display: grid;
  grid-template-columns: 258px 1fr;
  gap: 36px;
  padding: 40px 0 72px;
  align-items: start;
}

.filters {
  position: sticky;
  top: calc(var(--header-h) + 18px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
}

.filter-group + .filter-group {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.filter-group h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 13px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.16s;
}

.check:hover {
  color: var(--text);
}

.check input {
  appearance: none;
  width: 17px;
  height: 17px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--bg-soft);
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: background 0.16s, border-color 0.16s;
}

.check input:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.check input:checked::after {
  content: "✓";
  font-size: 11px;
  color: #fff;
  font-weight: 700;
}

.check .n {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-dim);
}

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.result-count {
  font-size: 14px;
  color: var(--text-muted);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  border: 1px solid rgba(124, 92, 255, 0.35);
  color: #c9bcff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.chip:hover {
  background: rgba(124, 92, 255, 0.24);
}

.filters-toggle {
  display: none;
}

.empty-state {
  text-align: center;
  padding: 70px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.empty-state h3 {
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination button {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--text);
}

.pagination button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ============================ 9. PRODUCT DETAIL ========================== */
.pdp {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 52px;
  padding: 34px 0 70px;
  align-items: start;
}

.pdp-gallery {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.pdp-main {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 1 / 1;
}

.pdp-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.pdp-thumb {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  background: var(--surface);
  padding: 0;
  transition: border-color 0.18s, transform 0.18s var(--ease);
}

.pdp-thumb:hover {
  transform: translateY(-2px);
}

.pdp-thumb.active {
  border-color: var(--accent);
}

.pdp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-info h1 {
  font-size: clamp(26px, 3.6vw, 38px);
  margin: 10px 0 14px;
}

.pdp-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.pdp-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.pdp-price {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
}

.pdp-price-was {
  font-size: 18px;
  color: var(--text-dim);
  text-decoration: line-through;
}

.save-pill {
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 92, 122, 0.15);
  color: var(--sale);
  font-size: 12px;
  font-weight: 700;
}

.pdp-desc {
  color: var(--text-muted);
  margin: 18px 0;
}

.variant-group {
  margin-bottom: 18px;
}

.variant-group > span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 9px;
}

.variant-group > span b {
  color: var(--text);
  font-weight: 600;
}

.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.variant-opt {
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.18s;
}

.variant-opt:hover {
  color: var(--text);
  border-color: var(--accent);
}

.variant-opt.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.qty button {
  width: 42px;
  height: 46px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s;
}

.qty button:hover {
  background: var(--surface-2);
}

.qty input {
  width: 52px;
  height: 46px;
  border: none;
  background: transparent;
  text-align: center;
  font-weight: 600;
  outline: none;
}

.qty-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 22px 0 12px;
}

.qty-row .btn {
  flex: 1;
}

.pdp-assurance {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.pdp-assurance div {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  color: var(--text-muted);
}

.pdp-assurance svg {
  color: var(--success);
  flex-shrink: 0;
}

.pdp-sections {
  padding-bottom: 72px;
}

.accordion {
  border-top: 1px solid var(--border);
}

.acc-item {
  border-bottom: 1px solid var(--border);
}

.acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 4px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.acc-head .sign {
  color: var(--accent-2);
  font-size: 20px;
  transition: transform 0.25s var(--ease);
  flex-shrink: 0;
}

.acc-item.open .acc-head .sign {
  transform: rotate(45deg);
}

.acc-body {
  display: none;
  padding: 0 4px 24px;
  color: var(--text-muted);
  font-size: 15px;
}

.acc-item.open .acc-body {
  display: block;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.spec-table tr {
  border-bottom: 1px solid var(--border);
}

.spec-table tr:last-child {
  border-bottom: none;
}

.spec-table th {
  text-align: left;
  padding: 12px 0;
  color: var(--text-dim);
  font-weight: 500;
  width: 42%;
}

.spec-table td {
  padding: 12px 0;
  color: var(--text);
}

.feature-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}

.feature-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.feature-list li::before {
  content: "✦";
  color: var(--accent);
  flex-shrink: 0;
}

/* ============================ 10. CART & CHECKOUT ======================== */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 384px;
  gap: 34px;
  padding: 40px 0 76px;
  align-items: start;
}

.cart-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.cart-row {
  display: grid;
  grid-template-columns: 104px 1fr auto;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.cart-row:last-child {
  border-bottom: none;
}

.cart-thumb {
  width: 104px;
  height: 104px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-row h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 5px;
}

.cart-row .variant-note {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.cart-row-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.cart-row-price {
  text-align: right;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  white-space: nowrap;
}

.link-danger {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-danger:hover {
  color: var(--danger);
}

.summary {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
}

.summary h3 {
  font-size: 18px;
  margin-bottom: 18px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 14px;
  color: var(--text-muted);
  padding: 7px 0;
}

.summary-row strong {
  color: var(--text);
  font-weight: 600;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.summary-total span {
  font-size: 15px;
  color: var(--text-muted);
}

.summary-total strong {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
}

.summary-note {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 14px;
  line-height: 1.5;
}

.continue-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-muted);
}

.continue-link:hover {
  color: var(--accent-2);
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 384px;
  gap: 34px;
  padding: 40px 0 76px;
  align-items: start;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 26px;
  margin-bottom: 22px;
}

.panel > h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.panel > h3 + p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.mini-line {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.mini-line:last-child {
  border-bottom: none;
}

.mini-line img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.mini-line h5 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 3px;
}

.mini-line small {
  color: var(--text-dim);
  font-size: 12px;
}

.mini-line .amt {
  font-weight: 600;
  font-size: 14px;
}

.pay-methods {
  display: grid;
  gap: 12px;
}

.pay-method {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}

.pay-method:hover {
  border-color: var(--border-strong);
}

.pay-method.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.pay-method input {
  margin-top: 4px;
  accent-color: var(--accent);
}

.pay-method strong {
  display: block;
  font-size: 15px;
  margin-bottom: 3px;
}

.pay-method span {
  font-size: 13px;
  color: var(--text-muted);
}

.pay-brands {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.pay-brand {
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--surface-3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

#paypal-buttons {
  margin-top: 18px;
}

.notice {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.55;
  border: 1px solid;
}

.notice-info {
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.3);
  color: #a5eefb;
}

.notice-warn {
  background: rgba(255, 176, 32, 0.08);
  border-color: rgba(255, 176, 32, 0.3);
  color: #ffd894;
}

.notice-ok {
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.3);
  color: #a7f3d0;
}

.order-done {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 70px 0 90px;
}

.order-done .tick {
  width: 84px;
  height: 84px;
  margin: 0 auto 26px;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.4);
  display: grid;
  place-items: center;
  color: var(--success);
}

.order-done h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 12px;
}

.order-done > p {
  color: var(--text-muted);
  margin-bottom: 30px;
}

.order-ref {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 34px;
}

/* ============================ 11. CONTENT PAGES ========================== */
.prose {
  max-width: 760px;
}

.prose h2 {
  font-size: 24px;
  margin: 38px 0 14px;
}

.prose h3 {
  font-size: 18px;
  margin: 26px 0 10px;
}

.prose p,
.prose li {
  color: var(--text-muted);
  font-size: 15.5px;
}

.prose p + p {
  margin-top: 14px;
}

.prose ul,
.prose ol {
  padding-left: 20px;
  margin: 12px 0;
  display: grid;
  gap: 8px;
}

.prose a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose strong {
  color: var(--text);
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 48px;
  padding: 44px 0 80px;
  align-items: start;
}

.side-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
  margin-bottom: 18px;
}

.side-card h3 {
  font-size: 16px;
  margin-bottom: 14px;
}

.side-card ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
  font-size: 14px;
}

.side-card li {
  display: flex;
  gap: 10px;
  color: var(--text-muted);
}

.side-card li b {
  color: var(--text);
  display: block;
  font-weight: 600;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.contact-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 26px;
}

.contact-card .ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.contact-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.contact-card p,
.contact-card a {
  font-size: 14px;
  color: var(--text-muted);
}

.contact-card a:hover {
  color: var(--accent-2);
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}

.faq-q .sign {
  color: var(--accent-2);
  font-size: 19px;
  transition: transform 0.25s var(--ease);
  flex-shrink: 0;
}

.faq-item.open .sign {
  transform: rotate(45deg);
}

.faq-a {
  display: none;
  padding: 0 20px 20px;
  color: var(--text-muted);
  font-size: 15px;
}

.faq-item.open .faq-a {
  display: block;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 34px 0;
}

.stat {
  text-align: center;
  padding: 24px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  background: linear-gradient(120deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat span {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================ 12. FOOTER ================================= */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 62px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 46px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 16px 0 20px;
  max-width: 34ch;
}

.socials {
  display: flex;
  gap: 10px;
}

.socials a {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: all 0.18s;
}

.socials a:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 11px;
}

.footer-col a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.16s;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-dim);
}

.footer-bottom nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.pay-logos {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pay-logos span {
  padding: 5px 10px;
  border-radius: 5px;
  background: var(--surface-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* ============================ 13. TOAST / MISC =========================== */
.toast-wrap {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 200;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 500;
  animation: toastIn 0.35s var(--ease);
  max-width: 340px;
}

.toast.out {
  animation: toastOut 0.3s var(--ease) forwards;
}

.toast .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

.toast.error .dot {
  background: var(--danger);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--surface) 25%,
    var(--surface-3) 37%,
    var(--surface) 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

.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;
}

/* ============================ 13b. COOKIE CONSENT ======================= */
.cookie-bar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 1200;
  width: min(760px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.cookie-bar p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.cookie-bar a {
  color: var(--accent-2);
}

.cookie-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ============================ 13c. SCANNER ============================== */
.scan-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 34px 20px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-soft);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}

.scan-drop svg {
  width: 34px;
  height: 34px;
  color: var(--accent);
}

.scan-drop.is-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.scan-stage {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin: 4px 0 18px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.scan-stage canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.scan-handles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scan-handle {
  position: absolute;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(124, 92, 255, 0.85);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  transition: transform 0.12s var(--ease), background 0.12s;
}

.scan-handle::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
}

.scan-handle.is-active {
  background: var(--accent-2);
  transform: scale(1.15);
  cursor: grabbing;
}

.scan-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.scan-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.scan-status {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 14px;
  min-height: 18px;
}

.scan-status.is-error {
  color: var(--danger);
}

.scan-verdict {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.scan-verdict b {
  font-family: var(--font-display);
  font-size: 18px;
}

.scan-verdict span {
  font-size: 14px;
  color: var(--text-muted);
}

.scan-verdict.is-high { border-left-color: var(--success); }
.scan-verdict.is-medium { border-left-color: var(--gold); }
.scan-verdict.is-low { border-left-color: var(--danger); }

.scan-compare {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 22px;
}

.scan-compare figure {
  margin: 0;
}

.scan-compare canvas,
.scan-compare img {
  display: block;
  width: 128px;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
}

.scan-compare figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}

.scan-result {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.scan-result + .scan-result {
  margin-top: 12px;
}

.scan-result.is-top {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.scan-result img {
  width: 92px;
  height: auto;
  border-radius: 8px;
  background: var(--bg-soft);
}

.scan-result h4 {
  margin: 0;
  font-size: 16px;
}

.scan-name-zh {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.scan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.scan-score {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-dim);
}

.scan-score b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.scan-bar {
  flex: 1 1 120px;
  min-width: 80px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  overflow: hidden;
}

.scan-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.scan-actions {
  margin-top: 12px;
}

.scan-actions .btn:disabled {
  opacity: 1;
  color: var(--accent-2);
  border-color: var(--border-strong);
}

/* The scanner lets a match be saved raw or in a slab, so the grade picker sits
   inline with the add button. */
.scan-grade {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.scan-grade-select {
  width: auto;
  padding: 7px 32px 7px 12px;
  font-size: 13px;
  background-position: right 11px center;
}

@media (max-width: 640px) {
  .scan-result {
    grid-template-columns: 72px 1fr;
  }
  .scan-result img {
    width: 72px;
  }
}

/* ============================ 14. RESPONSIVE ============================= */
/* The header collapses in stages (inline search, then nav) so the bar never
   overflows before the mobile menu takes over. */
@media (max-width: 1240px) {
  .header-actions .search-form {
    display: none;
  }
}

@media (max-width: 1080px) {
  .main-nav,
  .currency-wrap,
  .lang-wrap {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .hero-visual {
    max-width: 480px;
  }
  .hero-float.f-top {
    left: 0;
  }
  .hero-float.f-bottom {
    right: 0;
  }
  .shop-layout {
    grid-template-columns: 1fr;
  }
  .filters {
    position: static;
    display: none;
  }
  .filters.open {
    display: block;
  }
  .filters-toggle {
    display: inline-flex;
  }
  .pdp {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .pdp-gallery {
    position: static;
  }
  .content-layout,
  .cart-layout,
  .checkout-layout {
    grid-template-columns: 1fr;
  }
  .summary {
    position: static;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 34px;
  }
  .trust-grid,
  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .section {
    padding: 54px 0;
  }
  .grid-3,
  .grid-4,
  .steps,
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .container {
    padding-inline: 16px;
  }
  .cookie-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
  }
  .cookie-actions {
    margin-left: 0;
  }
  .hero {
    padding: 46px 0 56px;
  }
  .hero-float {
    display: none;
  }
  .grid-2,
  .grid-3,
  .grid-4,
  .steps,
  .contact-grid,
  .footer-grid,
  .trust-grid,
  .stat-row,
  .field-row {
    grid-template-columns: 1fr;
  }
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }
  .product-body {
    padding: 13px 13px 15px;
  }
  .product-title {
    font-size: 14px;
  }
  .price {
    font-size: 16px;
  }
  .cart-row {
    grid-template-columns: 78px 1fr;
    gap: 14px;
  }
  .cart-thumb {
    width: 78px;
    height: 78px;
  }
  .cart-row-price {
    grid-column: 2;
    text-align: left;
  }
  .cta-band {
    padding: 36px 22px;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .toast-wrap {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
  .toast {
    max-width: none;
  }
  .pdp-thumbs {
    grid-template-columns: repeat(3, 1fr);
  }
  .qty-row {
    flex-wrap: wrap;
  }
  .mini-line {
    grid-template-columns: 48px 1fr auto;
    gap: 10px;
  }
  .mini-line img {
    width: 48px;
    height: 48px;
  }
}

@media print {
  .site-header,
  .site-footer,
  .announcement,
  .cart-drawer,
  .drawer-backdrop {
    display: none !important;
  }
}

/* ====================== 15. ACCOUNTS & CARD BINDER ====================== */

/* Header account button: same pill as the cart, plus a binder count badge. */
.account-btn {
  position: relative;
}

.account-btn.is-signed-in {
  border-color: var(--border-strong);
  color: var(--accent-2);
}

.account-btn[data-count]::after {
  content: attr(data-count);
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* Sign in / create account switcher */
.auth-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
}

.auth-tab {
  padding: 9px 20px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.auth-tab:hover {
  color: var(--text);
}

.auth-tab.is-active {
  background: var(--accent);
  color: #fff;
}

.form-error {
  margin: 4px 0 14px;
  padding: 10px 14px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(248, 113, 113, 0.1);
  color: var(--danger);
  font-size: 14px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn.is-busy {
  opacity: 0.65;
  pointer-events: none;
}

/* Account overview header */
.account-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 6px;
}

.account-head h3 {
  margin: 0;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--accent-2);
  flex: none;
}

/* Binder toolbar */
.binder-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.binder-toolbar .input {
  flex: 1 1 220px;
  min-width: 0;
}

.binder-toolbar .select {
  flex: 0 0 auto;
}

/* Show / hide the extra layers drawn on each tile */
.binder-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: -8px 0 18px;
}

.binder-toggles .check {
  padding: 0;
  font-size: 13px;
}

/* Follow list: pick a set to keep on the album before owning a card in it */
.binder-follow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: -8px 0 18px;
}

.binder-follow .select {
  flex: 0 1 320px;
  min-width: 0;
}

.binder-follow-hint {
  font-size: 13px;
}

/* Owned-card grid */
.binder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 18px;
}

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

.binder-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.binder-media {
  position: relative;
  aspect-ratio: 5 / 7;
  background: var(--surface-2);
  overflow: hidden;
}

.binder-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Album divider: the grid is a single flow, so a set header spans every
   column and starts the next checklist. */
.binder-set-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.binder-set-head:not(:first-child) {
  margin-top: 14px;
}

.binder-set-name {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.binder-set-count {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* Marks a set the collector follows; clicking it drops the follow */
.binder-unfollow {
  flex: 0 0 auto;
  padding: 3px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.binder-unfollow:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* Cards on a set checklist the collector does not own yet: the face stays a
   grey placeholder until the card is added to the binder. */
.binder-card.is-locked {
  border-style: dashed;
  background: transparent;
}

.binder-card.is-locked:hover {
  border-color: var(--border);
  transform: none;
}

.binder-card.is-locked .binder-media img {
  filter: grayscale(1);
  opacity: 0.4;
}

.binder-card.is-locked .binder-name {
  color: var(--text-dim);
  font-weight: 500;
}

.binder-lock-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.binder-qty-badge {
  position: absolute;
  top: 8px;
  right: 8px;
}

/* Grade the copy is held at — a raw card and its PSA 10 are separate entries */
.binder-grade-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.binder-grade-badge.is-psa10 {
  border-color: rgba(124, 92, 255, 0.5);
  color: #b9a8ff;
}

.binder-grade-badge.is-bgs10 {
  border-color: rgba(255, 176, 32, 0.5);
  color: var(--gold);
}

/* Lower half of the card face: the 30-day trend, kept off the illustration */
.binder-spark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52%;
  display: none;
  pointer-events: none;
  background: linear-gradient(to top, rgba(8, 9, 15, 0.82) 0%, rgba(8, 9, 15, 0.34) 52%, rgba(8, 9, 15, 0) 100%);
}

.binder-grid.show-trend .binder-spark {
  display: block;
}

.binder-spark-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Latest price for the grade held, bottom-right of the card face */
.binder-price {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: none;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: rgba(8, 9, 15, 0.78);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(4px);
}

.binder-price:empty {
  display: none !important;
}

.binder-grid.show-price .binder-price:not(:empty) {
  display: inline-block;
}

/* The binder tracks five figures, so its row fits as many as the width allows
   instead of the fixed four used on the account and about pages. */
.stat-row.stat-row-5 {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

/* Portfolio total: a monetary figure needs a smaller face than a card count */
.stat-value strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.stat-value span {
  font-size: 12px;
}

.binder-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px 14px;
}

.binder-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.binder-name-zh {
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-muted);
}

.binder-meta {
  font-size: 12px;
  color: var(--text-dim);
}

.binder-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.binder-actions .qty button {
  width: 30px;
  height: 32px;
  font-size: 15px;
}

.binder-actions .qty input {
  width: 38px;
  height: 32px;
  font-size: 13px;
}

.binder-remove {
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  transition: color 0.15s, background 0.15s;
}

.binder-remove:hover {
  color: var(--danger);
  background: rgba(248, 113, 113, 0.12);
}

/* Set / series progress */
.progress-list {
  display: grid;
  gap: 14px;
}

.progress-row {
  display: grid;
  gap: 7px;
}

.progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.progress-head .name {
  font-weight: 600;
}

.progress-head .muted,
.progress-head .count {
  color: var(--text-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.progress-bar {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.4s var(--ease);
}

.progress-fill.is-complete {
  background: linear-gradient(90deg, var(--success), var(--accent-2));
}

@media (max-width: 640px) {
  .binder-grid {
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
    gap: 14px;
  }

  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   16. Card market (scanner)
   --------------------------------------------------------------------------
   The price panel beneath a scanner result: what each grade is worth, how the
   price has moved over 30 days, and the platform x grade price matrix.
   ========================================================================== */

.market-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 16px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.market-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.market-head h4 {
  margin: 0;
  font-size: 16px;
}

.market-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-dim);
}

.market-note {
  color: var(--text-dim);
  font-style: italic;
}

.market-grades {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
}

.market-grade {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.market-grade:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
}

.market-grade.is-active {
  border-color: var(--accent);
  background: var(--surface-3);
}

.market-grade-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.market-grade b {
  font-family: var(--font-display);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.market-grade small {
  font-size: 11px;
  color: var(--text-dim);
}

/* Marks a figure we modelled rather than read off a live listing, or — with
   .is-market — a real quote from the fallback source, which prices no
   conditions. The two claims must not look alike. */
.market-tag {
  justify-self: start;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.market-tag.is-market {
  /* The raw-condition cyan, so the tag reads as the column it sits under. */
  border-color: rgba(34, 211, 238, 0.45);
  color: #22d3ee;
}

.market-grade b.market-none {
  color: var(--text-dim);
}

.market-delta {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.market-delta.is-up { color: var(--success); }
.market-delta.is-down { color: var(--danger); }
.market-delta.is-flat { color: var(--text-muted); }

.market-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.market-chart-head b {
  font-size: 14px;
}

.market-chart-note {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.market-chart {
  display: block;
  width: 100%;
  height: 132px;
}

/* Where the prices came from — one marketplace, so a line rather than a grid. */
.market-source {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 18px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.market-source-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.market-source-name span,
.market-source-meta small {
  font-size: 11px;
  color: var(--text-dim);
}

.market-source-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.market-foot {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
}

@media (max-width: 640px) {
  .market-source {
    padding: 8px 10px;
  }
}

/* ================== 17. PUBLIC CARD DEX (dex.html) ====================== */
.dex-search {
  margin-bottom: 14px;
}

.dex-search .input {
  width: 100%;
}

.dex-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: 12px;
}

.dex-count {
  margin: 18px 0 14px;
  font-size: 13px;
}

.dex-loading {
  margin: 18px 0 0;
}

.dex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 18px;
}

.dex-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.dex-card:hover,
.dex-card:focus-visible {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  outline: none;
}

.dex-media {
  position: relative;
  aspect-ratio: 5 / 7;
  background: var(--surface-2);
  overflow: hidden;
}

.dex-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.dex-rarity {
  position: absolute;
  top: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.dex-body {
  display: grid;
  gap: 3px;
  padding: 10px 12px 12px;
}

.dex-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dex-meta {
  font-size: 11px;
  color: var(--text-dim);
}

.dex-name-zh {
  font-size: 12px;
  line-height: 1.3;
  color: var(--text-muted);
}

.dex-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.dex-pager:empty {
  margin-top: 0;
}

.dex-page.is-active {
  border-color: rgba(124, 92, 255, 0.6);
  color: #b9a8ff;
}

/* Card detail — a dialog over the grid */
.dex-detail {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
}

.dex-detail.open {
  display: block;
}

.dex-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 9, 0.72);
  backdrop-filter: blur(3px);
}

.dex-detail-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(940px, calc(100% - 32px));
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 26px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dex-detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.dex-detail-grid {
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: 26px;
}

.dex-detail-media {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
}

.dex-detail-media img {
  width: 100%;
  height: auto;
  display: block;
}

.dex-detail-info h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.2;
}

.dex-detail-sub {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.dex-detail-zh {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.dex-detail-zh + .dex-detail-sub {
  margin-top: 6px;
}

.dex-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px 20px;
  margin: 0 0 20px;
}

.dex-facts > div {
  display: grid;
  gap: 2px;
}

.dex-facts dt {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.dex-facts dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.dex-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 22px;
}

.dex-detail-actions .scan-grade-select {
  min-width: 150px;
}

.dex-detail-actions .input {
  width: 92px;
}

@media (max-width: 860px) {
  .dex-detail-grid {
    grid-template-columns: 1fr;
  }

  .dex-detail-media {
    max-width: 300px;
  }

  .dex-detail-panel {
    padding: 20px;
  }
}

@media (max-width: 640px) {
  .dex-filters {
    grid-template-columns: 1fr;
  }

  .dex-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 14px;
  }

  .dex-detail-actions {
    gap: 10px;
  }
}

/* ================== 18. MARKETPLACE & TRADES ===========================
   The member-to-member market. It reuses the card dex grid, pager, filters
   and detail dialog, and layers on the money side: the price on the tile, the
   escrow status pill, the Alipay QR panel, the seller's listings and the
   listing wizard.                                                  */
.mk-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.mk-toolbar .btn {
  flex: 0 0 auto;
}

.mk-toolbar .input {
  flex: 1 1 240px;
  width: auto;
}

/* ---- the price tag and stock badge on a tile ------------------------- */
.mk-price {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: rgba(4, 5, 9, 0.82);
  border: 1px solid var(--border-strong);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.mk-price.is-dead {
  color: var(--text-dim);
}

.mk-stock {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(4, 5, 9, 0.82);
  border: 1px solid var(--border-strong);
  font-size: 11px;
  color: var(--text-muted);
}

.mk-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.mk-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  background: var(--surface-2);
}

.mk-chip.is-raw { color: var(--accent-2); border-color: rgba(34, 211, 238, 0.35); }
.mk-chip.is-graded { color: #b9a8ff; border-color: rgba(124, 92, 255, 0.4); }
.mk-chip.is-a { color: var(--success); border-color: rgba(52, 211, 153, 0.35); }
.mk-chip.is-b { color: var(--gold); border-color: rgba(255, 176, 32, 0.35); }
.mk-chip.is-c { color: var(--danger); border-color: rgba(248, 113, 113, 0.35); }

.mk-seller {
  font-size: 11px;
  color: var(--text-dim);
}

/* ---- status pill, shared by listing rows and trade cards ------------ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.pill.is-pending_pay { color: var(--gold); border-color: rgba(255, 176, 32, 0.4); }
.pill.is-escrow { color: #b9a8ff; border-color: rgba(124, 92, 255, 0.45); }
.pill.is-shipped { color: var(--accent-2); border-color: rgba(34, 211, 238, 0.4); }
.pill.is-settled,
.pill.is-active { color: var(--success); border-color: rgba(52, 211, 153, 0.4); }
.pill.is-disputed { color: var(--sale); border-color: rgba(255, 92, 122, 0.45); }
.pill.is-pending,
.pill.is-submitted { color: var(--gold); border-color: rgba(255, 176, 32, 0.4); }
.pill.is-confirmed,
.pill.is-listed { color: var(--success); border-color: rgba(52, 211, 153, 0.4); }
.pill.is-quoted { color: var(--accent-2); border-color: rgba(34, 211, 238, 0.4); }
.pill.is-rejected { color: var(--sale); border-color: rgba(255, 92, 122, 0.45); }
.pill.is-refunded,
.pill.is-cancelled,
.pill.is-withdrawn,
.pill.is-sold { color: var(--text-dim); }

/* ---- the payment panel inside the detail dialog ---------------------- */
/* Paying is a hop to Alipay's own checkout, so the panel is one column: what
   the order is, what it costs, and the buttons that move it along. */
.trade-pay {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 6px;
}

.trade-amount {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  margin: 4px 0 2px;
}

.trade-code {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.trade-hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.trade-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.trade-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.trade-form .field.is-wide {
  grid-column: 1 / -1;
}

.trade-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* ---- listing / order rows -------------------------------------------- */
.trade-list {
  display: grid;
  gap: 12px;
}

.trade-row {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.trade-row-media {
  width: 74px;
  aspect-ratio: 5 / 7;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow: hidden;
}

.trade-row-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.trade-row-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.trade-row-title {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-row-zh {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-row-meta {
  font-size: 12px;
  color: var(--text-dim);
}

.trade-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.trade-row-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.trade-row-form .input {
  width: auto;
  min-width: 130px;
  flex: 1 1 130px;
  padding: 8px 12px;
  font-size: 13px;
}

/* ---- seller storefront header ---------------------------------------- */
.seller-head {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.seller-head h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 22px;
}

.seller-head p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.seller-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 16px;
}

/* ---- listing wizard --------------------------------------------------- */
.sell-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.sell-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: var(--text-dim);
  background: var(--surface);
}

.sell-step b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface-3);
  font-size: 11px;
}

.sell-step.is-active {
  color: var(--text);
  border-color: rgba(124, 92, 255, 0.5);
  background: var(--accent-soft);
}

.sell-step.is-active b {
  background: var(--accent);
  color: #fff;
}

.sell-panel[hidden] {
  display: none;
}

.sell-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sell-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}

.sell-choice:hover {
  border-color: var(--accent);
}

.sell-choice input {
  accent-color: var(--accent);
}

.sell-choice.is-on {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.sell-picked {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.sell-picked-media {
  width: 96px;
  aspect-ratio: 5 / 7;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  overflow: hidden;
}

.sell-picked-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.sell-picked-name {
  font-size: 16px;
  font-weight: 600;
}

.sell-picked-meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.sell-picked-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.sell-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

@media (max-width: 860px) {
  .trade-pay {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .trade-form {
    grid-template-columns: 1fr;
  }

  .trade-row {
    grid-template-columns: 62px 1fr;
  }

  .trade-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* ================== 19. COMMUNITY FORUM (forum.html) ==================== */
.forum-compose {
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.forum-compose[hidden] {
  display: none;
}

.forum-compose .field-row > .field {
  min-width: 0;
}

.forum-card-hits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 16px;
}

.forum-card-hits:empty {
  display: none;
}

.forum-hit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}

.forum-hit:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-soft);
}

.forum-picked {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(124, 92, 255, 0.4);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.forum-picked[hidden] {
  display: none;
}

.forum-picked-name {
  flex: 1 1 220px;
  min-width: 0;
  font-size: 14px;
  color: var(--text);
}

.forum-signin {
  font-size: 13px;
}

.forum-list {
  display: grid;
  gap: 12px;
}

.forum-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}

.forum-item:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-1px);
}

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

.forum-thumb {
  display: block;
  width: 62px;
  aspect-ratio: 5 / 7;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  overflow: hidden;
}

.forum-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.forum-item-main {
  min-width: 0;
}

.forum-item-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.forum-item-card {
  font-size: 12px;
  color: var(--text-dim);
}

.forum-item-title {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.4;
  color: var(--text);
}

.forum-item-excerpt {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.forum-item-meta {
  margin: 0;
  font-size: 12px;
}

/* ---- the thread itself, inside the shared detail dialog --------------- */
.forum-thread h2 {
  margin: 6px 0 4px;
  font-size: 22px;
  line-height: 1.35;
}

.forum-card-ref {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s, background 0.18s;
}

.forum-card-ref:hover {
  border-color: var(--accent);
  background: var(--surface-3);
}

.forum-card-ref img {
  width: 54px;
  aspect-ratio: 5 / 7;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  flex: 0 0 auto;
}

.forum-card-ref span {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.forum-body {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.forum-comments {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.forum-comment {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.forum-comment-head {
  margin: 0 0 6px;
  font-size: 12px;
}

.forum-comment-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.forum-reply {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.forum-reply textarea {
  width: 100%;
}

.forum-edit {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
}

@media (max-width: 640px) {
  .forum-item {
    grid-template-columns: 1fr;
  }

  .forum-thumb {
    width: 76px;
  }

  .forum-compose {
    padding: 14px;
  }
}

