.g3-categories-widget {
    padding: 10px;
    font-family: inherit;
}

.g3-categories-widget .g3-categories-widget {
    padding: 0 10px;
}

.g3-categories-widget h5 {
    margin-bottom: 1em;
    font-size: 1.2em;
    font-weight: 600;
}

.g3-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.g3-categories-list ul {
    list-style: none;
    margin: 0.5em 0;
}

.g3-categories-list li {
    position: relative;
    margin: 0.5em 0;
    line-height: 1.4;
}

.g3-categories-list a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.g3-categories-list a:hover {
    color: #007bff;
}

.category-toggle {
    position: absolute;
    left: -1.5em;
    top: 0.2em;
    width: 1em;
    height: 1em;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.category-toggle::before {
    content: '+';
    display: block;
    text-align: center;
    line-height: 1em;
    font-size: 0.9em;
    color: #666;
}

.category-toggle.active {
    background: #f5f5f5;
}

.category-toggle.active::before {
    content: '−';
}

.g3-categories-list .children {
    display: none;
    transition: all 0.3s ease;
    margin-left: 1em !important;
    margin-bottom: .5em !important;
}

.g3-categories-list .children li {
    margin-top: .25em !important;
}

.g3-categories-list .children.active {
    display: block;
}

@media (max-width: 768px) {
    .g3-categories-widget {
        padding: 15px;
    }
    
    .g3-categories-list ul {
        padding-left: 1.2em;
    }
}