/* NAVBAR STYLES */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: #1b263b;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.navbar-logo a {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-logo a::before {
    content: "🛍️";
    font-size: 1.5rem;
}

.navbar-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    display: block;
}

.navbar-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-menu a.active {
    background-color: #4361ee;
}

.navbar-menu a.active::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background-color: #4895ef;
    border-radius: 3px;
}

/* Badge de notificações */
.badge-count {
    background-color: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    margin-left: 0.35rem;
    vertical-align: middle;
    display: inline-block;
    min-width: 18px;
    text-align: center;
    line-height: 1;
}

/* NAVBAR AÇÕES - CORRIGIDO */
.navbar-acoes {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-minha-loja,
.btn-cadastrar-loja {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-family: inherit;
}

.btn-minha-loja {
    background-color: #4cc9f0;
    color: #1b263b;
}

.btn-minha-loja:hover {
    background-color: #3a86ff;
    color: white;
    transform: translateY(-2px);
}

.btn-cadastrar-loja {
    background-color: #f8961e;
    color: #1b263b;
}

.btn-cadastrar-loja:hover {
    background-color: #f3722c;
    color: white;
    transform: translateY(-2px);
}

/* DROPDOWN DO PERFIL - CORRIGIDO */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    color: white;
    min-width: auto;
    text-decoration: none;
    font-family: inherit;
}

.profile-icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #4895ef;
    transform: scale(1.05);
}

.profile-name-short {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #1b263b;
    min-width: 180px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    z-index: 1001;
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.profile-name-full {
    padding: 12px 16px;
    color: #4cc9f0;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(76, 201, 240, 0.1);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-content a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.dropdown-content a:hover {
    background: #4361ee;
    color: white;
    padding-left: 20px;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:first-child:hover {
    background: #4cc9f0;
    color: #1b263b;
}

.dropdown-content a:last-child:hover {
    background: #f72585;
    color: white;
}

/* Seta no dropdown */
.dropdown-content::before {
    content: "";
    position: absolute;
    top: -8px;
    right: 15px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #1b263b;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .navbar-menu {
        margin: 0.5rem 0;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .navbar-acoes {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .profile-dropdown {
        order: -1;
        /* Coloca o perfil primeiro em mobile */
    }

    .profile-name-short {
        display: none;
    }

    .profile-icon-btn {
        padding: 8px 12px;
        border-radius: 50%;
        min-width: 40px;
        justify-content: center;
    }

    .dropdown-content {
        right: 50%;
        transform: translateX(50%);
        min-width: 160px;
    }

    .dropdown-content::before {
        right: 50%;
        transform: translateX(50%);
    }

    .btn-minha-loja,
    .btn-cadastrar-loja {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .navbar-acoes {
        flex-direction: column;
        width: 100%;
    }

    .btn-minha-loja,
    .btn-cadastrar-loja {
        width: 100%;
        justify-content: center;
    }

    .profile-dropdown {
        width: 100%;
    }

    .profile-icon-btn {
        width: 100%;
        justify-content: center;
        border-radius: 8px;
    }

    .navbar-menu {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }

    .navbar-menu a {
        width: 100%;
        box-sizing: border-box;
    }
}