/* Product Categories */

.custom-product-categories {
    display: block;
    width: 100%;
}

.custom-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: block;
    width: 100%;
}

.custom-category-item {
    margin: 0; /* Remove margin */
    text-align: left;
    display: flex;
    align-items: center;
    padding: 10px 0; /* Add padding for better spacing */
    border-top: 1px solid #ddd; /* Add border top */
    position: relative; /* Ensure toggle icon is positioned correctly */
    cursor: pointer; /* Make the entire item clickable */
    flex-direction: column; /* Stack items vertically */
}

.custom-category-item > a {
    display: flex;
    align-items: center;
    width: 100%;
}

.custom-category-item img {
    width: 24px; /* Set width */
    height: auto; /* Set height to auto */
    margin-right: 10px; /* Space between image and text */
}

.custom-category-item .custom-category-name {
    font-size: 14px;
    color: #333;
    text-decoration: none;
    text-transform: uppercase; /* Make text uppercase */
    font-weight: 700; /* Bold text */
    height: 36px; /* Set height */
    line-height: 36px; /* Vertically center text */
    flex-grow: 1; /* Allow text to take available space */
}

.custom-category-item .toggle-icon {
    font-size: 16px;
    margin-left: auto; /* Push the icon to the right */
}

.custom-category-item .toggle-icon.open {
    transform: rotate(180deg); /* Rotate arrow up when open */
}

.custom-subcategories-list {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%; /* Ensure it takes full width */
}

.custom-subcategory-item {
    padding: 5px 20px;
}

.custom-subcategory-item .custom-subcategory-title {
    display: block;
    background-color: #eb0029;
    color: white;
    font-weight: 600 !important;
    padding: 5px 10px;
    margin-top: 10px;
    text-decoration: none;
}

.custom-sub-subcategories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.custom-sub-subcategory-item {
    padding: 5px 20px;
    border-bottom: 1px solid #eb0029;
}

.custom-sub-subcategory-item:last-child {
    border-bottom: none; /* Remove bottom border for the last item */
}

.custom-sub-subcategory-item .custom-sub-subcategory-name {
    font-size: 14px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    line-height: 20px;
}

/* Ensure alignment of image and text in parent category */
.custom-category-item > a > img {
    margin-right: 10px;
}

.custom-category-item > a > span {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

/* Adjustments to keep subcategories below the parent category */
.custom-category-item {
    display: block;
}

.custom-category-item .toggle-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}