@font-face {
  font-family: "Droid Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/droid-sans-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Droid Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/droid-sans-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Comfortaa (self-hosted, OFL) */
@font-face {
  font-family: "Comfortaa";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/comfortaa-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Comfortaa";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/comfortaa-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --brand: #1e3a8a;
  --brand-hover: #2749a6;
  --accent: #ebb773;
  --bg: #0a0d14;
  --surface: rgba(26, 31, 43, .55);
  --surface-2: rgba(255, 255, 255, .06);
  --text: #f2f4f8;
  --muted: #a7adba;
  --border: rgba(255, 255, 255, .10);
  --glass-blur: 14px;
  --glass-gradient: linear-gradient(145deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0));
  --page-gradient:
    radial-gradient(1200px 700px at 8% -10%, rgba(30, 58, 138, .45), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, rgba(235, 183, 115, .10), transparent 55%),
    radial-gradient(800px 500px at 50% 110%, rgba(30, 58, 138, .20), transparent 60%),
    linear-gradient(165deg, #080b11 0%, #0e1320 50%, #070a0f 100%);
  --search-bg: #f3f1ee;
  --search-text: #141414;
  --font-base: "Comfortaa", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-secondary: "Droid Sans", "Comfortaa", system-ui, -apple-system, sans-serif;
  --radius: 8px;
  --shadow: 0 8px 32px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .04);
  color-scheme: dark;
}

[data-theme="light"] {
  --brand: #012169;
  --brand-hover: #01308c;
  --accent: #ebb773;
  --bg: #eef2f8;
  --surface: rgba(255, 255, 255, .68);
  --surface-2: rgba(255, 255, 255, .50);
  --text: #111827;
  --muted: #5b6474;
  --border: rgba(15, 23, 42, .10);
  --glass-blur: 14px;
  --glass-gradient: linear-gradient(145deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
  --page-gradient:
    radial-gradient(1200px 700px at 10% -10%, rgba(1, 33, 105, .14), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, rgba(235, 183, 115, .20), transparent 55%),
    linear-gradient(165deg, #f6f8fc 0%, #e9eef7 50%, #f4f6fb 100%);
  --search-bg: #f3f1ee;
  --search-text: #141414;
  --shadow: 0 8px 30px rgba(15, 23, 42, .10), inset 0 1px 0 rgba(255, 255, 255, .6);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-base);
  line-height: 1.5;
  background-color: var(--bg);
  background-image: var(--page-gradient);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
}

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

.container {
  width: min(1200px, 100% - 2rem);
  margin-inline: auto;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar {
  background: var(--brand);
  color: #fff;
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .6rem 0;
}

.brand {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

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

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 640px;
}

.search {
  display: flex;
  width: 100%;
}

.search input {
  flex: 1;
  padding: .55rem .8rem;
  border: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--search-bg);
  color: var(--search-text);
  font: inherit;
  font-size: .95rem;
}

.search input::placeholder {
  color: #6f6b66;
  font-family: var(--font-secondary);
}

.search input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.search button {
  display: grid;
  place-items: center;
  min-width: 46px;
  padding: 0 .85rem;
  border: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: linear-gradient(135deg, #3b82f6, var(--brand));
  color: #fff;
  cursor: pointer;
  transition: filter .18s ease;
}

.search button:hover {
  filter: brightness(1.12);
}

.search button svg {
  width: 21px;
  height: 21px;
  display: block;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .9rem;
}

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

.badge {
  display: inline-block;
  min-width: 1.2rem;
  padding: 0 .3rem;
  border-radius: 999px;
  background: var(--accent);
  color: #111;
  font-size: .75rem;
  text-align: center;
}

.theme-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .4);
  color: #fff;
  border-radius: var(--radius);
  padding: .2rem .5rem;
  cursor: pointer;
}

.gamenav {
  background: var(--surface);
}

.gamenav-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: .5rem 0;
  font-size: .9rem;
  overflow-x: auto;
}

.gamenav a {
  color: var(--muted);
  white-space: nowrap;
}

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

.lang {
  margin-left: auto;
}

.lang select {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .25rem .4rem;
}

main {
  padding: 2rem 0;
}

.hero {
  margin-bottom: 2rem;
}

.hero h1 {
  margin: 0 0 .4rem;
  font-size: 1.8rem;
}

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

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

.card-tile {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem;
  box-shadow: var(--shadow);
}

.card-tile h2 {
  margin: 1.0rem 0 0;
  font-size: .95rem;
  font-weight: 600;
}

.card-tile p.small {
  margin: 0;
}

.thumb {
  /* aspect-ratio: 1.2 / 1; */
  border-radius: 6px;
  background: linear-gradient(135deg, var(--surface-2), var(--border));
}

