/* ===== FILTRI CATEGORIA ===== */
.cpg-filters{
    display:flex !important;
    flex-wrap:wrap !important;
    justify-content:center !important;
    align-items:center !important;
    gap:1rem;
    margin-bottom:2.5rem;
    text-align:center !important;
    width:100% !important;
}
.cpg-filters .cpg-filter{
    padding:0.75rem 1.75rem !important;
    border-radius:30px !important;
    border:2px solid #000 !important;
    background:#fff !important;
    background-color:#fff !important;
    color:#000 !important;
    font-size:1rem !important;
    font-weight:600 !important;
    cursor:pointer !important;
    transition:all .3s ease !important;
    text-decoration:none !important;
    line-height:normal !important;
    box-shadow:none !important;
}
.cpg-filters .cpg-filter:hover{
    background:#000 !important;
    background-color:#000 !important;
    color:#fff !important;
    transform:translateY(-2px) !important;
    box-shadow:0 4px 12px rgba(0,0,0,.2) !important;
}
.cpg-filters .cpg-filter.active{
    background:#000 !important;
    background-color:#000 !important;
    color:#fff !important;
}

/* ===== GRIGLIA 4×2 ===== */
.cpg-gallery{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:2rem;
    justify-items:center;
}
.cpg-item{
    position:relative;
    overflow:hidden;
    aspect-ratio:3/4;
    width:100%;
    border:4px solid #000;
    background:#000;
    transition:transform .35s,box-shadow .35s;
    box-shadow:0 4px 14px rgba(0,0,0,.25);
}
.cpg-item img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.cpg-item:hover{
    transform:translateY(-6px) scale(1.02);
    box-shadow:0 8px 24px rgba(0,0,0,.35);
}

/* ===== PAGINAZIONE ===== */
.cpg-pagination{
    margin:2.5rem auto 0;
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    gap:.75rem;
}
.cpg-pagination button{
    width:40px;
    height:40px;
    border-radius:50%;
    border:none;
    cursor:pointer;
    background:#d1d1d1;
    color:#000;
    font-size:1rem;
    font-weight:600;
    display:flex;                 /* centra anche le icone */
    align-items:center;
    justify-content:center;
    transition:background .25s,color .25s;
}
.cpg-pagination button i{         /* dimensione icone Remix */
    font-size:20px;
    line-height:1;
    pointer-events:none;
}
.cpg-pagination button:hover,
.cpg-pagination button[aria-current="page"]{
    background:#000;
    color:#fff;
}

/* ===== LIGHT-BOX ===== */
.cpg-lightbox{
    position:fixed;
    inset:0;
    display:none;                 /* forzato flex via JS */
    justify-content:center;
    align-items:center;
    background:rgba(0,0,0,.9);
    z-index:9999;
}
.cpg-lightbox img{
    max-width:90%;
    max-height:90%;
    box-shadow:0 0 24px rgba(0,0,0,.8);
}
.cpg-lightbox .cpg-close{
    position:absolute;
    top:20px;
    right:24px;
    width:48px;
    height:48px;
    border-radius:50%;
    background:#000;
    color:#fff;
    font-size:1.5rem;
    line-height:48px;
    text-align:center;
    cursor:pointer;
    transition:background .25s;
}
.cpg-lightbox .cpg-close:hover{ background:#444; }

body.cpg-no-scroll{ overflow:hidden; }
