.mdf-category-sidebar {
    width: 100%;
    border: 1px solid #e3e9e4;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(30, 60, 36, .07);
    overflow: hidden;
}

@media (min-width: 992px) {
    /* The theme's sticky plugin writes an exact pixel width inline. Do not override it. */
    .pin-wrapper > .mdf-category-sidebar[style*="position: fixed"] {
        top: 100px !important;
        max-height: calc(100vh - 112px);
        z-index: 20;
        overflow: hidden;
    }
    .pin-wrapper > .mdf-category-sidebar[style*="position: fixed"] .mdf-category-list {
        max-height: calc(100vh - 250px);
    }
}
.mdf-category-widget { margin: 0; }
.mdf-category-widget .widget-title {
    margin: 0;
    padding: 0;
    border: 0;
}
.mdf-category-widget .widget-title a {
    display: flex;
    min-height: 58px;
    padding: 16px 18px;
    align-items: center;
    justify-content: space-between;
    color: #26372a;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}
.mdf-category-widget .widget-title a:hover { color: #2d8040; }
.mdf-category-toggle {
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s ease;
}
.mdf-category-widget .widget-title a[aria-expanded="false"] .mdf-category-toggle {
    transform: rotate(-45deg);
}
.mdf-category-widget .widget-body { padding: 0 12px 14px; }
.mdf-category-search {
    position: relative;
    margin: 0 2px 12px;
}
.mdf-category-search .fa-search {
    position: absolute;
    top: 50%;
    left: 13px;
    color: #738077;
    font-size: 13px;
    transform: translateY(-50%);
    pointer-events: none;
}
.mdf-category-search input {
    width: 100%;
    height: 42px;
    padding: 8px 34px 8px 36px;
    color: #26312a;
    background: #f6f8f6;
    border: 1px solid #dfe5e0;
    border-radius: 10px;
    font-size: 13px;
}
.mdf-category-search input:focus {
    background: #fff;
    border-color: #4da25d;
    box-shadow: 0 0 0 3px rgba(77, 162, 93, .14);
    outline: 0;
}
.mdf-category-search-clear {
    display: none;
    position: absolute;
    top: 50%;
    right: 6px;
    width: 30px;
    height: 30px;
    padding: 0;
    color: #67716a;
    background: transparent;
    border: 0;
    border-radius: 50%;
    font-size: 21px;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
}
.mdf-category-search.has-value .mdf-category-search-clear { display: block; }
.mdf-category-list {
    max-height: min(68vh, 720px);
    margin: 0;
    padding: 0 3px 0 2px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: #bdd4c2 transparent;
    scrollbar-width: thin;
}
.mdf-category-list > .mdf-category-item { margin: 2px 0; }
.mdf-category-link {
    display: flex !important;
    min-height: 42px;
    padding: 9px 9px 9px 11px !important;
    align-items: center;
    gap: 8px;
    color: #3d4740 !important;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none;
    transition: background-color .16s ease, color .16s ease;
}
.mdf-category-link:hover {
    color: #246f35 !important;
    background: #f0f7f1;
}
.mdf-category-name { flex: 1; }
.mdf-category-count {
    min-width: 27px;
    padding: 3px 6px;
    flex: 0 0 auto;
    color: #69736c;
    background: #edf1ee;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}
.mdf-category-link.active {
    color: #1f6e32 !important;
    background: #e8f5eb;
    box-shadow: inset 3px 0 #45a258;
    font-weight: 700;
}
.mdf-category-link.active .mdf-category-count {
    color: #fff;
    background: #3d914e;
}
.mdf-subcategory-list {
    margin: 3px 0 7px 15px !important;
    padding: 3px 0 3px 8px !important;
    border-left: 1px solid #dce8de;
}
.mdf-subcategory-link {
    min-height: 37px;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
    font-size: 12px;
}
.mdf-category-empty {
    margin: 18px 8px;
    color: #6c746e;
    font-size: 12px;
    text-align: center;
}
@media (max-width: 991px) {
    .mdf-category-sidebar {
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .mdf-category-list { max-height: calc(100vh - 190px); }
    .mdf-category-widget .widget-title a { min-height: 54px; }
    .mdf-category-link { min-height: 46px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .mdf-category-toggle,
    .mdf-category-link { transition: none; }
}
