.sub-categories {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.sub-categories.open {
    max-height: 500px;
    transition: max-height 0.5s ease-in;
}

.category-arrow {
    transition: transform 0.3s ease;
    width: 16px;
    pointer-events: none;
}

.category-arrow.open {
    transform: rotate(90deg);
}

.mobile-category-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    pointer-events: none;
}

.mobile-category-panel.open {
    display: block;
    pointer-events: auto;
}

.mobile-category-content {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: white;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    max-width: 320px;
    width: 85vw;
    pointer-events: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-category-panel.open .mobile-category-content {
    transform: translateX(0);
}

.mobile-category-content a,
.mobile-category-content button {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0, 76, 69, 0.2);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    z-index: 1;
}

.mobile-category-content button *,
.mobile-category-content a span,
.mobile-category-content a i {
    pointer-events: none;
}

.desktop-sidebar button *,
.desktop-sidebar a span,
.desktop-sidebar a i {
    pointer-events: none;
}

.desktop-sidebar button,
.desktop-sidebar a {
    cursor: pointer;
}

.mobile-category-content a,
.desktop-sidebar a {
    display: block;
    width: 100%;
}

.mobile-category-content a:active,
.mobile-category-content button:active {
    opacity: 0.8;
    transform: scale(0.98);
}

.touch-manipulation {
    touch-action: manipulation;
}

/* Custom Scrollbar for Sidebar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #004c45;
}

@media (min-width: 1024px) {
    .mobile-category-panel {
        display: none !important;
    }

    .mobile-filter-btn {
        display: none !important;
    }
}

@media (max-width: 1023px) {
    .desktop-sidebar {
        display: none !important;
    }

    .categories-sidebar {
        position: relative !important;
        top: 0 !important;
    }
}