.navbar {
    width: 100%;
    height: 150px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 1rem 0;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    justify-content: center !important;
    align-items: center;

    &.scrolled {
        padding: 0.5rem 0;
    }
    .container-navbar {
        width: 100%;
        max-width: 1400px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        z-index: 999;
        margin: 0 1rem;

        .logo{
            width: 33.333%;
            img {
                height: 80px;
            }
        }

        .search-container {
            flex: 0 1 40%;
            margin: 0 auto;
            display: flex;
            align-items: center;
            
            input {
                width: 100%;
                padding: 8px 16px;
                border: 1px solid #ddd;
                border-radius: 4px 0 0 4px;
                outline: none;
            }

            .search-btn {
                padding: 8px 16px;
                background: transparent;
                color: #2c3e50;
                border: 1px solid rgba(0, 0, 0, 0.1);
                border-radius: 0 4px 4px 0;
                cursor: pointer;
                transition: all 0.2s ease;
                
                &:hover {
                    background: rgba(0, 0, 0, 0.02);
                    border-color: rgba(0, 0, 0, 0.2);
                }
            }
        }

        .nav-actions {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 20px;
            width: 33.333%;

            .auth-buttons {
                display: flex;
                gap: 10px;

                button {
                    padding: 10px 20px;
                    background: transparent;
                    border: 1px solid rgba(0, 0, 0, 0.1);
                    border-radius: 6px;
                    font-weight: 500;
                    font-size: 0.9rem;
                    color: #2c3e50;
                    cursor: pointer;
                    transition: all 0.2s ease;

                    &:hover {
                        background: rgba(0, 0, 0, 0.02);
                        border-color: rgba(0, 0, 0, 0.2);
                        transform: translateY(-1px);
                    }

                    &.login {
                        background: transparent;
                        color: #2c3e50;
                        border: 1px solid rgba(0, 0, 0, 0.1);

                        &:hover {
                            background: rgba(0, 0, 0, 0.02);
                            border-color: rgba(0, 0, 0, 0.2);
                        }
                    }

                    &.register {
                        background: transparent;
                        color: #2c3e50;
                        border: 1px solid rgba(0, 0, 0, 0.1);

                        &:hover {
                            background: rgba(0, 0, 0, 0.02);
                            border-color: rgba(0, 0, 0, 0.2);
                        }
                    }
                }
            }

            .cart {
                position: relative;
                cursor: pointer;
                transition: transform 0.2s;

                &:hover {
                    transform: translateY(-2px);
                }

                i {
                    font-size: 1.3rem;
                    color: #2c3e50;
                }

                .cart-count {
                    position: absolute;
                    top: -8px;
                    right: -8px;
                    background: #d32f2f;
                    color: white;
                    border-radius: 50%;
                    padding: 2px 6px;
                    font-size: 0.8rem;
                    font-weight: 600;
                    min-width: 20px;
                    text-align: center;
                }
            }
        }
    }
}

