/* Pagination Styling */

.apf-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
    padding: 20px;
    flex-wrap: wrap;
}

.apf-page-numbers {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.apf-page-btn {
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.apf-page-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.apf-page-btn.active {
    background: #333;
    color: #fff;
    border-color: #333;
    cursor: default;
}

.apf-page-btn.apf-prev,
.apf-page-btn.apf-next {
    padding: 8px 16px;
    font-weight: 600;
}

.apf-page-dots {
    padding: 0 5px;
    color: #999;
    font-weight: bold;
}

/* Filter counts styling */
.apf-count {
    font-size: 0.85em;
    color: #666;
    font-weight: normal;
    margin-left: 4px;
}

.apf-size-label .apf-count {
    display: inline-block;
    margin-left: 4px;
}

.apf-category-label .apf-count {
    display: inline;
}

/* No products state */
.apf-no-products {
    opacity: 0.4;
}

.apf-no-products input {
    cursor: not-allowed;
}

.apf-no-products .apf-size-label,
.apf-no-products .apf-category-label {
    text-decoration: line-through;
    color: #999;
}

/* WooCommerce Pagination - FORCE VISIBLE & Match Flatsome Theme */
.woocommerce-pagination,
nav.woocommerce-pagination {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    margin: 30px 0 !important;
    text-align: center !important;
    clear: both !important;
}

/* Flatsome nav-pagination styling */
.woocommerce-pagination ul.nav-pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 5px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-wrap: wrap !important;
}

.woocommerce-pagination ul.nav-pagination li {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Flatsome page-number styling - Let theme CSS handle most, just ensure visibility */
.woocommerce-pagination .page-number {
    display: inline-block !important;
    text-decoration: none !important;
}

/* Icon arrows in prev/next buttons */
.woocommerce-pagination .page-number i {
    display: inline-block !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .apf-pagination {
        gap: 5px;
        padding: 15px;
    }
    
    .apf-page-btn {
        min-width: 35px;
        height: 35px;
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .apf-page-btn.apf-prev,
    .apf-page-btn.apf-next {
        padding: 6px 12px;
    }
    
    .apf-page-numbers {
        gap: 3px;
    }
    
    /* WooCommerce pagination on mobile - FORCE VISIBLE */
    .woocommerce-pagination {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin: 20px 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .woocommerce-pagination ul.nav-pagination {
        gap: 3px !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    .woocommerce-pagination .page-number {
        display: inline-block !important;
        font-size: 14px !important;
    }
}

/* Extra small mobile screens - make pagination even more visible */
@media (max-width: 480px) {
    .woocommerce-pagination {
        padding: 10px 0 !important;
        background: rgba(255,255,255,0.05) !important;
    }
    
    .woocommerce-pagination ul.nav-pagination {
        padding: 10px 0 !important;
    }
    
    .woocommerce-pagination .page-number {
        min-width: 35px !important;
        min-height: 35px !important;
        line-height: 35px !important;
    }
}