.price {
  margin: .25rem 0 0;
  color: var(--accent);
  font-weight: 700;
}

[data-theme="light"] .price {
  color: var(--brand);
}

.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .85rem;
}

@media (max-width: 720px) {
  .topbar-inner {
    flex-wrap: wrap;
  }

  .search-wrap {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }
}

/* Auth & forms */
.inline-form {
  display: inline;
  margin: 0;
}

.link-button {
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

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

.user {
  font-weight: 600;
}

.messages {
  margin-bottom: 1.25rem;
}

.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: .9rem;
}

.alert p {
  margin: .25rem 0;
}

.alert-error {
  border-color: #b3261e;
  background: rgba(179, 38, 30, .1);
}

.alert-success {
  border-color: #1b7a3a;
  background: rgba(27, 122, 58, .1);
}

.auth {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.auth-card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 0 0 .25rem;
  font-size: 1.5rem;
}

.auth-sub {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: .9rem;
}

.auth-alt {
  margin: 1.25rem 0 0;
  font-size: .875rem;
  color: var(--muted);
  text-align: center;
}

.auth-alt a {
  color: var(--accent);
  font-weight: 600;
}

[data-theme="light"] .auth-alt a {
  color: var(--brand);
}

.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  margin-bottom: .35rem;
  font-size: .85rem;
  font-weight: 600;
}

.input {
  width: 100%;
  padding: .55rem .7rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
}

.input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

[data-theme="light"] .input:focus {
  outline-color: var(--brand);
}

.help {
  margin: .3rem 0 0;
  font-size: .78rem;
  color: var(--muted);
}

.help ul {
  margin: .25rem 0 0;
  padding-left: 1.1rem;
}

.error {
  margin: .3rem 0 0;
  font-size: .8rem;
  color: #b3261e;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  min-height: 42px;
  padding: .6rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.btn:hover {
  border-color: rgba(235, 183, 115, .35);
}

.btn-primary {
  background: var(--brand);
  border-color: transparent;
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-hover);
}

.btn-block {
  width: 100%;
}

/* Wide auth layout (2-column forms) */
.auth-card--wide {
  width: min(680px, 100%);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1rem;
}

.form-grid .form-row {
  margin-bottom: 1rem;
}

.form-grid .form-row--full {
  grid-column: 1 / -1;
}

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

/* Components */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  font-size: .85rem;
  color: var(--muted);
}

.breadcrumb li+li::before {
  content: "/";
  margin-right: .4rem;
  color: var(--border);
}

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .15rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}

.pill-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.pill-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
}

.pill-success {
  background: rgba(27, 122, 58, .15);
  border-color: #1b7a3a;
  color: #53c07a;
}

.pill-danger {
  background: rgba(179, 38, 30, .15);
  border-color: #b3261e;
  color: #ff7b72;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.table th,
.table td {
  padding: .5rem .75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  background: var(--surface-2);
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .04em;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background: var(--surface-2);
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pagination {
  display: flex;
  gap: .35rem;
  align-items: center;
  margin-top: 1rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 .5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .85rem;
}

.pagination .current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 700;
}

.pagination a:hover {
  border-color: var(--accent);
}

.empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.empty-state h2 {
  margin: 0 0 .35rem;
  color: var(--text);
  font-size: 1.1rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.tabs a {
  padding: .5rem .9rem;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
}

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

.tabs a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.section-title {
  margin: 2rem 0 .75rem;
  font-size: 1.1rem;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

/* Info card */
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.info-card h3 {
  margin: 0 0 .35rem;
  font-size: 1rem;
}

.info-card p {
  margin: 0;
  color: var(--muted);
  font-size: .875rem;
  margin-bottom: 20px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

/* Stat list */
.stat-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1.5rem;
  margin: 0;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
}

.stat dt {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}

.stat dd {
  margin: .2rem 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Offer table */
.offer-table .seller {
  font-weight: 600;
}

.offer-table .condition {
  white-space: nowrap;
}

.offer-table .offer-price {
  color: var(--accent);
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

[data-theme="light"] .offer-table .offer-price {
  color: var(--brand);
}

/* Filter panel */
.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.filter-fieldset {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
}

.filter-fieldset legend {
  font-weight: 600;
  font-size: .85rem;
  margin-bottom: .5rem;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .9rem;
  font-size: .85rem;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.filter-actions {
  display: flex;
  gap: .5rem;
  border-top: 1px solid var(--border);
  padding-top: .75rem;
}

/* Profile card */
.profile-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--muted);
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .25rem;
}

/* Rating */
.rating {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
}

.rating-emoji {
  font-size: 1.15rem;
  line-height: 1;
}

/* Category tiles */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .75rem;
}

.category-tile {
  display: block;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  font-weight: 600;
}

.category-tile:hover {
  border-color: var(--accent);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 50;
  display: none;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .18);
  padding: 1rem;
}

.cookie-banner.is-visible {
  display: block;
}

.cookie-banner .inner {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: center;
  justify-content: space-between;
}

.cookie-banner p {
  margin: 0;
  font-size: .85rem;
  color: var(--muted);
  max-width: 640px;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

/* Two-row header helpers */
.header-row-1,
.header-row-2 {
  width: 100%;
}

/* Catalog detail */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.section-head .section-title {
  margin-bottom: .75rem;
}

.section-head a {
  font-size: .875rem;
  color: var(--accent);
}

[data-theme="light"] .section-head a {
  color: var(--brand);
}

.detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.detail-thumb {
  aspect-ratio: 600 / 825;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface-2), var(--border));
  border: 1px solid var(--border);
}

.product-pills {
  margin: .75rem 0 0;
}

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

.small {
  font-size: .8rem;
}

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

  .detail-thumb {
    max-width: 240px;
  }
}

