:root {
  --bg: #101114;
  --surface: #181a1f;
  --surface-raised: #1e2127;
  --surface-hover: #24272e;
  --line: #333740;
  --line-strong: #454a55;
  --text: #f0f1f3;
  --muted: #a1a7b1;
  --muted-2: #737985;
  --orange: #f47a25;
  --orange-soft: #f6a15d;
  --cyan: #60d6e7;
  --green: #5bd49c;
  --radius-sm: 5px;
  --radius-md: 7px;
  --shadow-menu: 0 18px 42px rgb(0 0 0 / .38);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-width: 320px; margin: 0; color: var(--text); background: var(--bg); font: 600 14px/1.4 Manrope, Arial, sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--orange-soft); outline-offset: 3px; }

.marketplace-shell { width: min(1920px, 100%); margin: auto; padding: 12px 18px 34px; }
.topbar { display: flex; align-items: stretch; min-height: 66px; padding: 0 20px; border: 1px solid #292c33; border-radius: var(--radius-md); background: #191b20; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: 24px; color: #fff; font-size: 15px; font-weight: 800; letter-spacing: .06em; text-decoration: none; }
.brand-mark { display: block; width: 29px; height: 29px; flex: 0 0 auto; filter: drop-shadow(0 3px 6px rgb(0 0 0 / .32)); }
.game-tabs { display: flex; align-items: stretch; gap: 4px; }
.game-filter { position: relative; min-width: 68px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-weight: 700; transition: color .16s ease, border-color .16s ease; }
.game-filter:hover, .game-filter.is-active { color: #fff; border-bottom-color: var(--orange); }
.status { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; color: #bdc3cb; font-size: 12px; }
.status i, .availability i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgb(91 212 156 / .1); }

.quick-facets { position: relative; z-index: 20; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 7px; margin: 12px 0; overflow: visible; }
.quick-facets[data-game="cs2"] { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.quick-menu { position: relative; min-width: 0; }
.quick-facet { position: relative; display: flex; width: 100%; min-height: 42px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius-sm); color: #c7ccd4; background: #191b20; padding: 6px 10px; font-size: 12px; font-weight: 700; line-height: 1.15; text-align: center; transition: border-color .14s ease, background .14s ease, color .14s ease; }
.quick-facet:hover, .quick-facet.is-active { border-color: #9a4d20; color: #fff; background: #2a211d; }
.quick-facet::after { content: ''; }
.quick-facet.has-dropdown { padding-right: 22px; }
.quick-facet.has-dropdown::after { position: absolute; right: 9px; content: '⌄'; color: #858c98; font-size: 14px; }
.quick-dropdown { position: absolute; z-index: 100; top: calc(100% + 6px); left: 0; display: none; width: max-content; min-width: 186px; max-width: min(280px, calc(100vw - 24px)); max-height: 360px; overflow: auto; padding: 7px; border: 1px solid #474c56; border-radius: 6px; background: #23262d; box-shadow: var(--shadow-menu); }
.quick-menu:last-child .quick-dropdown { right: 0; left: auto; }
.quick-menu:hover .quick-dropdown, .quick-menu:focus-within .quick-dropdown, .quick-menu.is-open .quick-dropdown { display: grid; }
.quick-dropdown button { min-height: 34px; border: 0; border-radius: 4px; color: #cbd0d7; background: transparent; padding: 0 10px; text-align: left; }
.quick-dropdown button:hover, .quick-dropdown button.is-active { color: #fff; background: #353943; }
.quick-dropdown-all { margin-bottom: 4px; border-bottom: 1px solid #414650 !important; border-radius: 0 !important; color: #f2ac7b !important; }

.store-layout { display: grid; grid-template-columns: 254px minmax(0, 1fr); gap: 14px; align-items: start; }
.filters-sidebar { position: sticky; top: 12px; max-height: calc(100dvh - 24px); min-width: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #2c3038; border-radius: var(--radius-md); background: var(--surface); padding: 0 16px 17px; scrollbar-color: #555c67 transparent; scrollbar-width: thin; }
.filters-sidebar::-webkit-scrollbar { width: 8px; }
.filters-sidebar::-webkit-scrollbar-thumb { border: 2px solid var(--surface); border-radius: 999px; background: #555c67; }
.filter-section { padding: 17px 0; border-bottom: 1px solid var(--line); }
.filter-heading { display: flex; width: 100%; align-items: center; justify-content: space-between; border: 0; color: #e8eaed; background: transparent; padding: 0; font-size: 13px; font-weight: 800; text-align: left; }
.filter-heading:hover { color: #fff; }
.filter-chevron { width: 10px; height: 10px; border-top: 2px solid #9ca3ae; border-left: 2px solid #9ca3ae; transform: rotate(45deg); transition: transform .16s ease, border-color .16s ease; }
.filter-heading:hover .filter-chevron { border-color: #f1f3f5; }
.filter-section.is-collapsed { margin: 4px 0; border-bottom: 0; padding: 0; }
.filter-section.is-collapsed > :not(.filter-heading) { display: none; }
.filter-section.is-collapsed .filter-heading { min-height: 45px; border: 1px solid #303540; border-radius: 6px; background: #1b1e24; padding: 0 12px; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.filter-section.is-collapsed .filter-heading:hover { border-color: #565d68; background: #22262d; }
.filter-section.is-collapsed .filter-heading:focus-visible { outline-offset: 1px; }
.filter-section.is-collapsed .filter-chevron { transform: rotate(-135deg); }
.price-range { display: grid; grid-template-columns: 1fr 1fr; margin-top: 12px; }
.price-range input { width: 100%; min-width: 0; height: 43px; border: 1px solid var(--line-strong); color: #edf0f2; background: #191b20; padding: 0 10px; outline: 0; }
.price-range input:first-child { border-radius: 5px 0 0 5px; }
.price-range input:last-child { border-left: 0; border-radius: 0 5px 5px 0; }
.price-range input:focus { border-color: var(--orange); }
.price-range input::placeholder { color: #747b86; }
.side-select { position: relative; display: block; margin-top: 12px; }
.side-select select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.sort-select select { width: 100%; height: 42px; appearance: none; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: #dfe3e8; background: #1b1d22 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%239ca3ad' stroke-width='1.5'/%3E%3C/svg%3E") right 12px center / 12px no-repeat; padding: 0 34px 0 11px; }
.catalog-select { position: relative; }
.catalog-select.is-open { z-index: 65; }
.catalog-select-trigger { display: flex; width: 100%; min-height: 42px; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: #e0e4e9; background: #1b1d22; padding: 0 12px; font-size: 12px; font-weight: 700; text-align: left; transition: border-color .14s ease, background .14s ease; }
.catalog-select-trigger:hover, .catalog-select.is-open .catalog-select-trigger { border-color: #6b727d; background: #202329; }
.catalog-select-trigger:disabled { cursor: not-allowed; opacity: .45; }
.catalog-select-caret { width: 9px; height: 9px; flex: 0 0 auto; border-right: 2px solid #a6adb7; border-bottom: 2px solid #a6adb7; transform: translateY(-2px) rotate(45deg); transition: transform .14s ease; }
.catalog-select.is-open .catalog-select-caret { transform: translateY(3px) rotate(225deg); }
.catalog-select-menu { position: absolute; z-index: 60; top: calc(100% + 5px); right: 0; left: 0; display: none; max-height: 260px; overflow: auto; border: 1px solid #4b525d; border-radius: 6px; background: #22252c; box-shadow: var(--shadow-menu); padding: 5px; }
.catalog-select.is-open .catalog-select-menu { display: grid; }
.catalog-select.opens-up .catalog-select-menu { top: auto; bottom: calc(100% + 5px); }
.catalog-select-option { display: flex; min-height: 34px; align-items: center; border: 0; border-radius: 4px; color: #c8ced6; background: transparent; padding: 6px 9px; font-size: 12px; font-weight: 600; text-align: left; }
.catalog-select-option:hover, .catalog-select-option.is-selected { color: #fff; background: #353a44; }
.catalog-select-option.is-selected::after { content: ''; width: 6px; height: 10px; margin-left: auto; border-right: 2px solid var(--orange-soft); border-bottom: 2px solid var(--orange-soft); transform: rotate(45deg) translateY(-2px); }
.rarity-subheading { margin: 15px 0 -4px; color: #858b95; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.filter-note { margin: 9px 0 0; color: var(--muted-2); font-size: 11px; line-height: 1.35; }
.filter-checklist { display: grid; gap: 3px; max-height: 240px; margin-top: 10px; overflow: auto; padding-right: 4px; }
.filter-check { display: flex; min-height: 28px; align-items: center; gap: 8px; color: #bac0c9; font-size: 12px; cursor: pointer; }
.filter-check:hover { color: #fff; }
.filter-check input { width: 15px; height: 15px; margin: 0; accent-color: var(--orange); }
.filter-check b { margin-left: auto; color: #8e949e; font: 600 10px Roboto Mono, monospace; }
.reset-filters { width: 100%; min-height: 39px; margin-top: 16px; border: 1px solid #444a54; border-radius: var(--radius-sm); color: #b6bdc6; background: transparent; font-size: 12px; font-weight: 700; transition: color .15s, border-color .15s; }
.reset-filters:hover { border-color: var(--orange); color: #fff; }

.catalog-area { min-width: 0; }
.catalog-heading { display: flex; min-height: 52px; align-items: end; justify-content: space-between; margin: 1px 1px 9px; }
.catalog-heading h1 { margin: 0; color: #f5f5f6; font-size: 22px; line-height: 1; letter-spacing: 0; }
.catalog-kicker { margin: 0 0 5px; color: var(--orange-soft); font: 700 10px/1 Roboto Mono, monospace; letter-spacing: .08em; text-transform: uppercase; }
.catalog-promise { margin: 0 0 2px; color: #8e959f; font-size: 11px; }
.catalog-toolbar { display: grid; grid-template-columns: 46px minmax(180px, 1fr) 204px; gap: 8px; padding: 9px; border: 1px solid #2c3038; border-radius: var(--radius-md); background: var(--surface); }
.icon-button { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: #c8ced6; background: #20232a; font-size: 25px; line-height: 1; transition: border-color .15s, color .15s; }
.icon-button:hover { border-color: var(--orange); color: var(--orange-soft); }
.search-field { display: flex; min-width: 0; min-height: 45px; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #191b20; padding: 0 12px; }
.search-field:focus-within { border-color: #737984; }
.search-icon { margin-right: 8px; color: #8c939d; font-size: 23px; line-height: 1; transform: rotate(-20deg); }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; color: #e9ecef; background: transparent; }
.search-field input::placeholder { color: #7a818c; }
.search-field button { border: 0; color: #b9c0c9; background: transparent; font-size: 20px; }
.sort-select { position: relative; display: flex; align-items: center; min-width: 0; }
.sort-select span { position: absolute; z-index: 1; left: 12px; color: #aab1ba; pointer-events: none; }
.sort-select select { padding-left: 33px; }
.catalog-meta { display: flex; justify-content: space-between; gap: 12px; margin: 13px 2px 10px; color: #9097a2; font-size: 11px; }
.catalog-meta p { margin: 0; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 10px; }
.item-card { display: grid; grid-template-rows: 178px minmax(105px, auto) 52px; min-width: 0; min-height: 335px; overflow: hidden; padding: 0; border: 1px solid #2f343d; border-radius: var(--radius-md); color: var(--text); background: var(--surface-raised); text-align: left; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.item-card:hover { z-index: 1; border-color: #626a76; background: var(--surface-hover); transform: translateY(-2px); }
.item-art { display: grid; min-height: 0; place-items: center; overflow: hidden; border-bottom: 1px solid #353a43; background: radial-gradient(ellipse 70% 75% at 50% 42%, #424854 0%, #30343d 50%, #24272d 100%); padding: 13px; }
.item-image { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 12px rgb(0 0 0 / .28)); transition: transform .22s ease; }
.item-image-fallback { display: grid; width: 100%; height: 100%; place-items: center; color: #8f97a2; font-size: 11px; line-height: 1.35; text-align: center; }
.item-card:hover .item-image { transform: scale(1.045); }
.item-card[data-game="dota2"] .item-art {
  padding: 18px 22px;
  background: radial-gradient(ellipse 75% 82% at 50% 43%, #4a505c 0%, #343943 56%, #25282f 100%);
}
.item-card[data-game="dota2"] .item-image {
  width: 100%;
  height: 100%;
  border: 1px solid rgb(210 213 216 / .18);
  background: #414348;
  object-fit: contain;
  object-position: center;
}
.item-details { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 12px 13px 0; }
.item-name { overflow: hidden; color: #f0f2f4; font-size: 13px; font-weight: 800; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.item-source { color: #a7adb7; font: 700 10px/1.15 Roboto Mono, monospace; letter-spacing: .025em; text-transform: uppercase; }
.item-stock { color: #9fa6b0; font-size: 11px; }
.item-condition { color: var(--cyan); font: 700 10px/1 Roboto Mono, monospace; }
.item-price { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 13px 13px; }
.item-price b { color: #f7f7f7; font: 700 19px/1 Roboto Mono, monospace; white-space: nowrap; }
.item-action { display: inline-flex; min-height: 28px; align-items: center; border-radius: 3px; color: #f6bb90; background: #34251c; padding: 0 9px; font-size: 10px; font-weight: 800; }
.item-card:hover .item-action { color: #1b1714; background: var(--orange); }
.loading-state, .empty-state { padding: 60px 0; color: #999fa9; text-align: center; }
.more-button { display: block; min-width: 180px; min-height: 40px; margin: 22px auto; border: 1px solid #4a515c; border-radius: var(--radius-sm); color: #d9dde2; background: #1e2127; font-size: 12px; font-weight: 700; }
.more-button:hover { border-color: var(--orange); }

.item-dialog { width: min(820px, calc(100% - 28px)); max-height: min(770px, calc(100% - 28px)); overflow: auto; padding: 0; border: 1px solid #4b515b; border-radius: var(--radius-md); color: var(--text); background: #1b1e24; box-shadow: 0 26px 90px rgb(0 0 0 / .65); }
.item-dialog::backdrop { background: rgb(5 6 8 / .82); }
.item-dialog[open] { display: grid; grid-template-columns: minmax(240px, 42%) 1fr; }
.dialog-close { position: absolute; z-index: 2; top: 11px; right: 13px; border: 0; color: #b9c0c9; background: transparent; font-size: 24px; }
.dialog-art { display: grid; min-height: 420px; place-items: center; background: radial-gradient(ellipse at 50% 35%, #444b57 0%, #29303a 58%, #1e2026 100%); padding: 22px; }
.dialog-image { width: 100%; height: 100%; object-fit: contain; }
.dialog-art[data-game="dota2"] .dialog-image {
  border: 1px solid rgb(210 213 216 / .18);
  background: #414348;
  object-fit: cover;
}
.dialog-content { padding: 42px 32px 30px; }
.eyebrow { margin: 0 0 11px; color: var(--orange-soft); font: 700 10px/1 Roboto Mono, monospace; letter-spacing: .08em; text-transform: uppercase; }
.dialog-content h2 { margin: 0; font-size: 27px; line-height: 1.16; }
.dialog-price { margin: 15px 0 7px; color: #fff; font: 700 25px/1 Roboto Mono, monospace; }
.supplier-price, .dialog-hint { color: #969da7; font-size: 12px; }
.availability { display: flex; align-items: center; gap: 8px; color: #cdd2d8; font-size: 12px; }
.variant-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 8px; margin: 15px 0; }
.variant-group { display: grid; gap: 5px; border: 1px solid #363c46; border-radius: 5px; background: #20232a; padding: 8px; }
.variant-group strong { color: #c8ced6; font-size: 11px; }
.variant-option { display: flex; min-height: 31px; align-items: center; justify-content: space-between; gap: 7px; border: 1px solid #454c57; border-radius: 4px; color: #cbd1d8; background: #191b20; padding: 5px 7px; font-size: 10px; text-align: left; }
.variant-option b { color: #f0f1f2; font: 700 10px Roboto Mono, monospace; }
.variant-option:hover, .variant-option.is-active { border-color: var(--orange); color: #fff; background: #30241d; }
.order-note { display: grid; gap: 9px; margin-top: 21px; border: 1px solid #3b5660; border-radius: 5px; background: #162126; padding: 14px; }
.order-note span { color: #c9d0d7; font-size: 11px; }
.order-note code { overflow-wrap: anywhere; color: var(--cyan); font: 600 12px/1.5 Roboto Mono, monospace; }
.order-note button { justify-self: start; border: 1px solid #5a6975; border-radius: 3px; color: #e8edf1; background: transparent; padding: 6px 9px; font-size: 11px; }
.source-link { display: inline-block; margin-top: 16px; color: var(--cyan); font-size: 12px; }

@media (max-width: 1350px) { .quick-facets, .quick-facets[data-game="cs2"] { grid-template-columns: repeat(6, minmax(0, 1fr)); } .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); } }
@media (max-width: 1020px) { .store-layout { grid-template-columns: 224px minmax(0, 1fr); } .filters-sidebar { padding: 0 13px 14px; } .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 8px; } .item-card { grid-template-rows: 158px minmax(102px, auto) 50px; min-height: 310px; } }
@media (max-width: 820px) { .marketplace-shell { padding: 8px 10px 26px; } .topbar { min-height: 58px; padding: 0 13px; } .brand { margin-right: 9px; } .status { display: none; } .store-layout { grid-template-columns: 1fr; } .filters-sidebar { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; } .reset-filters { grid-column: 1 / -1; } .quick-facets, .quick-facets[data-game="cs2"] { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .brand { display: none; } .game-tabs { width: 100%; } .game-filter { flex: 1; } .quick-facets, .quick-facets[data-game="cs2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } .filters-sidebar { grid-template-columns: 1fr; } .catalog-heading { min-height: 45px; } .catalog-promise { display: none; } .catalog-toolbar { grid-template-columns: 45px minmax(0, 1fr); } .sort-select { grid-column: 1 / -1; } .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; } .item-card { grid-template-rows: 128px minmax(97px, auto) 48px; min-height: 273px; } .item-art { padding: 8px; } .item-details { padding: 9px 9px 0; } .item-name { font-size: 11px; } .item-source, .item-condition { font-size: 9px; } .item-stock { font-size: 10px; } .item-price { padding: 7px 9px 10px; } .item-price b { font-size: 14px; } .item-action { min-height: 24px; padding: 0 6px; font-size: 9px; } .item-dialog[open] { grid-template-columns: 1fr; } .dialog-art { display: grid; min-height: 200px; max-height: 235px; padding: 14px; } .dialog-content { padding: 28px 21px 24px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
