/* =========================================================
   PRODUCT CATALOGUE
========================================================= */

.cpc-product-catalogue {
    width: 100%;
    padding: 40px 20px 70px;
    background: #fff;
    box-sizing: border-box;
}

.cpc-product-catalogue *,
.cpc-product-catalogue *::before,
.cpc-product-catalogue *::after {
    box-sizing: border-box;
}

.cpc-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}


/* =========================================================
   LAYOUT
========================================================= */

.cpc-catalogue-layout {
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
    gap: 35px;
    align-items: start;
}


/* =========================================================
   SIDEBAR
========================================================= */

.cpc-sidebar {
    width: 100%;
}

.cpc-filter-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 25px;
    border-bottom: 1px solid #ddd;
}

.cpc-filter-heading h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
    color: #111;
}

.cpc-filter-heading button {
    border: 0;
    padding: 0;
    background: transparent;
    color: #777;
    text-decoration: underline;
    cursor: pointer;
    font-size: 13px;
}


.cpc-filter-section {
    padding: 25px 0;
    border-bottom: 1px solid #ddd;
}

.cpc-filter-section h3 {
    margin: 0 0 18px;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
    color: #111;
}


/* =========================================================
   CHECKBOXES
========================================================= */

.cpc-checkbox-label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 13px;
    cursor: pointer;
    font-size: 15px;
    color: #444;
    line-height: 1.4;
}

.cpc-checkbox-label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cpc-custom-checkbox {
    position: relative;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1px solid #d2d2d2;
    border-radius: 4px;
    background: #fff;
}

.cpc-checkbox-label input:checked + .cpc-custom-checkbox {
    background: #111;
    border-color: #111;
}

.cpc-checkbox-label input:checked + .cpc-custom-checkbox::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 9px;
    left: 6px;
    top: 2px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}


/* =========================================================
   COLLECTION BUTTONS
========================================================= */

.cpc-collection-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cpc-collection-filter {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid #d7d7d7;
    border-radius: 30px;
    background: #fff;
    color: #444;
    text-align: left;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cpc-collection-filter:hover,
.cpc-collection-filter.active {
    background: #ff951c;
    border-color: #ff951c;
    color: #fff;
}


/* =========================================================
   PRODUCTS AREA
========================================================= */

.cpc-products-area {
    position: relative;
    min-width: 0;
}

.cpc-products-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 40px;
    margin-bottom: 12px;
}

.cpc-product-count {
    color: #777;
    font-size: 13px;
}


/* =========================================================
   PRODUCT GRID
========================================================= */

.cpc-products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 20px;
}


/* =========================================================
   PRODUCT CARD
========================================================= */

.cpc-product-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dedede;
    border-radius: 15px;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cpc-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
}


.cpc-product-image-link {
    display: block;
    width: 100%;
    aspect-ratio: 1.35 / 1;
    overflow: hidden;
    padding: 10px;
}

.cpc-product-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 11px;
}


.cpc-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #f4f4f4;
    color: #777;
}


.cpc-product-content {
    padding: 0 10px 15px;
}


.cpc-product-title {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 500;
}

.cpc-product-title a {
    color: #111;
    text-decoration: none;
}


.cpc-product-description {
    min-height: 64px;
    margin-bottom: 10px;
    color: #808080;
    font-size: 13px;
    line-height: 1.45;
    overflow: hidden;
}

.cpc-product-description p {
    margin: 0;
}


.cpc-know-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0068c9;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.cpc-know-more:hover {
    text-decoration: underline;
}

.cpc-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    border: 1px solid #0068c9;
    border-radius: 50%;
    font-size: 12px;
}


/* =========================================================
   PAGINATION
========================================================= */

#cpc-pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 34px;
}

.cpc-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}


.cpc-page-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #e0e0e0;
    border-radius: 4px;

    background: #fff;
    color: #333;

    font-size: 13px;
    cursor: pointer;

    transition: all 0.2s ease;
}


.cpc-page-btn:hover:not(:disabled),
.cpc-page-btn.active {
    border-color: #ff951c;
    background: #fff;
    color: #ff951c;
}


.cpc-page-btn.disabled,
.cpc-page-btn:disabled {
    background: #eee;
    color: #aaa;
    cursor: not-allowed;
}


.cpc-page-dots {
    width: 25px;
    text-align: center;
    color: #555;
}


/* =========================================================
   LOADER
========================================================= */

.cpc-loader {
    position: absolute;
    inset: 50px 0 0;
    z-index: 10;

    display: none;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.7);
}

.cpc-loader.loading {
    display: flex;
}


.cpc-spinner {
    width: 35px;
    height: 35px;

    border: 3px solid #ddd;
    border-top-color: #ff951c;

    border-radius: 50%;

    animation: cpc-spin 0.7s linear infinite;
}

@keyframes cpc-spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   NO PRODUCTS
========================================================= */

.cpc-no-products {
    grid-column: 1 / -1;
    padding: 70px 20px;
    text-align: center;
}

.cpc-no-products h3 {
    margin: 0 0 8px;
    color: #222;
    font-size: 22px;
}

.cpc-no-products p {
    margin: 0;
    color: #777;
}


