.sort-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.sort-dropdown {
    position: relative;
    display: inline-block;
}

.sort-button {
    background-color: #ffffff;
    color: #333;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.sort-button:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.sort-button i {
    font-size: 16px;
}

.sort-options {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 999;
    margin-top: 5px;
    overflow: hidden;
    animation: fadeIn 0.2s ease-in-out;
}

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

.sort-group {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.sort-group:last-child {
    border-bottom: none;
}

.sort-group-title {
    padding: 8px 16px;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sort-option {
    padding: 10px 16px 10px 36px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
    font-size: 14px;
}

.sort-option:hover {
    background-color: #f5f5f5;
}

.sort-option i {
    color: #666;
    width: 20px;
    text-align: center;
    position: absolute;
    left: 12px;
}

.sort-option.active {
    background-color: #e9f5ff;
    color: #0066cc;
    font-weight: 500;
}

.sort-option.active i {
    color: #0066cc;
}

.sort-direction {
    margin-left: auto;
    font-size: 12px;
    color: #999;
}

.active .sort-direction {
    color: #0066cc;
}

.show {
    display: block;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .sort-container {
        justify-content: center;
    }

    .sort-button {
        padding: 8px 12px;
        font-size: 14px;
    }

    .sort-options {
        min-width: 200px;
    }
}