/* Search suggestions */
.suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.suggestions:empty {
  display: none;
}

.suggest-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.suggest-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}

.suggest-list li:last-child a {
  border-bottom: 0;
}

.suggest-list a:hover {
  background: var(--surface-2);
}

.suggest-name {
  font-weight: 600;
}

.suggest-price {
  color: var(--accent);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

[data-theme="light"] .suggest-price {
  color: var(--brand);
}

/* Search layout */
.search-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}

.search-layout .filter-panel {
  position: sticky;
  top: 1rem;
}

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

  .search-layout .filter-panel {
    position: static;
  }
}

/* Price chart & offer filters */
.chart-box {
  position: relative;
  height: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.offer-filters {
  margin-bottom: 1rem;
}

.filter-inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .75rem;
  align-items: end;
}

.filter-inline .filter-actions {
  border-top: 0;
  padding-top: 0;
  align-self: end;
}

/* Seller forms */
.listing-form {
  max-width: 760px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1rem;
}

.form-row input[type="checkbox"]:not(.switch) {
  width: auto;
}

.form-row--full {
  grid-column: 1 / -1;
}

/* Listing photos */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: .75rem;
  margin-top: .75rem;
}

.photo-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .5rem;
  text-align: center;
}

.photo-tile img {
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  margin-bottom: .35rem;
}

.listing-cell {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.mini-thumb {
  width: 36px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Cart */
.btn-sm {
  min-height: 0;
  padding: .3rem .6rem;
  font-size: .8rem;
}

.cart-group {
  margin-bottom: 2rem;
}

.cart-group-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: flex-end;
  margin-top: .75rem;
}

.cart-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 2rem;
}

.cart-total {
  font-size: 1.4rem;
  margin-left: .5rem;
  font-variant-numeric: tabular-nums;
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: .4rem;
  justify-content: flex-end;
}

.qty-input {
  width: 64px;
  padding: .25rem .4rem;
}

/* Accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--surface);
  color: var(--text);
  padding: .75rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 0 0 var(--radius) 0;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

main:focus {
  outline: none;
}

/* Messaging */
.message-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-width: 760px;
}

.message {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  max-width: 80%;
}

.message--own {
  align-self: flex-end;
  border-color: var(--brand);
}

[data-theme="light"] .message--own {
  border-color: var(--accent);
}

.message-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .25rem;
  font-size: .8rem;
}

.message p {
  margin: 0;
  white-space: normal;
}

/* Account dropdown */
.account-menu {
  position: relative;
}

.account-menu>summary {
  list-style: none;
}

.account-menu>summary::-webkit-details-marker {
  display: none;
}

.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem 0;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.account-trigger:hover {
  color: var(--accent);
}