/* =========================================================
   MOBILE FILTER BUTTON
========================================================= */

.cpc-mobile-filter-btn {
    display: none;
}


/* Mobile Header inside Sidebar */

.cpc-mobile-filter-header {
    display: none;
}


/* =========================================================
   TABLET
   768px - 1024px
========================================================= */

@media (max-width: 1024px) {

    .cpc-product-catalogue {
        padding-left: 25px;
        padding-right: 25px;
    }

    .cpc-catalogue-layout {
        grid-template-columns: 210px minmax(0, 1fr);
        gap: 25px;
    }

    .cpc-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .cpc-product-title {
        font-size: 18px;
    }

}


/* =========================================================
   MOBILE
   <= 767px
========================================================= */

@media (max-width: 767px) {

    .cpc-product-catalogue {
        padding: 25px 15px 50px;
    }


    /* Mobile Filter Button */

    .cpc-mobile-filter-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;

        margin-bottom: 20px;
        padding: 12px 20px;

        border: 1px solid #ddd;
        border-radius: 8px;

        background: #fff;
        color: #111;

        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
    }


    /* Layout */

    .cpc-catalogue-layout {
        display: block;
    }


    /* Sidebar */

    .cpc-sidebar {
        position: fixed;

        top: 0;
        left: -100%;

        z-index: 99999;

        width: min(330px, 88vw);
        height: 100vh;

        overflow-y: auto;

        padding: 20px;

        background: #fff;

        box-shadow: 5px 0 20px rgba(0, 0, 0, 0.15);

        transition: left 0.3s ease;
    }


    .cpc-sidebar.open {
        left: 0;
    }


    .cpc-filter-overlay {
        position: fixed;
        inset: 0;

        z-index: 99998;

        display: none;

        background: rgba(0, 0, 0, 0.45);
    }

    .cpc-filter-overlay.open {
        display: block;
    }


    /* Mobile Sidebar Header */

    .cpc-mobile-filter-header {
        display: flex;
        align-items: center;
        justify-content: space-between;

        padding-bottom: 20px;
        margin-bottom: 20px;

        border-bottom: 1px solid #ddd;
    }

    .cpc-mobile-filter-header h2 {
        margin: 0;
        font-size: 24px;
    }

    .cpc-close-filter {
        width: 35px;
        height: 35px;

        border: 0;
        border-radius: 50%;

        background: #f3f3f3;
        color: #222;

        font-size: 24px;
        line-height: 1;

        cursor: pointer;
    }


    /* Hide duplicate desktop filter heading */

    .cpc-filter-heading {
        padding-bottom: 15px;
    }


    /* Products */

    .cpc-products-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }


    .cpc-product-image-link {
        aspect-ratio: 1.5 / 1;
    }


    .cpc-product-content {
        padding: 0 14px 16px;
    }


    .cpc-product-title {
        font-size: 19px;
    }


    .cpc-product-description {
        min-height: auto;
        font-size: 14px;
    }


    .cpc-products-top {
        margin-bottom: 15px;
    }


    .cpc-product-count {
        font-size: 12px;
    }


    /* Pagination */

    .cpc-pagination {
        gap: 5px;
    }

    .cpc-page-btn {
        width: 34px;
        height: 34px;
    }

}


/* =========================================================
   SMALL MOBILE
   <= 480px
========================================================= */

@media (max-width: 480px) {

    .cpc-product-catalogue {
        padding-left: 12px;
        padding-right: 12px;
    }

    .cpc-product-title {
        font-size: 18px;
    }

    .cpc-product-description {
        font-size: 13px;
    }

    .cpc-page-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

}

/* =========================================================
   DESKTOP PRODUCT CATALOGUE FIX
========================================================= */

@media (min-width: 768px) {

    .cpc-product-catalogue .cpc-container {
        width: 100% !important;
        max-width: 1200px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .cpc-product-catalogue .cpc-catalogue-layout {
        display: grid !important;
        grid-template-columns: 245px minmax(0, 1fr) !important;
        column-gap: 35px !important;
        width: 100% !important;
        align-items: start !important;
    }

    .cpc-product-catalogue .cpc-sidebar {
        display: block !important;
        width: 245px !important;
        min-width: 245px !important;
        max-width: 245px !important;
        grid-column: 1 !important;
    }

    .cpc-product-catalogue .cpc-products-area {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        grid-column: 2 !important;
    }

    .cpc-product-catalogue .cpc-products-grid {
        display: grid !important;
        width: 100% !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 22px 20px !important;
    }

    .cpc-product-catalogue .cpc-product-card {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

}

/* =========================================================
   FILTER OVERLAY
========================================================= */

/* Desktop + Tablet */
.cpc-filter-overlay {
    display: none !important;
}


/* Mobile only */
@media (max-width: 767px) {

    .cpc-filter-overlay {
        position: fixed !important;

        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;

        z-index: 99998 !important;

        display: none !important;

        width: 100vw !important;
        height: 100vh !important;

        margin: 0 !important;
        padding: 0 !important;

        background: rgba(0, 0, 0, 0.45) !important;
    }

    .cpc-filter-overlay.open {
        display: block !important;
    }

}