/* Lista podzespołów (np. /p/lista/procesory/) — nowy szablon. */
.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 20px 56px;
}

/* ---- nagłówek strony ---- */
.crumbs {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-3);
    display: flex;
    gap: 8px;
}

.crumbs a {
    color: var(--text-3);
    text-decoration: none;
}

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

.head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 18px 40px;
    margin-top: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.head h1 {
    font-size: 27px;
    font-weight: 650;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 11px;
}

.head h1 i {
    width: 4px;
    height: 26px;
    border-radius: 2px;
    background: var(--dot, var(--c2));
}

.head p {
    color: var(--text-2);
    font-size: 13.5px;
    max-width: 56ch;
    margin-top: 6px;
}

.facts {
    display: flex;
    gap: 30px;
    margin-left: auto;
}

.facts div {
    display: flex;
    flex-direction: column;
}

.facts b {
    font-family: var(--mono);
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}

.facts span {
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-3);
}

.facts .down b {
    color: var(--ok);
}

.cols {
    display: grid;
    grid-template-columns: 254px 1fr;
    gap: 22px;
    margin-top: 22px;
    align-items: start;
}

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

/* ---- filtry ---- */
.side {
    position: sticky;
    top: 78px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
}

@media (max-width: 940px) {
    .side {
        position: static;
    }
}

.side-h {
    display: flex;
    align-items: center;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
}

.side-h h2 {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--text-2);
}

.side-h .reset {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-3);
    background: none;
    border: 0;
    cursor: pointer;
    padding: 2px;
    text-decoration: none;
}

.side-h .reset:hover {
    color: var(--bad);
}

.side-b {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fset {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fset > label,
.fset > span.lab {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-3);
}

.fset input[type="text"],
.fset input[type="search"],
.fset input[type="number"] {
    font: inherit;
    font-size: 13px;
    padding: 7px 9px;
    width: 100%;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 6px;
}

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

.range {
    display: grid;
    grid-template-columns: 1fr 10px 1fr;
    align-items: center;
    gap: 6px;
}

.range span {
    text-align: center;
    color: var(--text-3);
}

/* chip = <label> z ukrytym checkboxem, żeby filtry działały bez JS */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.chip {
    font-size: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    cursor: pointer;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text-2);
    font-family: var(--sans);
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip:hover {
    border-color: var(--line-strong);
    color: var(--text);
}

.chip:has(input:checked) {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

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

.swrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-2);
}

.swrow input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.swrow .track {
    width: 34px;
    height: 20px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    flex: none;
    position: relative;
}

.swrow .track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-3);
    transition: transform .15s, background .15s;
}

.swrow input:checked + .track {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.swrow input:checked + .track::after {
    transform: translateX(14px);
    background: var(--accent);
}

.swrow input:focus-visible + .track {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.side-b .apply {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 9px 12px;
    border-radius: 7px;
    cursor: pointer;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
}

.side-b .apply:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

/* JS włączony? przycisk „Szukaj” jest zbędny — filtry submitują się same */
.js .side-b .apply {
    display: none;
}

/* ---- lista ---- */
.bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-bottom: 12px;
}

.bar .count {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
}

.bar .count b {
    color: var(--text);
}

.sortbox {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sortbox label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-3);
}

.sortbox select {
    font: inherit;
    font-size: 13px;
    padding: 6px 9px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    cursor: pointer;
}

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

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

.list-h,
.prod {
    display: grid;
    grid-template-columns: 1fr 132px 118px 116px;
    gap: 16px;
    align-items: center;
    padding: 0 16px;
}

.list-h {
    padding-top: 9px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}

.list-h span {
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-3);
}

.list-h .r {
    text-align: right;
}

.prod {
    padding-top: 13px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--line);
}

.prod:last-child {
    border-bottom: 0;
}

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

.prod.out {
    opacity: .55;
}

.pname {
    min-width: 0;
}

.pname .t {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pname a {
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    font-weight: 550;
}

.pname a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.badge {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .09em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid var(--line-strong);
    color: var(--text-2);
}

.badge.intel {
    border-color: var(--c1);
    color: var(--c1);
}

.badge.amd {
    border-color: var(--c6);
    color: var(--c6);
}

.badge.gone {
    border-color: var(--line-strong);
    color: var(--text-3);
}

.pname .spec {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-3);
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

.trend {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trend svg {
    width: 100%;
    height: 30px;
    display: block;
    overflow: visible;
}

.trend .nodata {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-3);
    height: 30px;
    display: flex;
    align-items: center;
}

.diffs {
    display: flex;
    gap: 9px;
    font-family: var(--mono);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    color: var(--text-3);
}

.diffs i {
    font-style: normal;
}

.up {
    color: var(--bad);
}

.dn {
    color: var(--ok);
}

.pprice {
    text-align: right;
}

.pprice b {
    font-family: var(--mono);
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}

.pprice b small {
    font-size: 11px;
    color: var(--text-3);
}

.pprice span {
    display: block;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-3);
    margin-top: 2px;
}

.worth {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.worth .m {
    height: 6px;
    border-radius: 3px;
    background: var(--surface-2);
    overflow: hidden;
}

.worth .m i {
    display: block;
    height: 100%;
}

.worth .v {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.g {
    color: var(--ok);
}

.a {
    color: var(--warn);
}

.r {
    color: var(--bad);
}

.n {
    color: var(--text-3);
}

.worth .m i.g {
    background: var(--ok);
}

.worth .m i.a {
    background: var(--warn);
}

.worth .m i.r {
    background: var(--bad);
}

.worth .m i.n {
    background: var(--line-strong);
}

.empty {
    padding: 44px 16px;
    text-align: center;
    color: var(--text-2);
    font-size: 13.5px;
}

.empty b {
    display: block;
    color: var(--text);
    font-size: 15px;
    margin-bottom: 5px;
}

.seo {
    margin-top: 24px;
    color: var(--text-2);
    font-size: 13.5px;
    line-height: 1.7;
    max-width: 78ch;
}

.seo h2 {
    font-size: 15px;
    color: var(--text);
    margin-bottom: 8px;
    font-weight: 600;
}

.seo h3 {
    font-size: 13.5px;
    color: var(--text);
    margin: 16px 0 4px;
    font-weight: 600;
}

.seo p + h3 {
    margin-top: 18px;
}

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

@media (max-width: 720px) {
    .list-h {
        display: none;
    }

    .prod {
        grid-template-columns: 1fr 116px;
        gap: 10px 14px;
    }

    .prod .trend {
        grid-column: 1 / -1;
        order: 4;
    }

    .prod .worth {
        grid-column: 1 / -1;
        order: 5;
    }

    .facts {
        margin-left: 0;
        flex-wrap: wrap;
        gap: 18px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