.account-panel {
  position: absolute;
  right: 0;
  top: calc(100% + .5rem);
  z-index: 80;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  padding: .35rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.account-menu:not([open])>.account-panel {
  display: none;
}

.account-menu[open]>.account-panel {
  display: flex;
}

.account-panel a,
.account-panel .link-button {
  display: block;
  width: 100%;
  padding: .45rem .6rem;
  border-radius: 6px;
  font-size: .875rem;
  text-align: left;
}

.account-panel a:hover,
.account-panel .link-button:hover {
  background: var(--surface-2);
}

.account-panel .inline-form {
  display: block;
  margin: 0;
}

.account-sep {
  border-top: 1px solid var(--border);
  margin: .35rem 0;
}

/* Glassmorphic surfaces */
.site-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.topbar {
  background: linear-gradient(135deg, rgba(1, 33, 105, .92), rgba(1, 33, 105, .62));
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.gamenav {
  background: rgba(12, 17, 28, .42);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

[data-theme="light"] .gamenav {
  background: rgba(255, 255, 255, .55);
}

.card-tile,
.category-tile,
.filter-panel,
.auth-card,
.info-card,
.stat,
.profile-card,
.table-wrap,
.chart-box,
.empty-state,
.account-panel,
.cookie-banner,
.message,
.detail-thumb {
  background-color: var(--surface);
  background-image: var(--glass-gradient);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
}

.card-tile,
.category-tile,
.btn,
.account-trigger {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.card-tile:hover,
.category-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(235, 183, 115, .38);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .30);
}

.btn-primary {
  background: linear-gradient(135deg, #2b50b4, #012169);
  box-shadow: 0 6px 18px rgba(1, 33, 105, .35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #355fd0, #01308c);
}

.table th {
  background: rgba(255, 255, 255, .05);
}

[data-theme="light"] .table th {
  background: rgba(15, 23, 42, .05);
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, .04);
}

[data-theme="light"] .table tbody tr:hover {
  background: rgba(1, 33, 105, .04);
}

.account-panel {
  background-color: rgb(18 23 34);
}

[data-theme="light"] .account-panel {
  background-color: rgba(255, 255, 255, .86);
}

.cookie-banner {
  background-color: rgb(18 23 34);
}

[data-theme="light"] .cookie-banner {
  background-color: rgba(255, 255, 255, .90);
}

.site-footer {
  background: rgba(8, 11, 17, .35);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="light"] .site-footer {
  background: rgba(255, 255, 255, .45);
}

@media (prefers-reduced-motion: reduce) {

  .card-tile,
  .category-tile,
  .btn,
  .account-trigger {
    transition: none;
  }

  .card-tile:hover,
  .category-tile:hover {
    transform: none;
  }
}

.gamenav {
  display: contents;
}

/* Home: game cards + inline market data */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.game-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
}

.game-logo {
  width: 112px;
  height: auto;
  flex: 0 0 auto;
}

.game-initial {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 14px;
}

.game-initial {
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-size: 1.5rem;
  font-weight: 700;
}

.game-body {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.data-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.data-card {
  padding: 1rem;
  border-radius: var(--radius);
}

.data-card h3 {
  margin: 0 0 .15rem;
  font-size: 1.05rem;
}

.table.compact th,
.table.compact td {
  padding: .4rem .5rem;
}

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

.info-card tr {
  height: 40px;
}

/* Catalog landing */
.catalog-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.catalog-hero-brand img {
  width: 180px;
  height: auto;
  display: block;
}

.catalog-hero-initial {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background: var(--surface-2);
  font-size: 2.2rem;
  font-weight: 700;
}

.catalog-hero-body {
  flex: 1 1 320px;
  min-width: 240px;
}

.catalog-hero-body h1 {
  margin: 0 0 .25rem;
  font-size: 2rem;
}

.catalog-hero-body p {
  margin: 0 0 .75rem;
  color: var(--muted);
}

.catalog-hero-stats {
  flex: 1 1 360px;
  margin: 0;
}

.category-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem;
  border-radius: var(--radius);
}

.category-card-body {
  display: flex;
  flex-direction: column;
}

.category-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--accent);
}

.category-icon svg {
  width: 22px;
  height: 22px;
}

.set-row {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  scroll-snap-type: x mandatory;
}

.set-card {
  flex: 0 0 auto;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: 1rem;
  border-radius: var(--radius);
  scroll-snap-align: start;
}

.set-code {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--accent);
}

@media (max-width: 860px) {
  .catalog-hero-brand img {
    width: 140px;
  }
}

/* Sticky header */
html {
  scroll-padding-top: 120px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  transition: box-shadow .25s ease, background-color .25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 14px 44px rgba(0, 0, 0, .38);
}

.site-header {
  min-height: 0;
}

@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none;
  }
}

/* Category cards: equal width/height, aligned text */
.category-grid {
  grid-auto-rows: 1fr;
}

.category-card {
  width: 100%;
  min-height: 88px;
  padding: 1.1rem 1rem;
  align-items: center;
}

.category-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .15rem;
  line-height: 1.2;
}

/* Buttons: rectangular, less tall */
.btn {
  padding: .42rem .95rem;
  font-size: .85rem;
  line-height: 1.2;
  border-radius: 6px;
}

.btn-sm {
  padding: .26rem .6rem;
  font-size: .78rem;
}

/* Minimal filter rail with secondary font */
.filter-panel {
  padding: .85rem;
}

.filter-fieldset {
  margin-bottom: .85rem;
}

