/* Demo category sidebar — frontend prototype only. Primary green: #20A86B */

.lf-demo-cat [x-cloak] {
    display: none !important;
}

.lf-demo-cat {
    --demo-green: #20A86B;
    --demo-green-bg: #EAF8F1;
    --demo-border: #E5E5E5;
    --demo-text: #222222;
    --demo-sub: #555555;
    width: 236px;
    min-width: 236px;
    flex-shrink: 0;
    align-self: stretch;
}

.lf-demo-cat__mobile-toggle {
    display: none;
}

.lf-demo-cat__backdrop {
    display: none;
}

.lf-demo-cat__panel {
    background: #fff;
    border: 1px solid var(--demo-border);
    border-radius: 4px;
    overflow: hidden;
    height: 100%;
    max-height: var(--lf-hero-h, 400px);
    display: flex;
    flex-direction: column;
}

.lf-demo-cat__header {
    background: var(--demo-green);
    color: #fff;
    height: 38px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.lf-demo-cat__close {
    display: none;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    padding: 0;
}

.lf-demo-cat__nav {
    overflow-y: auto;
    flex: 1;
}

.lf-demo-cat__nav::-webkit-scrollbar {
    width: 4px;
}

.lf-demo-cat__nav::-webkit-scrollbar-thumb {
    background: #d8d8d8;
    border-radius: 4px;
}

.lf-demo-cat__list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.lf-demo-cat__list--sub,
.lf-demo-cat__list--nested {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0;
    transform: translateY(-4px);
    transition: max-height 0.25s ease, opacity 0.22s ease, transform 0.22s ease;
}

.lf-demo-cat__list--sub.is-open {
    max-height: 420px;
    opacity: 1;
    transform: translateY(0);
}

.lf-demo-cat__list--nested.is-open {
    max-height: 280px;
    opacity: 1;
    transform: translateY(0);
}

.lf-demo-cat__row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18px;
    align-items: center;
    column-gap: 6px;
    background: transparent;
    border: 0;
    text-align: left;
    color: var(--demo-text);
    cursor: pointer;
    transition: background 0.22s ease, color 0.22s ease;
}

.lf-demo-cat__row--main {
    min-height: 34px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
}

.lf-demo-cat__link {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    column-gap: 6px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.lf-demo-cat__link--sub {
    grid-template-columns: 18px minmax(0, 1fr);
}

.lf-demo-cat__toggle {
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

@media screen and (min-width: 992px) {
    .lf-demo-cat__toggle {
        pointer-events: none;
    }

    .lf-demo-cat__item:hover > .lf-demo-cat__row--main {
        background: #f7fbf8;
        color: var(--demo-green);
    }
}

.lf-demo-cat__row--sub {
    min-height: 28px;
    padding: 0 8px 0 30px;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.35;
    color: var(--demo-sub);
    position: relative;
    grid-template-columns: minmax(0, 1fr) 18px;
}

.lf-demo-cat__row--sub::before {
    content: "";
    position: absolute;
    left: 24px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: #dcdcdc;
}

.lf-demo-cat__row--nested {
    min-height: 26px;
    padding: 0 8px 0 46px;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.35;
    color: var(--demo-sub);
    cursor: pointer;
    grid-template-columns: 18px minmax(0, 1fr);
    column-gap: 6px;
}

.lf-demo-cat__icon {
    width: 22px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #3a3a3a;
    flex-shrink: 0;
    transition: transform 0.22s ease, color 0.22s ease;
}

.lf-demo-cat__icon--sm {
    width: 18px;
    height: 16px;
    font-size: 13px;
    color: #20A86B;
}

.lf-demo-cat__name {
    min-width: 0;
    white-space: normal;
    overflow: visible;
    line-height: 1.3;
    color: inherit;
    text-decoration: none;
}

.lf-demo-cat__count {
    display: none !important;
}

.lf-demo-cat__chevron {
    width: 18px;
    font-size: 14px;
    color: #888;
    text-align: center;
    transition: transform 0.22s ease, color 0.22s ease;
}

.lf-demo-cat__row--main:hover {
    background: #f7fbf8;
    color: var(--demo-green);
}

.lf-demo-cat__row--main:hover .lf-demo-cat__icon {
    color: var(--demo-green);
    transform: scale(1.08);
}

.lf-demo-cat__row--main:hover .lf-demo-cat__chevron {
    color: var(--demo-green);
    transform: translateX(2px);
}

.lf-demo-cat__row--sub:hover,
.lf-demo-cat__row--nested:hover {
    color: var(--demo-green);
    background: #f9fdfb;
}

.lf-demo-cat__item.is-open > .lf-demo-cat__row--main {
    background: var(--demo-green-bg);
    color: var(--demo-green);
}

.lf-demo-cat__item.is-open > .lf-demo-cat__row--main .lf-demo-cat__icon,
.lf-demo-cat__item.is-open > .lf-demo-cat__row--main .lf-demo-cat__chevron {
    color: var(--demo-green);
}

.lf-demo-cat__item.is-open > .lf-demo-cat__row--main .lf-demo-cat__chevron,
.lf-demo-cat__item.is-open > .lf-demo-cat__row--sub .lf-demo-cat__chevron {
    transform: rotate(90deg);
}

.lf-demo-cat__item.is-open > .lf-demo-cat__row--sub {
    color: var(--demo-green);
    background: #f3faf6;
}

.lf-demo-cat__empty {
    padding: 12px;
    font-size: 12px;
    color: #888;
}

.lf-demo-cat__view-all {
    display: block;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--demo-green);
    padding: 8px 10px;
    border-top: 1px solid var(--demo-border);
    flex-shrink: 0;
}

.lf-demo-cat__view-all:hover {
    background: var(--demo-green-bg);
}

@media screen and (max-width: 991px) {
    .lf-demo-cat {
        width: 100%;
        min-width: 0;
        margin-bottom: 10px;
    }

    .lf-demo-cat__mobile-toggle {
        display: flex;
        width: 100%;
        align-items: center;
        gap: 8px;
        height: 40px;
        padding: 0 12px;
        background: var(--demo-green);
        color: #fff;
        border: 0;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.06em;
    }

    .lf-demo-cat__mobile-toggle .la-angle-down {
        margin-left: auto;
        transition: transform 0.22s ease;
    }

    .lf-demo-cat__mobile-toggle .la-angle-down.is-open {
        transform: rotate(180deg);
    }

    .lf-demo-cat__backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1040;
    }

    .lf-demo-cat__panel {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(280px, 88vw);
        max-width: 100%;
        max-height: none;
        height: 100%;
        border-radius: 0;
        z-index: 1050;
        transform: translateX(-105%);
        transition: transform 0.3s ease;
    }

    .lf-demo-cat__panel.is-open {
        transform: translateX(0);
    }

    .lf-demo-cat__close {
        display: inline-flex;
    }
}

@media screen and (max-width: 375px) {
    .lf-demo-cat__mobile-toggle {
        height: 38px;
        font-size: 11px;
        padding: 0 10px;
    }

    .lf-demo-cat__panel {
        width: min(260px, 92vw);
    }
}
