/* Make category section higher than price */
.wpc-filters-section-637 {
    position: relative;
    z-index: 9999;
}

/* Keep price filter below */
.wpc-filters-section-638 {
    position: relative;
    z-index: 1;
}

/* Dropdown itself */
.wpc-filter-product_cat ul {
    position: absolute;
    z-index: 99999;
}

.wpc-filter-content.wpc-filter-product_cat {
    position: relative;
    z-index: 9999;
    width: 100%;
}

/* Dropdown header */
.wpc-filter-content.wpc-filter-product_cat::before {
    border-radius: 15px;
    content: "Select Category";
    display: block;
    padding: 12px 15px;
    background: inherit;   /* use theme background */
    color: inherit;        /* use theme text color */
    cursor: pointer;
    font-size: 14px;
    border: 1px solid rgba(255,255,255,0.2); /* subtle border for dark themes */
}

.wpc-filter-content.wpc-filter-product_cat::after {
    content: "⌄";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
}

/* Hide list by default */
.wpc-filter-content.wpc-filter-product_cat ul {
    display: none;
    position: absolute;
    margin-top: 0;
    top: 100%;
    left: 0;
    padding: 5px 0;
    width: 100%;
    background: black;   /* keep theme */
    color: inherit;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 99999;
}

/* Show dropdown */
.wpc-filter-content.wpc-filter-product_cat.active ul {
      display: block;
}

/* Items */
.wpc-filter-content.wpc-filter-product_cat li {
    padding: 10px 15px;
    padding-left: 15px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.wpc-filter-content.wpc-filter-product_cat li:hover {
    background: rgba(255,255,255,0.1); /* subtle hover for dark UI */
}

/* Checkbox spacing only */
.wpc-filter-content.wpc-filter-product_cat input[type="checkbox"] {
    margin-right: 8px;
}