.filter-fieldset legend,
.filter-panel .form-row label {
  font-family: var(--font-secondary);
  font-size: .8rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: .01em;
  color: var(--muted);
  margin-bottom: .3rem;
}

.filter-panel .input {
  font-family: var(--font-secondary);
  font-size: .8rem;
  padding: .36rem .5rem;
  background: rgba(255, 255, 255, .03);
}

[data-theme="light"] .filter-panel .input {
  background: rgba(255, 255, 255, .55);
}

.filter-option {
  font-family: var(--font-secondary);
  font-size: .8rem;
}

.filter-actions .btn {
  font-size: .8rem;
}

/* Native select dropdown surfaces */
select {
  color-scheme: dark;
}

select option,
select optgroup {
  background-color: #161b26;
  color: #f2f4f8;
}

[data-theme="light"] select {
  color-scheme: light;
}

[data-theme="light"] select option,
[data-theme="light"] select optgroup {
  background-color: #ffffff;
  color: #111827;
}

.info-card.category-card {
  width: max-content;
  max-width: 100%;
}

/* Category cards: single-line titles, content-sized columns */
.category-grid--cards {
  grid-template-columns: repeat(auto-fit, max-content);
}

.info-card.category-card {
  width: max-content;
  max-width: none;
  white-space: nowrap;
}

.category-grid--cards .category-card-body {
  white-space: nowrap;
}

@media (max-width: 600px) {
  .category-grid--cards {
    grid-template-columns: 1fr 1fr;
  }

  .info-card.category-card {
    max-width: 100%;
    white-space: normal;
  }

  .category-grid--cards .category-card-body {
    white-space: normal;
  }
}

.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

/* Card images */
img.thumb {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

img.detail-thumb {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.set-logo {
  max-width: 120px;
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: .45rem;
}

/* Product offers: filter rail + list */
.offers-layout .filter-inline {
  display: block;
}

.offers-layout .filter-inline .form-row {
  margin-bottom: .75rem;
}

.offers-layout .filter-actions {
  margin-top: .5rem;
}

/* Form polish */
.form-section {
  margin-bottom: 1.5rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--surface);
  background-image: var(--glass-gradient);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.form-section h2 {
  margin: 0 0 .9rem;
  font-size: .95rem;
  letter-spacing: .02em;
}

.form-row label {
  font-family: var(--font-secondary);
  font-size: .82rem;
  color: var(--muted);
}

.input {
  min-height: 42px;
  background-color: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .12);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

[data-theme="light"] .input {
  background-color: rgba(255, 255, 255, .7);
  border-color: rgba(15, 23, 42, .12);
}

.input:hover {
  border-color: rgba(235, 183, 115, .45);
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(235, 183, 115, .18);
}

/* Switches */
.form-switches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .75rem;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem .7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .85rem;
  cursor: pointer;
}

.switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .14);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}

.switch::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
  transition: transform .18s ease;
}

.switch:checked {
  background: var(--brand);
  border-color: var(--accent);
}

.switch:checked::before {
  transform: translateX(18px);
}

[data-theme="light"] .switch {
  background: rgba(15, 23, 42, .16);
}

[data-theme="light"] .switch:checked {
  background: var(--brand);
}

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

/* Compact switches inside filter options */
.filter-option .switch {
  width: 36px;
  height: 20px;
}

.filter-option .switch::before {
  width: 14px;
  height: 14px;
}

.filter-option .switch:checked::before {
  transform: translateX(16px);
}

img.avatar {
  object-fit: cover;
}

/* Avatars */
.avatar--lg {
  width: 96px;
  height: 96px;
  font-size: 1.6rem;
}

.avatar-preview-wrap {
  margin-top: .65rem;
}

.avatar-preview-wrap .avatar {
  border: 1px solid var(--border);
}

/* Filter forms: align action buttons with fields */
.filter-inline {
  align-items: end;
}

.filter-inline .form-row {
  margin-bottom: 0;
}

.filter-inline .filter-actions {
  align-self: end;
}

.filter-inline .btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Listing product preview */
.product-preview {
  margin-top: .6rem;
  width: min(180px, 100%);
  aspect-ratio: 600 / 825;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.product-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Detail media zoom */
.detail-media {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 600 / 825;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.detail-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .4s ease;
}

.detail-media:hover img {
  transform: scale(1.3);
}

@media (prefers-reduced-motion: reduce) {
  .detail-media img {
    transition: none;
  }

  .detail-media:hover img {
    transform: none;
  }
}

/* Zoom lens + lightbox */
.detail-media {
  position: relative;
}

.zoom-btn {
  position: absolute;
  right: .5rem;
  bottom: .5rem;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(10, 14, 24, .62);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

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

.zoom-btn:hover {
  background: var(--brand);
}

.zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgba(4, 7, 12, .86);
  backdrop-filter: blur(8px);
}

.zoom-overlay[hidden] {
  display: none;
}

.zoom-overlay img {
  max-width: min(92vw, 760px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}

.zoom-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(10, 14, 24, .7);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

body.no-scroll {
  overflow: hidden;
}

/* Checkout equal columns */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }
}

