/* Categories Menu Styles */
.categories-menu {
    position: relative;
    width: 100%;
}

/* Desktop Styles */
@media (min-width: 768px) {
    .categories-menu .categories-toggle {
        background-color: white;
        border-color: white;
        padding: 0 0 0 5px !important;
        display: flex;
        align-items: center;
        font-weight: 400;
    }

    .categories-dropdown {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
        width: 320px;
        background: #fff;
        box-shadow: 0 8px 24px rgba(0,0,0,0.18), 0 1.5px 6px rgba(0,0,0,0.10);
        padding: 0;
        border: 1.5px solid #e0e0e0;
        margin-top: 2px;
        margin-left: 4px;
    }

    .categories-dropdown.active {
        display: block;
    }

    .mobile-only {
        display: none;
    }
    .category-header-content {
        padding: 0.3rem 0.75rem !important;
    }
    .category-item {
        margin-bottom: 0;
    }
}

/* Mobile Styles */
@media (max-width: 767px) {
    .categories-dropdown {
        display: none;
        width: 100%;
        background: #fff;
        z-index: 1000;
    }

    .categories-dropdown.active {
        display: block;
    }

    .desktop-only {
        display: none;
    }
}

/* Categories List Styles */
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 0.5rem;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.category-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 0.75rem;
}

/* Highlight de la categoría seleccionada */
.category-item.active > .category-header {
    background-color: var(--color-accent) !important;
}

.category-link {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.category-link:hover {
    color: #666;
}

/* Subcategories Styles */
.subcategories-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
}

.subcategories-list.active {
    display: block;
}

.subcategories-list {
    padding: 0.25rem 0;
}

/* Toggle Button Styles */
.toggle-subcategories {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    margin-left: 0.5rem;
    transition: background 0.2s;
}

.toggle-icon {
    width: 12px;
    height: 12px;
    position: relative;
    transition: transform 0.2s ease;
    border: solid #666;
    border-width: 0 2px 2px 0;
    transform: rotate(-45deg);
}

/* Rotate icon when subcategories are shown */
.toggle-subcategories.active .toggle-icon {
    transform: rotate(45deg);
}

/* Color coding for different levels */
.category-item > .category-header .category-link {
    color: #2c3e50;
}

.subcategories-list .category-link {
    color: #34495e;
    font-weight: 300;
}

/* Hover effects */
.category-link:hover {
    color: #3498db;
}

/* Hover del botón para abrir subcategoría */
.toggle-subcategories:hover,
.toggle-subcategories.active {
    background: none !important;
}

.toggle-subcategories:hover .toggle-icon,
.toggle-subcategories.active .toggle-icon {
    border-color: var(--color-accent) !important;
    background: none !important;
}

/* User Section Styles */
.user-section {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-greeting {
    color: #666;
    font-size: 0.9rem;
}

.user-name {
    font-weight: 500;
    color: #333;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.login-link,
.register-link {
    color: #3498db;
    text-decoration: none;
}

.separator {
    color: #666;
}

/* Hamburger icon styles */
.mobile-menu-toggle {
    position: relative;
    width: 28px;
    height: 28px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle svg line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Transform hamburger to X when menu is open */
body.menu-open .mobile-menu-toggle svg line:nth-child(1) {
    transform: translateY(4px) translateX(-4px) rotate(45deg);
    transform-origin: 50% 50%;
}

body.menu-open .mobile-menu-toggle svg line:nth-child(2) {
    opacity: 0;
}

body.menu-open .mobile-menu-toggle svg line:nth-child(3) {
    transform: translateY(-4.5px) translateX(-4px) rotate(-45deg);
    transform-origin: 50% 50%;
}

.arrow-down {
    display: flex;
    align-items: center;
    margin-left: 0.5em;
}

.arrow-down i {
    font-size: 1em;
    vertical-align: middle;
    line-height: 1;
}

.category-item.active > .category-header .category-link {
    color: #fff !important;
}
.category-item.active > .category-header .toggle-icon {
    border-color: #fff !important;
} 