/* ---------- Marketplace v2 (design: Marketplace.dc.html) ----------
 * Hero uses tokens so it follows the light theme; the card / sidebar / pager skin
 * is dark-only (light theme keeps theme-light.css styling).
 */
.mkt {
    --mkt-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --mkt-fg: #fff;
    --mkt-dim: rgba(255, 255, 255, 0.55);
    --mkt-muted: rgba(255, 255, 255, 0.45);
    --mkt-faint: rgba(255, 255, 255, 0.4);
    --mkt-line: rgba(255, 255, 255, 0.08);
    --mkt-line-2: rgba(255, 255, 255, 0.12);
    --mkt-glow: rgba(255, 255, 255, 0.15);
    --mkt-ring: rgba(255, 255, 255, 0.05);
    --mkt-search-rim: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.07) 50%, rgba(255, 255, 255, 0.18) 100%);
    --mkt-search-bg: radial-gradient(ellipse 100% 160% at 50% 0%, #1d1d20 0%, #0b0b0c 60%, #060607 100%);
    --mkt-btn-bg: linear-gradient(180deg, #f4f4f6 0%, #b3b3ba 100%);
    --mkt-btn-fg: #0a0a0a;
    --mkt-card-bg: radial-gradient(ellipse 100% 80% at 50% 0%, #161618 0%, #0b0b0c 60%, #080809 100%);
    --mkt-panel-bg: linear-gradient(180deg, #0f0f11 0%, #080809 100%);
    --mkt-mono: 'JetBrains Mono', ui-monospace, monospace;
    --mkt-display: Sora, 'Noto Sans Arabic', system-ui, sans-serif;
    position: relative;
    overflow-x: clip;
}
html[data-theme="light"] .mkt {
    --mkt-fg: var(--theme-ink, #14213d);
    --mkt-dim: var(--theme-muted, #5b6478);
    --mkt-muted: var(--theme-muted, #5b6478);
    --mkt-faint: color-mix(in oklch, var(--theme-muted, #5b6478) 80%, transparent);
    --mkt-line: var(--theme-line, #d6dbe6);
    --mkt-line-2: var(--theme-line-strong, #b9c1d3);
    --mkt-glow: rgba(60, 100, 220, 0.12);
    --mkt-ring: rgba(0, 0, 0, 0.07);
    --mkt-search-rim: linear-gradient(180deg, var(--theme-line-strong, #b9c1d3), var(--theme-line, #d6dbe6));
    --mkt-search-bg: var(--theme-surface, #fff);
    --mkt-btn-bg: var(--theme-ink, #14213d);
    --mkt-btn-fg: #fff;
}

/* ===== Hero ===== */
.mkt-hero {
    position: relative; isolation: isolate; padding: 72px 24px 56px;
    display: flex; flex-direction: column; align-items: center; text-align: center;
}
.mkt-hero__glow {
    position: absolute; z-index: -1; left: 50%; top: -420px; transform: translateX(-50%); width: 1500px; height: 1000px; pointer-events: none;
    background: radial-gradient(ellipse 50% 50% at 50% 50%, var(--mkt-glow) 0%, rgba(255, 255, 255, 0.03) 42%, rgba(255, 255, 255, 0) 70%);
}
.mkt-hero__ring { position: absolute; z-index: -1; left: 50%; top: 48%; transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid var(--mkt-ring); pointer-events: none; }
.mkt-hero__ring--1 { width: 620px; height: 620px; }
.mkt-hero__ring--2 { width: 960px; height: 960px; opacity: .7; }
.mkt-hero__coin { position: absolute; z-index: -1; height: auto; pointer-events: none; user-select: none; animation: mktFloat 7s ease-in-out infinite; }
.mkt-hero__coin--a { inset-inline-start: 6%; top: 30px; width: clamp(110px, 11vw, 170px); transform: rotate(-14deg); }
.mkt-hero__coin--b { inset-inline-end: 5%; top: 150px; width: clamp(140px, 14vw, 210px); transform: rotate(10deg); filter: brightness(1.3) contrast(1.1); animation-duration: 8.5s; }

.mkt-hero__title { margin: 0; font-family: var(--mkt-display); font-size: clamp(52px, 8vw, 112px); line-height: .95; letter-spacing: -0.06em; font-weight: 500; color: var(--mkt-fg); }
.mkt-hero__line { display: block; }
.mkt-hero__line--dim { color: var(--mkt-dim); font-weight: 400; }
html[dir="rtl"] .mkt-hero__title { letter-spacing: -0.02em; line-height: 1.15; }

/* Search pill */
.mkt-search { position: relative; margin-top: 44px; width: 100%; max-width: 680px; border-radius: 999px; padding: 1px; background: var(--mkt-search-rim); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 1); }
.mkt-search__in { position: relative; display: flex; align-items: center; gap: 14px; height: 64px; padding-inline: 26px 8px; border-radius: 999px; background: var(--mkt-search-bg); }
.mkt-search__icon { flex-shrink: 0; font-size: 15px; color: var(--mkt-dim); }
.mkt-search__input {
    flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: none; color: var(--mkt-fg);
    font-family: var(--mkt-display); font-size: 17px; letter-spacing: -0.01em; -webkit-appearance: none; appearance: none;
}
.mkt-search__input::placeholder { color: var(--mkt-faint); opacity: 1; }
.mkt-search__input::-webkit-search-cancel-button, .mkt-search__input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.mkt-search:focus-within { background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.14) 50%, rgba(255, 255, 255, 0.3) 100%); }
.mkt-search__clear {
    flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--mkt-faint);
    display: flex; align-items: center; justify-content: center; cursor: pointer; transition: color .2s ease, background .2s ease;
}
.mkt-search__clear.hidden { display: none; }
.mkt-search__clear:hover { color: var(--mkt-fg); background: rgba(255, 255, 255, 0.06); }
.mkt-search__btn {
    flex-shrink: 0; height: 48px; padding: 0 24px; border-radius: 999px; border: 0; background: var(--mkt-btn-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9); color: var(--mkt-btn-fg); font-family: inherit; font-size: 14px; font-weight: 700;
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer; transition: filter .2s ease, transform .2s ease;
}
.mkt-search__btn:hover { filter: brightness(1.08); }
.mkt-search__btn:active { transform: scale(.97); }
.mkt-search__btn-ico { display: none; font-size: 14px; }
.mkt-search__btn:focus-visible, .mkt-search__clear:focus-visible { outline: 2px solid var(--mkt-fg) !important; outline-offset: 2px; }

/* Platform tabs under the search (desktop strip lives inside the hero) */
body.home-bw-theme .mkt-hero .dash-platform-wrap--desktop { margin: 28px 0 0; max-width: 100%; }
body.home-bw-theme .mkt-hero .dash-platform-wrap--desktop::before,
body.home-bw-theme .mkt-hero .dash-platform-wrap--desktop::after { display: none; }
body.home-bw-theme .mkt-hero .dash-platform-wrap--desktop .dash-platform-strip { flex-wrap: wrap; justify-content: center; gap: 6px; overflow: visible; padding: 0; }
body.home-bw-theme .mkt-hero .pill-btn {
    min-height: 0; padding: 9px 15px; gap: 9px; border: 0; border-radius: 999px; background: transparent;
    color: rgba(255, 255, 255, 0.5); font-family: 'DM Sans', system-ui, sans-serif; font-size: 13.5px; font-weight: 500; transition: all .25s ease;
}
body.home-bw-theme .mkt-hero .pill-btn:hover { color: #fff; background: transparent; }
body.home-bw-theme .mkt-hero .pill-btn.is-active,
body.home-bw-theme .mkt-hero .pill-btn.is-active:hover { background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: none; }
body.home-bw-theme .mkt-hero .pill-btn .pill-icon { font-size: 13px; }
body.home-bw-theme .mkt-hero .dash-platform-wrap--desktop .pill-btn .pill-icon,
body.home-bw-theme .mkt-hero .dash-platform-wrap--desktop .pill-btn .pill-label { color: inherit; background: transparent; border: 0; }
body.home-bw-theme .mkt-hero .dash-platform-wrap--desktop .pill-btn.is-active .pill-icon,
body.home-bw-theme .mkt-hero .dash-platform-wrap--desktop .pill-btn.is-active .pill-label { color: inherit; }
body.home-bw-theme .mkt-hero .pill-count { font-family: var(--mkt-mono); font-size: 10.5px; font-weight: 400; color: rgba(255, 255, 255, 0.28); }
body.home-bw-theme .mkt-hero .pill-btn.is-active .pill-count { color: rgba(255, 255, 255, 0.6); }
html[data-theme="light"] body.home-bw-theme .mkt-hero .pill-btn { color: var(--theme-muted); }
html[data-theme="light"] body.home-bw-theme .mkt-hero .pill-btn.is-active { background: var(--theme-surface-2); color: var(--theme-ink); }
html[data-theme="light"] body.home-bw-theme .mkt-hero .pill-count { color: var(--theme-muted); }

/* ===== Body layout ===== */
.mkt-body { position: relative; z-index: 2; max-width: 1560px; margin: 0 auto; padding: 0 32px 110px; }
.mkt-layout { gap: 28px; }

/* ===== Dark skin: sidebar, cards, pager ===== */
@media (min-width: 1024px) {
    html:not([data-theme="light"]) .mkt #filterSidebar {
        width: 270px; padding: 22px; border-radius: 20px; border: 1px solid var(--mkt-line);
        background: var(--mkt-panel-bg); box-sizing: border-box; top: 96px;
        max-height: calc(100vh - 120px); overflow-y: auto; scrollbar-width: thin;
    }
}
html:not([data-theme="light"]) .mkt #filterSidebar .bg-accent { display: none; }
html:not([data-theme="light"]) .mkt #filterSidebar .font-sans.uppercase,
html:not([data-theme="light"]) .mkt #filterSidebar .font-mono.uppercase {
    font-family: 'DM Sans', system-ui, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--mkt-faint);
}
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar .sidebar-radio,
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar .price-radio,
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar .subtype-radio {
    gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; background: transparent; transition: all .2s ease;
}
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar .subtype-radio { padding: 8px 10px; }
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar .sidebar-radio:hover,
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar .price-radio:hover,
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar .subtype-radio:hover { border-color: rgba(255, 255, 255, 0.14); background: transparent; }
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar .sidebar-radio:has(input:checked),
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar .price-radio:has(input:checked),
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar .subtype-radio:has(input:checked) {
    background: rgba(255, 255, 255, 0.05); border-color: var(--mkt-line-2); box-shadow: none;
}
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar .radio-label,
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar .sub-label { font-family: 'DM Sans', system-ui, sans-serif; font-size: 13.5px; font-weight: 500; color: var(--mkt-dim); }
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar .sub-label { font-size: 12.5px; }
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar :has(input:checked) > .radio-label,
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar :has(input:checked) > .sub-label { color: #fff; }
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar .radio-dot,
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar .sub-dot {
    width: 14px; height: 14px; border: 1px solid rgba(255, 255, 255, 0.25); background: transparent; box-shadow: none;
}
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar :has(input:checked) > .radio-dot,
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar :has(input:checked) > .sub-dot { border-color: #fff; background: transparent; }
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar .radio-inner,
html:not([data-theme="light"]) body.home-bw-theme .mkt #filterSidebar .sub-inner { width: 6px; height: 6px; background: #fff; }
html:not([data-theme="light"]) .mkt .price-counter { border-radius: 12px; border-color: rgba(255, 255, 255, 0.1); background: transparent; }
html:not([data-theme="light"]) .mkt .price-counter:focus-within { border-color: rgba(255, 255, 255, 0.3); }
html:not([data-theme="light"]) .mkt #resetFilters {
    height: 42px; padding: 0; border-radius: 12px; border: 1px solid var(--mkt-line); color: var(--mkt-muted); font-size: 13px; font-weight: 500;
}
html:not([data-theme="light"]) .mkt #resetFilters:hover { color: #fff; border-color: rgba(255, 255, 255, 0.2); }

/* Result bar */
html:not([data-theme="light"]) .mkt #resultCountDesktop { color: #fff; font-weight: 600; }
html:not([data-theme="light"]) .mkt .dash-add-all-btn:not(.dash-add-all-btn--mobile) {
    height: 38px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--mkt-line-2); background: transparent;
    color: rgba(255, 255, 255, 0.8); font-size: 12.5px; font-weight: 600;
}

/* Cards */
.mkt #productGrid:not(.dash-compact-grid) { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
html:not([data-theme="light"]) .mkt #dashListingPanel:not(.is-compact-view) .dash-card {
    display: flex; flex-direction: column; gap: 18px; padding: 18px; border-radius: 20px; border: 1px solid var(--mkt-line);
    background: var(--mkt-card-bg); box-shadow: none; transition: border-color .3s ease, transform .3s var(--mkt-ease);
}
html:not([data-theme="light"]) .mkt #dashListingPanel:not(.is-compact-view) .dash-card::after { display: none; }
html:not([data-theme="light"]) .mkt .dash-card__head { display: flex; align-items: center; justify-content: space-between; margin: 0; }
html:not([data-theme="light"]) .mkt .dash-card__platform {
    padding: 5px 11px; border-radius: 999px; border: 1px solid var(--mkt-line-2); background: transparent;
    font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, 0.75); letter-spacing: 0; text-transform: none;
}
html:not([data-theme="light"]) .mkt .dash-card__icon-btn {
    width: 32px; height: 32px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.1); background: transparent; color: rgba(255, 255, 255, 0.6);
}
html:not([data-theme="light"]) .mkt .dash-card__icon-btn:hover { border-color: rgba(255, 255, 255, 0.35); color: #fff; background: transparent; }
html:not([data-theme="light"]) .mkt .dash-card__identity { margin: 0; }
html:not([data-theme="light"]) .mkt .dash-card__user-link { display: flex; align-items: center; gap: 12px; min-width: 0; }
html:not([data-theme="light"]) .mkt .dash-card__avatar {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--mkt-line-2); background: rgba(255, 255, 255, 0.03);
    display: flex; align-items: center; justify-content: center; font-size: 14px; color: #fff;
}
html:not([data-theme="light"]) .mkt #dashListingPanel:not(.is-compact-view) .dash-card__handle {
    min-width: 0; font-family: var(--mkt-display); font-size: 24px; font-weight: 600; letter-spacing: -0.04em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff;
}
html:not([data-theme="light"]) .mkt .dash-card__divider { height: 1px; margin: 0 0 -14px; background: rgba(255, 255, 255, 0.07); }
html:not([data-theme="light"]) .mkt .dash-card__fee-label {
    margin: 0 0 -14px; font-family: var(--mkt-mono); font-size: 9.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--mkt-faint);
}
html:not([data-theme="light"]) .mkt #dashListingPanel:not(.is-compact-view) .dash-card__price-row .dash-card__price {
    font-family: var(--mkt-display); font-size: 22px; font-weight: 600; letter-spacing: -0.03em; color: #fff;
}
html:not([data-theme="light"]) .mkt #dashListingPanel:not(.is-compact-view) .dash-product-buy {
    display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; margin: 0; border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.03); color: #fff; font-size: 13.5px; font-weight: 600; transition: all .25s ease;
}
html:not([data-theme="light"]) .mkt #dashListingPanel:not(.is-compact-view) .dash-product-buy:hover { background: #fff; color: #0a0a0a; border-color: #fff; }
@media (hover: hover) {
    html:not([data-theme="light"]) .mkt #dashListingPanel:not(.is-compact-view) .dash-card:hover { border-color: rgba(255, 255, 255, 0.22); transform: translateY(-3px); }
}

/* Pager */
.mkt #pagination { gap: 6px; margin-top: 18px; }
html:not([data-theme="light"]) .mkt #pagination .pg-btn {
    min-width: 42px; width: auto; height: 42px; padding: 0 8px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent; color: rgba(255, 255, 255, 0.6); font-family: var(--mkt-mono); font-size: 12px; font-weight: 600;
}
html:not([data-theme="light"]) .mkt #pagination .pg-btn:hover { border-color: rgba(255, 255, 255, 0.35); color: #fff; }
html:not([data-theme="light"]) .mkt #pagination .pg-btn.bg-accent,
html:not([data-theme="light"]) .mkt #pagination .pg-btn.is-active { background: #fff; border-color: #fff; color: #0a0a0a; }

@keyframes mktFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