/* Theme icons + cart icon */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.icon-moon {
  display: none;
}

[data-theme="light"] .icon-sun {
  display: none;
}

[data-theme="light"] .icon-moon {
  display: inline-block;
}

.cart {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.cart>svg {
  width: 20px;
  height: 20px;
}

.btn-cart {
  padding: .35rem .5rem;
}

.btn-cart svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Cart drawer */
.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  justify-content: flex-end;
}

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

.cart-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(2px);
  animation: drawer-fade .18s ease;
}

.cart-drawer-panel {
  position: relative;
  width: min(400px, 92vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  background-image: var(--glass-gradient);
  border-left: 1px solid var(--border);
  box-shadow: -20px 0 60px rgba(0, 0, 0, .35);
  animation: drawer-slide .25s ease;
}

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

.cart-drawer-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.cart-drawer-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: inherit;
  font-size: 1.3rem;
  cursor: pointer;
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.15rem;
}

.drawer-group {
  border-bottom: 1px solid var(--border);
  padding-bottom: .75rem;
  margin-bottom: .75rem;
}

.drawer-group h3 {
  margin: 0 0 .4rem;
  font-size: .8rem;
  color: var(--muted);
}

.drawer-line {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  font-size: .82rem;
  padding: .2rem 0;
}

.drawer-line strong {
  white-space: nowrap;
}

.drawer-total {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  padding: .5rem 0 1rem;
}

.drawer-actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

@keyframes drawer-slide {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes drawer-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {

  .cart-drawer-panel,
  .cart-drawer-overlay {
    animation: none;
  }
}

/* Commission preview */
.commission-box {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin-top: .5rem;
  padding: .55rem .75rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .03);
  font-size: .8rem;
  font-family: var(--font-secondary);
  color: var(--muted);
}

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

.change-up {
  color: #53c07a;
}

.change-down {
  color: #ff7b72;
}


/* Wishlist target price */
.target-input {
  width: 112px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Product picker: keep native select and option surfaces dark */
select.product-select {
  background-color: var(--bg);
  color: var(--text);
}

select.product-select option {
  background-color: #161b26;
  color: #f2f4f8;
}

[data-theme="light"] select.product-select {
  background-color: #ffffff;
  color: #111827;
}

[data-theme="light"] select.product-select option {
  background-color: #ffffff;
  color: #111827;
}

/* Listing photos */
.photo-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.photo-existing {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .5rem;
}

.photo-existing img {
  width: 58px;
  height: 80px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}

.listing-photo-strip {
  display: flex;
  gap: .5rem;
  margin-top: .6rem;
}

.listing-photo-strip img {
  width: 66px;
  height: 92px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}

@media (max-width: 560px) {
  .photo-upload-grid {
    grid-template-columns: 1fr;
  }
}

/* Profile & password forms */
.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, .8fr);
  gap: 1.5rem;
  align-items: start;
}

.auth-card.profile-form-card {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1.5rem;
}

.auth-card.password-card {
  width: min(520px, 100%);
}

