/* Layout container */
.app-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    gap: 1.5rem;
}

/* Sidebar (Desktop) */
.sidebar {
    width: 250px;
    flex-shrink: 0;
    display: none;
    /* Mobile first: will be overridden by media query for desktop block, 
       but we want it visible as a nav bar on mobile too. */
}

.sidebar-sticky {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.sidebar h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.category-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cat-btn {
    text-align: left;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #666;
    transition: all 0.2s;
    width: 100%;
}

.cat-btn:hover {
    background: #f3f4f6;
    color: var(--primary-color);
}

.cat-btn.active {
    background: #e0f2fe;
    color: var(--primary-color);
    font-weight: 600;
}

/* Main Content Wrapper */
.main-content-wrapper {
    flex: 1;
    width: 100%;
}

/* Search Bar Adjustments handled in shop.css */


/* Desktop Layout */
@media (min-width: 768px) {
    .sidebar {
        display: block;
    }
}

/* Mobile Sidebar */
@media (max-width: 767px) {
    .app-container {
        flex-direction: column;
        padding: 0.5rem;
        gap: 0;
    }

    .sidebar {
        display: block !important;
        width: 100%;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid #eee;
        padding-bottom: 0;
        background: white;
        position: sticky;
        top: 116px;
        /* Header 60 + Search 56 */
        z-index: 80;
    }

    .sidebar h3 {
        display: none !important;
    }

    .sidebar-sticky {
        position: static;
        max-height: auto;
    }

    .category-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 8px 12px;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        /* Compact gap */
        scrollbar-width: none;
    }

    .category-nav::-webkit-scrollbar {
        display: none;
    }

    .cat-btn {
        width: auto;
        white-space: nowrap;
        background: white;
        border: 1px solid #e5e7eb;
        padding: 6px 14px;
        border-radius: 20px;
        flex-shrink: 0;
        font-size: 0.85rem;
        font-weight: 500;
        margin-bottom: 0;
        color: var(--text-color);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        /* Subtle shadow */
    }

    .cat-btn.active {
        background: var(--primary-color, #10b981);
        color: white;
        border-color: var(--primary-color, #10b981);
        font-weight: 600;
        box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
    }
}