.navbar .container-navbar .burger-menu {
    display: none;  
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #2c3e50;
    padding: 5px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mobile-menu {
    display: none; 
    position: fixed;
    top: 150px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;

    &.open {
        transform: translateY(0);
    }

    .search-container {
        margin-bottom: 1.5rem;
        display: flex;
        
        input {
            width: 100%;
            padding: 12px 16px;
            border: 2px solid #eee;
            border-radius: 8px 0 0 8px;
            font-size: 1rem;
            transition: all 0.2s ease;
            
            &:focus {
                border-color: #2c3e50;
                box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.1);
            }
        }

        .search-btn {
            padding: 12px 20px;
            background: #2c3e50;
            color: white;
            border: none;
            border-radius: 0 8px 8px 0;
            
            &:hover {
                background: #34495e;
            }
        }
    }

    .auth-buttons {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;

        button {
            width: 100%;
            padding: 12px;
            margin-bottom: 0.5rem;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 500;
            transition: all 0.3s ease;

            &.login {
                background: #2c3e50;
                color: white;
                border: none;

                &:hover {
                    background: #34495e;
                    transform: translateY(-2px);
                }
            }

            &.register {
                background: white;
                color: #2c3e50;
                border: 2px solid #2c3e50;

                &:hover {
                    background: #f8f9fa;
                    transform: translateY(-2px);
                }
            }
        }
    }

    .mobile-categories {
        padding: 0 0.5rem;

        .categories-toggle {
            width: 100%;
            text-align: left;
            padding: 12px 16px;
            background: #f8f9fa;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 500;
            color: #2c3e50;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.5rem;
            transition: all 0.2s ease;

            &:hover {
                background: #edf2f7;
            }
        }

        .categories {
            display: none;
            padding: 0.5rem;
            margin: 0;
            border-radius: 8px;
            background: #f8f9fa;
            transition: all 0.3s ease;
            list-style: none;

            &.open {
                display: block;
                animation: slideDown 0.3s ease-out;
            }

            li {
                margin: 0;
                
                a {
                    display: block;
                    padding: 12px 16px;
                    color: #2c3e50;
                    text-decoration: none;
                    border-radius: 6px;
                    transition: all 0.2s ease;

                    &:hover {
                        background: #edf2f7;
                        padding-left: 20px;
                        color: #2c3e50;
                    }
                }
            }
        }
    }

    .mobile-nav-actions {
        padding: 1rem 0.5rem;
        border-bottom: 1px solid #eee;
        
        .cart-action {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1rem;
            background-color: #f8f9fa;
            border-radius: 8px;
            cursor: pointer;
            
            i {
                font-size: 1.2rem;
                color: #2c3e50;
            }
            
            span {
                color: #2c3e50;
                font-weight: 500;
                font-size: 0.95rem;
            }
            
            &:hover {
                background-color: #edf2f7;
            }
        }
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .navbar .container-navbar .burger-menu {  
        display: flex;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-menu {
        display: block;
        position: fixed; 
        top: 100px;
        left: 0;
        width: 100%;
        height: calc(100vh - 100px); 
        overflow-y: auto; 
        z-index: 900; 
    }

    .navbar {
        height: 100px;
        position: fixed;
        top: 0;
        left: 0;

        .container-navbar {
            padding: 0 1rem;

            .logo {
                width: auto; 
                
                img {
                    height: 60px;
                }
            }
        }
    }

    body {
        padding-top: 100px;
    }
}

@media (max-width: 768px) {
    .navbar {
        height: 80px; 

        .container-navbar {
            .logo {
                img {
                    height: 50px;
                }
            }
            
            .burger-menu {
                font-size: 1.3rem; 
            }
        }
    }

    .mobile-menu {
        top: 80px;
        height: calc(100vh - 80px);
    }
    
    body {
        padding-top: 80px;
    }
}

.subnav {
    background: transparent;
    border: none;
    display: flex;
    justify-content: center;
    width: 100%;

    .container-navbar {
        max-width: 1400px;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .categories {
        list-style: none;
        display: flex;
        justify-content: center;
        gap: 80px;
        margin: 0;
        padding: 0;

        li {
            a {
                text-decoration: none;
                color: #2c3e50;
                font-size: 0.95rem;
                font-weight: 400;
                position: relative;
                transition: color 0.3s ease;

                &:after {
                    content: '';
                    position: absolute;
                    bottom: -4px;
                    left: 0;
                    width: 0;
                    height: 1px;
                    background: #2c3e50;
                    transition: width 0.2s ease;
                }

                &:hover {
                    color: #2c3e50;
                    
                    &:after {
                        width: 100%;
                    }
                }
            }
        }
    }
}

.profile-section {
    position: relative;
    
    .profile-trigger {
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        padding: 5px;
        border-radius: 25px;
        transition: all 0.2s ease;

        &:hover {
            background: rgba(0,0,0,0.05);
        }

        .profile-pic {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
        }

        .default-profile {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #2c3e50;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 500;
            font-size: 1.2rem;
        }

        .profile-name {
            font-size: 0.9rem;
            font-weight: 500;
            color: #2c3e50;
        }
    }

    .profile-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        background: white;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        min-width: 200px;
        margin-top: 10px;
        padding: 8px 0;
        animation: fadeIn 0.2s ease-out;
        z-index: 1000;

        .dropdown-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 16px;
            color: #2c3e50;
            text-decoration: none;
            transition: all 0.2s ease;
            
            i {
                font-size: 1.1rem;
            }

            &:hover {
                background: #f8f9fa;
            }

            &.text-danger:hover {
                background: #fee2e2;
            }
        }

        .dropdown-divider {
            margin: 8px 0;
            border-top: 1px solid #e9ecef;
        }
    }
}

.mobile-auth {
    .profile-section {
        padding: 0 0.5rem;
        
        .profile-trigger {
            padding: 10px;
            
            .profile-name {
                font-size: 1rem;
            }
        }

        .profile-dropdown {
            position: static;
            margin-top: 5px;
            box-shadow: none;
            border: 1px solid #e9ecef;
        }
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-categories {
    .categories {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;

        &.open {
            display: block;
            max-height: 500px; 
        }
    }
}

.wrapper, 
.wrapper-assist, 
main {
    position: relative;
    z-index: 10; 
}

.mobile-profile-section {
    width: 100%;
    
    .profile-trigger {
        width: 100%;
        justify-content: flex-start;
        padding: 12px;
        border-radius: 8px;
        background-color: #f8f9fa;
    }
    
    .mobile-profile-dropdown {
        position: static;
        width: 100%;
        margin-top: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        border-radius: 8px;
        overflow: hidden;
        
        .dropdown-item {
            padding: 12px 16px;
            font-size: 0.95rem;
        }
    }
}