.profile-form-card .form-actions {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

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

/* Offer action icons */
.offer-actions {
  display: flex;
  align-items: center;
  gap: .35rem;
  justify-content: flex-end;
}

.offer-actions form {
  margin: 0;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

.icon-btn--cart {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.listing-description {
  margin: 1rem 0;
}

.listing-description h2 {
  margin: 0 0 .4rem;
  font-size: .95rem;
}

.listing-description p {
  margin: 0;
  white-space: normal;
}

.pill-error {
  border-color: rgba(255, 123, 114, .4);
  color: #ff7b72;
}

.drawer-actions .btn {
  text-align: center;
}

.product-search {
  margin-bottom: .45rem;
}

/* Modern upload zones */
.upload-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  min-height: 132px;
  margin-top: .35rem;
  padding: 1rem;
  text-align: center;
  border: 1.5px dashed rgba(235, 183, 115, .42);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}

.upload-zone:hover,
.upload-zone.is-dragging,
.upload-zone:focus-within {
  border-color: var(--accent);
  background: rgba(235, 183, 115, .07);
}

.upload-zone.has-file {
  border-style: solid;
}

.upload-zone .upload-input,
.upload-zone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}


.upload-title {
  color: var(--text);
  font-weight: 600;
  font-size: .9rem;
}

.upload-hint {
  font-size: .75rem;
  color: var(--muted);
}

.upload-name {
  margin-top: .25rem;
  font-size: .75rem;
  color: var(--accent);
  word-break: break-all;
}

.upload-zone--avatar {
  min-height: 96px;
  margin-bottom: .75rem;
}

/* Admin architecture diagram */
.arch-diagram {
  display: flex;
  align-items: stretch;
  gap: .75rem;
  overflow-x: auto;
  padding: .5rem 0 1rem;
}

.arch-column {
  min-width: 190px;
  flex: 1;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.arch-column h3 {
  margin: 0 0 .75rem;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--accent);
}

.arch-node {
  margin-bottom: .5rem;
  padding: .6rem .7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  font-size: .85rem;
}

.arch-node small {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  margin-top: .1rem;
}

.arch-arrow {
  align-self: center;
  color: var(--accent);
  font-size: 1.5rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.guide-card {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .18s ease, transform .18s ease;
}

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

.guide-card strong {
  font-size: .95rem;
}

.guide-card span {
  color: var(--muted);
  font-size: .8rem;
}

@media (max-width: 760px) {
  .arch-diagram {
    flex-direction: column;
  }

  .arch-arrow {
    transform: rotate(90deg);
    align-self: flex-start;
    margin-left: 1rem;
  }
}

.avatar[hidden] {
  display: none;
}

.product-code-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem .8rem;
  margin: .6rem 0 0;
  padding: .7rem .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.product-code-meta div {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
}

.product-code-meta dt {
  color: var(--muted);
  font-size: .75rem;
}

.product-code-meta dd {
  margin: 0;
  font-size: .78rem;
  font-weight: 600;
}

.product-code-meta[hidden] {
  display: none;
}

/* Section-head action buttons */
.section-head a.btn {
  color: var(--text);
  font-size: .9rem;
}

.section-head a.btn-primary {
  color: #fff;
}

/* Comparison */
.compare-link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  color: #fff;
}

.compare-link svg {
  width: 20px;
  height: 20px;
}

.compare-product {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 150px;
}

.compare-product img {
  width: 36px;
  height: 50px;
  object-fit: contain;
  border-radius: 4px;
  background: var(--surface-2);
}

.compare-table th,
.compare-table td {
  vertical-align: top;
}

.compare-actions {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.compare-actions form {
  margin: 0;
}

.compare-grid {
  display: inline-flex;
  ;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

.compare-card>img {
  /* width: 100%; */
  height: 350px;
  object-fit: cover;
  border-radius: var(--radius);
  /* background: var(--surface-2); */
}

.compare-card h2 {
  margin: .6rem 0;
  font-size: .95rem;
}

.compare-card .stat-list {
  grid-template-columns: 1fr;
  gap: .2rem;
}

.compare-card .stat {
  padding: .35rem .5rem;
}

.compare-card .stat dd {
  font-size: .9rem;
}

/* Admin e-mail preview */
.email-preview-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.email-preview-layout .filter-panel a {
  display: block;
  padding: .5rem .65rem;
  border-radius: 6px;
  color: var(--muted);
  font-size: .85rem;
}

.email-preview-layout .filter-panel a:hover,
.email-preview-layout .filter-panel a.active {
  background: var(--surface-2);
  color: var(--text);
}

.email-preview {
  width: 100%;
  min-height: 620px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #eef1f7;
}

.email-text {
  white-space: pre-wrap;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: .8rem;
}

@media (max-width: 860px) {
  .email-preview-layout {
    grid-template-columns: 1fr;
  }
}

.compare-actions {
  margin-top: .9rem;
  gap: .5rem;
}

.compare-actions .btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: .7rem 1rem;
}

.compare-actions form {
  width: 100%;
}

/* Admin email template list: one item per row */
.email-template-list {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

/* Admin order detail: give the line-item table enough width */
.order-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(280px, .9fr);
  gap: 2rem;
  align-items: start;
}

@media (max-width: 960px) {
  .order-admin-layout {
    grid-template-columns: 1fr;
  }
}

/* Shared icon action rows */
.icon-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: .35rem;
}

.icon-actions form {
  margin: 0;
}

.icon-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
}

.icon-btn--danger:hover,
.icon-btn--danger:focus-visible {
  border-color: #ff7b72;
  color: #ff7b72;
}

.icon-btn--success:hover,
.icon-btn--success:focus-visible {
  border-color: #53c07a;
  color: #53c07a;
}

.icon-btn--wish {
  border-color: rgba(235, 183, 115, .55);
  color: var(--accent);
}

.icon-actions .icon-btn svg {
  pointer-events: none;
}


