.pf-category-page{
    --pf-blue:#2563eb;
    --pf-blue-dark:#1d4ed8;
    --pf-ink:#0f172a;
    --pf-muted:#64748b;
    --pf-line:#e2e8f0;
    --pf-soft:#f8fafc;
    padding-bottom:64px;
}

.pf-category-page .sr-only{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    padding:0!important;
    margin:-1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    white-space:nowrap!important;
    border:0!important;
}

.pf-category-page .breadcrumb{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:8px;
    margin-bottom:12px;
    color:var(--pf-muted);
    font-size:13px;
}

.pf-category-page .breadcrumb a{
    color:var(--pf-blue);
    font-weight:700;
    text-decoration:none;
}

.pf-category-page .breadcrumb a:hover{
    color:var(--pf-blue-dark);
    text-decoration:underline;
}

.pf-category-page .breadcrumb .sep{
    color:#94a3b8;
}

.pf-category-page .breadcrumb .current{
    color:#334155;
    font-weight:750;
}

.pf-category-page .category-header{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:16px;
    margin-bottom:20px;
}

.pf-category-page .category-title{
    color:var(--pf-ink);
    font-size:clamp(25px,3vw,36px);
    line-height:1.12;
    letter-spacing:-.025em;
}

.pf-category-page .category-layout{
    display:grid;
    grid-template-columns:minmax(250px,280px) minmax(0,1fr);
    gap:24px;
    align-items:start;
}

.pf-category-page .sidebar{
    position:sticky;
    top:82px;
    z-index:10;
    padding:20px;
    border:1px solid rgba(148,163,184,.18);
    border-radius:22px;
    background:rgba(255,255,255,.96);
    box-shadow:0 16px 38px rgba(15,23,42,.08);
}

.pf-filter-panel-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:4px;
}

.pf-filter-panel-title{
    margin:0;
    color:var(--pf-ink);
    font-size:17px;
    font-weight:900;
}

.pf-filter-close{
    display:none;
    width:40px;
    height:40px;
    align-items:center;
    justify-content:center;
    border:1px solid var(--pf-line);
    border-radius:12px;
    color:var(--pf-ink);
    background:#fff;
    font-size:22px;
    cursor:pointer;
}

.pf-category-page .subcat-list{
    display:flex;
    flex-direction:column;
    gap:5px;
}

.pf-category-page .subcat-list a{
    display:flex;
    align-items:center;
    min-height:38px;
    padding:8px 10px;
    border-radius:11px;
    color:#1e40af;
    background:#f8faff;
    font-size:13px;
    font-weight:750;
    text-decoration:none;
    transition:background .18s ease,color .18s ease;
}

.pf-category-page .subcat-list a:hover{
    color:var(--pf-blue-dark);
    background:#eff6ff;
}

.pf-filter-divider{
    height:1px;
    margin:18px 0;
    background:var(--pf-line);
}

.pf-category-page .filter-block{
    margin-top:14px;
}

.pf-category-page .filter-block:first-child{
    margin-top:0;
}

.pf-category-page .filter-block label{
    display:block;
    margin-bottom:6px;
    color:#334155;
    font-size:12px;
    line-height:1.25;
    font-weight:800;
}

.pf-category-page .filter-block input,
.pf-category-page .filter-block select,
.pf-sort-select{
    width:100%;
    height:44px;
    margin:0;
    padding:0 12px;
    border:1px solid #cbd5e1;
    border-radius:12px;
    outline:none;
    color:var(--pf-ink);
    background:#fff;
    font-size:13px;
    transition:border-color .18s ease,box-shadow .18s ease;
}

.pf-category-page .filter-block input:focus,
.pf-category-page .filter-block select:focus,
.pf-sort-select:focus{
    border-color:var(--pf-blue);
    box-shadow:0 0 0 4px rgba(37,99,235,.11);
}

.pf-filter-price-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-top:14px;
}

.pf-category-page .pf-filter-price-row .filter-block,
.pf-category-page .pf-filter-price-row .filter-block:first-child{
    margin-top:0;
}

.pf-filter-actions{
    display:grid;
    gap:9px;
    margin-top:18px;
}

.pf-filter-apply,
.pf-filter-reset{
    width:100%;
    min-height:44px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:10px 14px;
    border-radius:12px;
    font-size:13px;
    font-weight:850;
    text-decoration:none;
    cursor:pointer;
}

.pf-filter-apply{
    border:0;
    color:#fff;
    background:linear-gradient(135deg,var(--pf-blue),#4f46e5);
    box-shadow:0 10px 22px rgba(37,99,235,.22);
}

.pf-filter-reset{
    border:1px solid var(--pf-line);
    color:#475569;
    background:#fff;
}

.pf-catalog-section{
    min-width:0;
}

.pf-catalog-toolbar{
    scroll-margin-top:88px;
    min-height:68px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-bottom:16px;
    padding:11px 13px 11px 16px;
    border:1px solid rgba(148,163,184,.20);
    border-radius:18px;
    background:rgba(255,255,255,.95);
    box-shadow:0 10px 28px rgba(15,23,42,.06);
}

.pf-catalog-summary{
    min-width:0;
    color:var(--pf-ink);
    font-size:14px;
    line-height:1.35;
}

.pf-catalog-summary strong{
    font-weight:950;
}

.pf-catalog-loaded{
    display:block;
    margin-top:2px;
    color:var(--pf-muted);
    font-size:11px;
    font-weight:650;
}

.pf-catalog-tools{
    display:flex;
    align-items:center;
    gap:9px;
}

.pf-filter-open{
    display:none;
    min-height:44px;
    align-items:center;
    justify-content:center;
    gap:7px;
    padding:9px 12px;
    border:1px solid var(--pf-line);
    border-radius:12px;
    color:#1e3a8a;
    background:#fff;
    font-size:12px;
    font-weight:850;
    cursor:pointer;
}

.pf-filter-count{
    min-width:20px;
    height:20px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 5px;
    border-radius:999px;
    color:#fff;
    background:var(--pf-blue);
    font-size:10px;
    font-weight:900;
}

.pf-filter-count[hidden]{
    display:none;
}

.pf-sort-wrap{
    position:relative;
}

.pf-sort-select{
    min-width:190px;
    padding-right:34px;
    font-weight:750;
    cursor:pointer;
}

.pf-category-page .pf-product-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
}

