* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
}

.header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
}

.category-toggle {
    display: flex;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
}

.category-toggle i {
    margin-right: 10px;
}

.search-bar {
    flex-grow: 1;
    margin: 0 20px;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 30px;
}

.user-actions {
    display: flex;
    align-items: center;
}

.user-actions a {
    margin-left: 15px;
    color: #333;
    text-decoration: none;
}

/* Category navigation */
.category-container {
    position: relative;
    display: flex;
}

.category-sidebar {
    width: 300px;
    background-color: white;
    border-right: 1px solid #eee;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
}

/* This is the key class that shows the sidebar */
.show-sidebar {
    display: block !important;
}

.category-list {
    list-style: none;
}

.category-item {
    border-bottom: 1px solid #eee;
    position: relative;
}

.category-link {
    padding: 15px 20px;
    display: block;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
    position: relative;
}

.category-link:hover {
    background-color: #f5f5f5;
}

.category-link.has-subcategory::after {
    content: '>';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #999;
}

/* Subcategory panel */
.subcategory-panel {
    position: absolute;
    left: 100%;
    top: 0;
    width: 850px;
    background-color: white;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.1);
    display: none;
    padding: 20px;
    min-height: 100%;
}

.category-item:hover .subcategory-panel {
    display: flex;
    flex-wrap: wrap;
}

.subcategory-item {
    width: 160px;
    margin: 10px;
    text-align: center;
}

.subcategory-link {
    display: block;
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.subcategory-link:hover {
    color: #0066cc;
}

.subcategory-image {
    width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 10px;
    border: 1px solid #eee;
    padding: 5px;
}

.subcategory-title {
    font-size: 13px;
    font-weight: bold;
    margin-top: 8px;
    text-transform: uppercase;
}

/* Main content */
.main-content {
    padding: 30px;
}

/* Responsive */
@media (max-width: 1200px) {
    .subcategory-panel {
        width: 700px;
    }
}

@media (max-width: 992px) {
    .subcategory-panel {
        width: 500px;
    }
}

@media (max-width: 768px) {
    .category-sidebar {
        width: 100%;
        position: static;
    }
    
    .subcategory-panel {
        position: static;
        width: 100%;
        box-shadow: none;
        padding: 0 0 0 20px;
    }
    
    .category-item:hover .subcategory-panel {
        display: block;
    }
    
    .subcategory-item {
        width: 100%;
        display: flex;
        align-items: center;
        text-align: left;
        margin: 5px 0;
    }
    
    .subcategory-image {
        width: 60px;
        height: 60px;
        margin-right: 10px;
        margin-bottom: 0;
    }
}