/* Categories Page Styles */
#categories-page {
    min-height: calc(100vh - 200px);
}

.filter-btn { 
    transition: all 0.2s; 
    border-radius: 0.5rem;
}
.filter-btn:hover { 
    background-color: #f1f5f9; 
    color: #ea580c; 
    padding-left: 1.25rem; 
    transform: translateX(4px);
}
.filter-btn.active { 
    background-color: #ea580c; 
    color: white; 
    padding-left: 1.25rem; 
    border-color: #ea580c;
    box-shadow: 0 2px 4px rgba(234, 88, 12, 0.3);
}
.filter-btn.active:hover { 
    background-color: #c2410c; 
    color: white; 
}

/* Subcategory Dropdown Styles */
.category-dropdown-wrapper {
    position: relative;
}
.subcategories-dropdown {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease-out,
                transform 0.3s ease-out;
}
.subcategories-dropdown.expanded {
    max-height: 1000px;
    opacity: 1;
    transform: translateY(0);
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s ease-in 0.1s,
                transform 0.4s ease-in 0.1s;
}
.filter-btn-subcategory {
    transition: all 0.2s;
}
.filter-btn-subcategory:hover {
    background-color: #f1f5f9;
    transform: translateX(4px);
}
.filter-btn-subcategory.active-subcategory {
    background-color: #ea580c;
    color: white;
    font-weight: bold;
}
.filter-btn-subcategory.active-subcategory:hover {
    background-color: #c2410c;
    color: white;
}

.product-card { 
    transition: all 0.3s ease; 
    border-radius: 0.875rem;
    overflow: hidden;
    min-height: 340px;
}
.product-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 12px 24px rgba(0,0,0,0.12); 
    border-color: #ea580c;
}

/* Bara de derulare proprie, pentru coloana laterala */
.sidebar-scroll::-webkit-scrollbar { width: 6px; }
.sidebar-scroll::-webkit-scrollbar-track { background: #f1f5f1; border-radius: 3px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.sidebar-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Card Image Hover Effects */
.product-card img {
    transition: transform 0.5s ease;
}
.product-card:hover img {
    transform: scale(1.05);
}

/* Filter Section Styles */
.filter-section {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1.5rem;
}

.filter-section:last-child {
    border-bottom: none;
}

/* Mobile Bottom Bar Styles */
#mobile-bottom-bar button {
    transition: all 0.2s;
}
#mobile-bottom-bar button.active-tab {
    background-color: #ea580c;
    color: white;
}
#mobile-bottom-bar button:not(.active-tab) {
    color: #64748b;
}
#mobile-bottom-bar button:not(.active-tab):hover {
    background-color: #f1f5f9;
}

/* Mobile Panel Styles */
#mobile-categories-panel,
#mobile-filters-panel {
    top: 0;
}
#mobile-categories-panel.show,
#mobile-filters-panel.show {
    transform: translateY(0);
}

/* Subcategory Card Styles - Horizontal on Mobile, Vertical on Desktop */
#public-categories-grid .product-card {
    min-height: auto;
}
@media (min-width: 1024px) {
    #public-categories-grid .product-card {
        min-height: 340px;
    }
}

/* Responsive Improvements */
@media (max-width: 1024px) {
    #public-categories-main {
        padding-bottom: 80px; /* Space for mobile bottom bar */
    }
}

@media (max-width: 768px) {
    #categories-page-header h1 {
        font-size: 2rem;
    }

    #public-categories-grid,
    #products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    #public-categories-sidebar {
        margin-bottom: 2rem;
    }

    #products-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}