.pf-empty-state{
    padding:42px 22px;
    border:1px dashed #cbd5e1;
    border-radius:20px;
    text-align:center;
    color:var(--pf-muted);
    background:#fff;
}

.pf-empty-state strong{
    display:block;
    margin-bottom:5px;
    color:var(--pf-ink);
    font-size:16px;
}

.pf-empty-state[hidden]{
    display:none;
}

.pf-catalog-progress{
    min-height:76px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:10px;
    margin-top:18px;
}

.pf-load-more{
    min-height:44px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    padding:10px 18px;
    border:1px solid #bfdbfe;
    border-radius:14px;
    color:#1d4ed8;
    background:#eff6ff;
    font-size:13px;
    font-weight:850;
    cursor:pointer;
    transition:transform .18s ease,box-shadow .18s ease;
}

.pf-load-more:hover{
    transform:translateY(-1px);
    box-shadow:0 10px 22px rgba(37,99,235,.13);
}

.pf-load-more[hidden]{
    display:none;
}

.pf-load-spinner{
    width:24px;
    height:24px;
    display:none;
    border:3px solid #dbeafe;
    border-top-color:var(--pf-blue);
    border-radius:50%;
    animation:pf-category-spin .75s linear infinite;
}

.pf-catalog-progress.is-loading .pf-load-spinner{
    display:block;
}

.pf-catalog-progress.is-loading .pf-load-more{
    opacity:.65;
    pointer-events:none;
}

.pf-catalog-end{
    color:var(--pf-muted);
    font-size:12px;
    font-weight:700;
    text-align:center;
}

.pf-catalog-end[hidden]{
    display:none;
}

.pf-catalog-error{
    width:100%;
    max-width:520px;
    padding:10px 13px;
    border:1px solid #fecaca;
    border-radius:12px;
    color:#991b1b;
    background:#fef2f2;
    font-size:12px;
    font-weight:700;
    text-align:center;
}

.pf-catalog-error[hidden]{
    display:none;
}

.pf-infinite-sentinel{
    width:100%;
    height:1px;
}

.pf-filter-backdrop{
    display:none;
}

.pf-no-scroll{
    overflow:hidden;
}

.pf-category-page .pagination{
    justify-content:center;
}

@keyframes pf-category-spin{
    to{transform:rotate(360deg)}
}

@media(max-width:1180px){
    .pf-category-page .pf-product-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:900px){
    .pf-category-page .category-layout{
        grid-template-columns:1fr;
        gap:14px;
    }

    .pf-category-page .sidebar{
        position:fixed;
        inset:auto 0 0 0;
        z-index:1102;
        width:100%;
        max-height:calc(100dvh - 42px);
        overflow-y:auto;
        overscroll-behavior:contain;
        padding:18px 18px calc(18px + env(safe-area-inset-bottom));
        border-radius:24px 24px 0 0;
        transform:translateY(105%);
        opacity:0;
        visibility:hidden;
        transition:transform .25s ease,opacity .2s ease,visibility .25s;
    }

    .pf-category-page .sidebar.is-open{
        transform:translateY(0);
        opacity:1;
        visibility:visible;
    }

    .pf-filter-close,
    .pf-filter-open{
        display:inline-flex;
    }

    .pf-filter-backdrop{
        position:fixed;
        inset:0;
        z-index:1101;
        display:block;
        opacity:0;
        visibility:hidden;
        background:rgba(15,23,42,.52);
        backdrop-filter:blur(3px);
        transition:opacity .2s ease,visibility .2s ease;
    }

    .pf-filter-backdrop.is-open{
        opacity:1;
        visibility:visible;
    }

    .pf-catalog-toolbar{
        position:sticky;
        top:8px;
        z-index:30;
    }
}

@media(max-width:700px){
    .pf-category-page{
        padding-bottom:42px;
    }

    .pf-category-page .category-header{
        margin-bottom:14px;
    }

    .pf-category-page .category-title{
        font-size:26px;
    }

    .pf-catalog-toolbar{
        min-height:0;
        display:grid;
        grid-template-columns:minmax(0,1fr) auto;
        padding:10px;
        border-radius:16px;
    }

    .pf-catalog-tools{
        grid-column:1 / -1;
        display:grid;
        grid-template-columns:auto minmax(0,1fr);
        width:100%;
    }

    .pf-sort-select{
        min-width:0;
        width:100%;
    }

    .pf-category-page .pf-product-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:10px;
    }

    .pf-catalog-progress{
        min-height:66px;
    }
}

@media(max-width:370px){
    .pf-filter-price-row{
        grid-template-columns:1fr;
    }

    .pf-category-page .pf-product-grid{
        grid-template-columns:1fr;
    }
}

@media(prefers-reduced-motion:reduce){
    .pf-category-page *,
    .pf-filter-backdrop{
        scroll-behavior:auto!important;
        transition:none!important;
        animation-duration:.01ms!important;
        animation-iteration-count:1!important;
    }
}
