.wc-cps-container {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0px;
}

.wc-cps-subcategories {
    flex: 0 0 30%;
    position: sticky;
    top: 20px;
    height: fit-content;
    background: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wc-cps-subcategory {
    padding: 12px 15px;
    margin-bottom: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    background: white;
}

.wc-cps-subcategory:hover {
    background: #eee;
}

.wc-cps-subcategory.active {
    background: #007bff;
    color: white;
}

.wc-cps-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* .wc-cps-products-section.active {
    display: grid;
} */

.wc-cps-product {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.wc-cps-product:hover {
    transform: translateY(-5px);
}

.wc-cps-product a {
    text-decoration: none !important;
    color: inherit;
}

.wc-cps-product img {
    width: 100%;
    height: auto;
    display: block;
}

.wc-cps-product h3 {
    margin: 10px;
    font-size: 16px;
    line-height: 1.4;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wc-cps-product .wc-cps-product-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px;
}

.wc-cps-product .price {
    color: #007bff;
    font-weight: bold;
}

.wc-cps-product .stock-status {
    background-color: lightgreen;
    padding: 2px 10px;
    border-radius: 8px;
}

.wc-cps-product .stock-status.out-of-stock {
    background-color: red;
}

.wc-cps-section-header {
    margin-top: 20px;
}

.load-more {
    grid-column: 1 / -1;
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 20px;
}

.load-more:hover {
    background: #0056b3;
}

/* Loading indicator */
.wc-cps-products-section.loading {
    position: relative;
    min-height: 200px;
    display: grid !important;
}

.wc-cps-products-section.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Scroll trigger indicator */
.wc-cps-products-section.scroll-trigger {
    height: 100px;
    display: block !important;
}

@media only screen and (max-width: 768px) {
    .wc-cps-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .wc-cps-product .wc-cps-product-flex {
        display: grid;
    }
}