/* nimrodcore — catalog explorer (resources/views/partials/catalog.blade.php) */

.cx {
    --nav-h: 80px;
    --cx-red: var(--violet, #8b6cf7);
    position: relative;
    margin-top: 0;
    height: calc(var(--n) * 42vh + 100vh);
}
.cx-sticky {
    position: sticky; top: var(--nav-h);
    height: calc(100vh - var(--nav-h)); height: calc(100svh - var(--nav-h));
    display: grid; grid-template-columns: 300px minmax(0, 1fr) 28px; gap: 32px;
    padding: 28px 0;
}

/* ---------- list ---------- */
.cx-side { display: flex; flex-direction: column; min-height: 0; }
.cx-side-head {
    display: flex; justify-content: space-between; align-items: baseline;
    font-family: var(--text); font-size: 14px; color: var(--muted);
    padding-bottom: 14px;
}
.cx-count { font-family: var(--mono); font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.cx-count b { color: var(--fg); font-weight: 500; font-size: 16px; }

.cx-search {
    display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px;
    border: 1px solid var(--line-s); border-radius: 99px; color: var(--dim); background: rgba(241,239,246,.04);
    transition: border-color .15s;
}
.cx-search:focus-within { border-color: var(--fg); color: var(--fg); }
.cx-search input {
    flex: 1; min-width: 0; background: none; border: 0; outline: none;
    font: 14px var(--text); color: var(--fg); caret-color: var(--cx-red);
}
.cx-search input::placeholder { color: var(--dim); }

.cx-list {
    list-style: none; margin-top: 10px; flex: 1; min-height: 0; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: var(--line-s) transparent;
}
.cx-list button {
    position: relative; width: 100%;
    display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 12px;
    padding: 9px 14px 9px 16px; text-align: left; border-radius: 12px;
    font-family: var(--text);
    color: var(--muted);
    transition: color .15s, background .15s;
}
.cx-list button::before {
    content: ''; position: absolute; left: 4px; top: 12px; bottom: 12px; width: 2px; border-radius: 2px;
    background: var(--cx-red); transform: scaleY(0); transition: transform .2s cubic-bezier(.23,1,.32,1);
}
.cx-list button:hover { color: var(--fg); background: rgba(241,239,246,.04); }
.cx-list button.on { color: var(--fg); background: rgba(241,239,246,.07); }
.cx-list button.on::before { transform: scaleY(1); }
.cx-list button:focus-visible { outline: 1px solid var(--fg); outline-offset: -1px; }
.cx-li-name { font-size: 15px; }
.cx-li-game { grid-column: 1; font-size: 12px; color: var(--dim); }
.cx-li-price { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-family: var(--mono); font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.cx-list button.on .cx-li-price { color: var(--fg); }
.cx-list li[hidden] { display: none; }
.cx-empty { margin-top: 16px; font: 13px/1.5 var(--text); color: var(--dim); }

/* ---------- panel ---------- */
.cx-stage { position: relative; min-height: 0; }
.cx-panel {
    position: absolute; inset: 0;
    display: grid; grid-template-rows: auto 1fr auto;
    padding: 36px 44px;
    border: 1px solid var(--line); border-radius: var(--radius, 22px);
    background:
        radial-gradient(120% 90% at 85% 0%, rgba(139, 108, 247, .16), transparent 55%),
        var(--surface, rgba(17, 14, 28, .72));
    opacity: 0; visibility: hidden;
    transition: opacity .22s cubic-bezier(.23,1,.32,1), visibility 0s linear .22s;
}
.cx-panel.on { opacity: 1; visibility: visible; transition: opacity .22s cubic-bezier(.23,1,.32,1), visibility 0s; }
.cx-panel-top { display: flex; justify-content: space-between; align-items: center; }
.cx-access {
    font: 13px var(--text); color: var(--fg);
    padding: 5px 12px; border: 1px solid var(--line-s); border-radius: 99px;
}
.cx-access-slotted, .cx-access-private { border-color: rgba(245, 184, 81, .45); color: #F5B851; }
.cx-idx { font-family: var(--mono); font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }

.cx-panel-body {
    align-self: center;
    display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr); gap: 56px; align-items: end;
}
.cx-panel-body > div:first-child { container-type: inline-size; min-width: 0; }
.cx-spec { border-top: 1px solid var(--line); }
.cx-spec div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.cx-spec dt { font: 13px var(--text); color: var(--dim); }
.cx-spec dd { font: 13px var(--text); color: var(--fg); text-align: right; }
@media (max-width: 1280px) { .cx-panel-body { grid-template-columns: 1fr; gap: 28px; } .cx-spec { max-width: 420px; } }
.cx-game { font: 18px var(--text); color: var(--muted); }
.cx-name {
    font-family: 'Course', var(--display); font-weight: 700;
    font-size: clamp(36px, 11cqi, 128px); line-height: .9; letter-spacing: -0.01em; white-space: nowrap;
    color: var(--fg); margin: 10px 0 22px;
}
.cx-desc { font: 17px/1.55 var(--text); color: var(--muted); max-width: 52ch; }
.cx-feats { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.cx-feats li {
    font: 13px var(--text); color: var(--fg);
    padding: 6px 12px; border-radius: 99px; background: rgba(241,239,246,.07);
}
.cx-panel-foot { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.cx-price { font-family: var(--display); font-weight: 500; font-size: 44px; line-height: 1; letter-spacing: -0.04em; color: var(--fg); font-variant-numeric: tabular-nums; }
.cx-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* entrance: the incoming panel's body rises a few px */
.cx-panel .cx-panel-body { transform: translateY(10px); transition: transform .3s cubic-bezier(.23,1,.32,1); }
.cx-panel.on .cx-panel-body { transform: none; }

/* ---------- ruler (progress) ---------- */
.cx-ruler { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; padding: 6px 0; }
.cx-ruler span { display: block; width: 10px; height: 1px; background: var(--line-s); transition: width .2s cubic-bezier(.23,1,.32,1), background .2s; }
.cx-ruler span:nth-child(5n + 1) { width: 16px; }
.cx-ruler span.on { width: 28px; background: var(--cx-red); height: 2px; }

/* ---------- mobile: no scroll-driven; chips + panel ---------- */
@media (max-width: 1000px) {
    .cx { height: auto; margin-top: 40px; }
    .cx-sticky { position: static; height: auto; display: block; padding: 0; }
    .cx-side-head, .cx-ruler { display: none; }
    .cx-list { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; margin: 12px 0 16px; padding-bottom: 6px; }
    .cx-list button { display: block; white-space: nowrap; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; }
    .cx-list button::before { display: none; }
    .cx-list button.on { border-color: var(--cx-red); }
    .cx-li-game, .cx-li-price { display: none; }
    .cx-stage { display: grid; }
    .cx-panel { position: relative; inset: auto; grid-area: 1 / 1; padding: 24px; min-height: 440px; }
}

@media (prefers-reduced-motion: reduce) {
    .cx-panel, .cx-panel .cx-panel-body, .cx-list button::before, .cx-ruler span { transition: none !important; }
}