/* Bottom-right toast notifications */
.toast-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  width: min(380px, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .8rem 1rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background-color: var(--surface);
  background-image: var(--glass-gradient);
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--glass-blur));
  color: var(--text);
  font-size: .85rem;
  pointer-events: auto;
  animation: toast-in .22s ease;
}

.toast-success {
  border-left-color: #53c07a;
}

.toast-error {
  border-left-color: #ff7b72;
}

.toast-warning {
  border-left-color: #ebb773;
}

.toast-info {
  border-left-color: #60a5fa;
}

.toast-close {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

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

.toast.is-hiding {
  animation: toast-out .2s ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

.form-grid[hidden] {
  display: none;
}

.demo-toggle-form {
  margin-left: auto;
}

.demo-toggle {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: .3rem .65rem;
  font: inherit;
  font-size: .75rem;
  cursor: pointer;
}

.demo-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
}

.order-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .9fr);
  gap: 2rem;
  align-items: start;
}

.order-detail-layout .stat-list {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.address-line {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  margin: .45rem 0;
}

.address-line>svg {
  color: var(--accent);
  flex: 0 0 auto;
  margin-top: .12rem;
}

@media (max-width: 900px) {
  .order-detail-layout {
    grid-template-columns: 1fr;
  }
}

.listing-photo-button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 8px;
}

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

.wishlist-count {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .25rem;
  color: var(--muted);
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
}

.wishlist-count svg {
  width: 14px;
  height: 14px;
}.detail-left { min-width: 0; }

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  background: #fff;
  color: #1f2937;
  border-color: #d1d5db;
  margin-bottom: 1rem;
}
.btn-google:hover { background: #f8fafc; color: #111827; }
.btn-google svg { width: 20px; height: 20px; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1rem 0;
  color: var(--muted);
  font-size: .78rem;
  text-align: center;
}
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.auth-divider span { white-space: nowrap; }
.cookie-copy strong { display: block; margin-bottom: .2rem; color: var(--text); }
.cookie-copy p { margin: 0; }
.cookie-copy a { color: var(--accent); text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; gap: .75rem; margin: .4rem 0 0; }
.footer-links a, .footer-links .link-button { color: var(--muted); font-size: .8rem; }
.cookie-policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.cookie-policy-grid h2 { margin: 0 0 .5rem; font-size: 1rem; }

/* Floating cookie consent card */
.cookie-banner {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.cookie-banner .inner {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--surface);
  background-image: var(--glass-gradient);
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
}
@media (max-width: 640px) {
  .cookie-banner .inner { margin-bottom: .5rem; padding: .9rem 1rem; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; text-align: center; }
}
.faq-list { display: grid; gap: .5rem; }
.faq-list details { padding: .75rem 1rem; }
.faq-list summary { cursor: pointer; font-weight: 600; }
.faq-list p { margin: .6rem 0 0; color: var(--muted); }

/* Scroll performance: avoid fixed full-page gradients and repeated backdrop blur */
body {
  background-attachment: scroll;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.card-tile,
.category-tile,
.filter-panel,
.auth-card,
.info-card,
.stat,
.profile-card,
.table-wrap,
.chart-box,
.empty-state,
.message,
.detail-thumb {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header {
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
}

.topbar {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.gamenav {
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
}

.site-footer {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.search-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
}
.search-toolbar .auth-sub { margin: 0; }
.search-toolbar-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn svg { vertical-align: -3px; margin-right: .2rem; }

/* Consistent primary action buttons */
.btn-primary:not(.btn-sm):not(.icon-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .6rem 1.15rem;
}

/* Switch rows: consistent card layout everywhere */
.filter-options:has(.switch) {
  display: grid;
  grid-template-columns: 1fr;
  gap: .5rem;
}
.switch-row {
  background: rgba(255, 255, 255, .025);
}
.switch-row:hover {
  border-color: rgba(235, 183, 115, .35);
}
.suggestions {
  background: #111722;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
[data-theme="light"] .suggestions {
  background: #ffffff;
}


/* Referral link: input and copy button keep a visible gap */
.referral-link-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.referral-link-row .input {
  flex: 1 1 420px;
  width: auto;
  min-width: 0;
}


/* Referral stats: give the two cards a clearly visible gap */
.referral-stats {
  gap: 1.5rem;
  margin-top: 1.5rem;
}


.account-section-label {
  margin: .75rem .6rem .25rem;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.account-section-label:first-child {
  margin-top: .15rem;
}


.product-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: .75rem 0 1.25rem;
}
.product-pager-link {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
  padding: .65rem .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.product-pager-link strong {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-pager-link--next {
  margin-left: auto;
  text-align: right;
}
.product-pager-link:hover {
  border-color: rgba(235, 183, 115, .4);
}
