/* ============================
   BASE WRAPPER
============================ */
.cpf-wrapper {
    width: 100%;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

.cpf-row {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

/* ============================
   ROW 1
============================ */
.cpf-row-1 {
    justify-content: space-between;
    padding: 0 12px;
    border: 1px solid #232F68;
    border-radius: 10px;
    background: #fff;
}

.cpf-row-1 .cpf-hide-filter { width: 12%; }
.cpf-row-1 .cpf-sorting { 
    width: 20%; 
    text-align: center;
    border-left: 1px solid #232F68;
    border-right: 1px solid #232F68;
}
.cpf-row-1 .cpf-view { width: 68%; text-align: right; }

/* Buttons */
.cpf-btn, .cpf-icon {
    padding: 8px 12px;
    border: 1px solid #232F68;
    background: #fff;
    cursor: pointer;
    border-radius: 6px;
    font-size: 16px;
    color: #232F68;
}

.cpf-btn { border: none; }
.cpf-btn.active { color: #232F68; }
.cpf-icon.active { background: #232F68; color: #fff; }

/* ============================
   ROW 2
============================ */
.cpf-row-2 .cpf-count {
    text-align: right;
    font-size: 18px;
    color: #232F68;
}

/* ============================
   LAYOUT
============================ */
.cpf-row-3 {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.cpf-cats { width: 30%; }
.cpf-products { width: 70%; }

/* ============================
   CATEGORY + LATEST
============================ */
.cpf-cats-inner,
.cpf-latest-products {
    border: 1px solid #232F68;
    border-radius: 10px;
    padding: 10px;
    background: #dee0e8;
}

.cpf-cat-list,
.cpf-child-list,
.cpf-latest-products ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ============================
   PRODUCT GRID (LOCKED 4 COLUMN)
============================ */
.cpf-products-grid {
    display: flex;
    flex-wrap: wrap;
    margin: -8px;
}

/* FORCE 4 PER ROW */
.cpf-product {
    flex: 0 0 25%;
    padding: 8px;
    box-sizing: border-box;
}

/* PRODUCT CARD */
.cpf-product-box {
    border: 1px solid #232F68;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
}

/* IMAGE */
.cpf-product-thumb {
    position: relative;
}

.cpf-product-thumb img {
    width: 100%;
    display: block;
    transition: 0.25s ease;
}

/* IMAGE HOVER */
.cpf-product-thumb:hover img {
    filter: blur(3px) brightness(0.9);
    transform: scale(1.02);
}

/* READ MORE BUTTON (FIXED VISIBILITY) */
.cpf-readmore {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    text-align: center;
    background: #232F68;
    color: #fff !important;
    padding: 8px;
    opacity: 0;
    transition: 0.2s ease;
    text-decoration: none;
    z-index: 10;
}

.cpf-product-thumb:hover .cpf-readmore {
    opacity: 1;
    color: #fff !important;
}

/* TITLE */
.cpf-product-title {
    margin: 10px 0 0;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    color: #232F68;
}

/* PRICE */
.cpf-product-price {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #232F68;
    margin: 6px 0 12px;
}

/* ============================
   LIST VIEW (ISOLATED)
============================ */
.cpf-products-grid.cpf-list-view .cpf-product {
    flex: 0 0 100%;
    display: flex;
    padding: 8px;
}

.cpf-products-grid.cpf-list-view .cpf-product-box {
    display: flex;
    width: 100%;
}

.cpf-products-grid.cpf-list-view .cpf-product-thumb {
    width: 30%;
}

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 900px) {
    .cpf-product {
        flex: 0 0 33.333%;
    }
}

@media (max-width: 600px) {
    .cpf-row-3 {
        flex-direction: column;
    }

    .cpf-cats,
    .cpf-latest-products {
        display: none;
    }

    .cpf-product {
        flex: 0 0 100%;
    }
}